@Override public void visit(SameNode node) { symbols.add(node.getSelectorName()); }
/** * {@inheritDoc} * * @see QueryObjectModelVisitor#visit(SameNode) */ public void visit(SameNode sameNode) { append("ISSAMENODE(").append(sameNode.getSelectorName()).append(',').append(sameNode.getPath()).append(')'); }
/** * @see org.xcmis.search.QueryObjectModelVisitor#visit(org.xcmis.search.model.constraint.SameNode) */ public void visit(SameNode node) throws VisitException { final Object[] entries = pathSplitter.splitPath(node.getPath()); Query descendantQuery = null; for (int i = 0; i < entries.length; i++) { if (i == 0) { descendantQuery = new TermQuery(new Term(FieldNames.UUID, indexConfiguration.getRootUuid())); } else { final String stepName = nameConverter.convertName(entries[i]); final Query nameQuery = new TermQuery(new Term(FieldNames.LABEL, stepName)); descendantQuery = new DescendantQueryNode(nameQuery, descendantQuery); } } queryBuilderStack.push(descendantQuery); }
/** * Define a constraint clause that the node within the named table is the * same node as that appearing at the supplied path. * * @param table * the name of the table; may not be null and must refer to a * valid name or alias of a table appearing in the FROM clause * @param asNodeAtPath * the path to the node * @return the constraint builder that was used to create this clause; * never null */ public ConstraintBuilder isSameNode(String table, String asNodeAtPath) { return setConstraint(new SameNode(selector(table), asNodeAtPath)); }
/** * @see org.xcmis.search.Visitors.AbstractModelVisitor#visit(org.xcmis.search.model.constraint.SameNode) */ @Override public void visit(SameNode node) throws VisitException { checkSelectorExistance(node.getSelectorName()); }