public Object visit(QueryRootNode node, Object data) throws RepositoryException { PathQueryNode pathNode = node.getLocationNode(); if (pathNode != null) { pathNode.accept(this, data); } OrderQueryNode orderNode = node.getOrderNode(); if (orderNode != null) { orderNode.accept(this, data); } return data; }
/** * {@inheritDoc} */ public boolean needsSystemTree() { return (locationNode != null && locationNode.needsSystemTree()) || (orderNode != null && orderNode.needsSystemTree()); }
public Object visit(ASTNotExpression node, Object data) { NAryQueryNode parent = (NAryQueryNode) data; NotQueryNode notQuery = factory.createNotQueryNode(parent); // pass to operand node.childrenAccept(this, notQuery); if (notQuery.getNumOperands() > 0) { parent.addOperand(notQuery); } return parent; }
public Object visit(ASTOrExpression node, Object data) { NAryQueryNode parent = (NAryQueryNode) data; OrQueryNode orQuery = factory.createOrQueryNode(parent); // pass to operands node.childrenAccept(this, orQuery); if (orQuery.getNumOperands() > 0) { parent.addOperand(orQuery); } return parent; }
/** * {@inheritDoc} * @throws RepositoryException */ public Object accept(QueryNodeVisitor visitor, Object data) throws RepositoryException { return visitor.visit(this, data); }
/** * {@inheritDoc} */ public PathQueryNode createPathQueryNode(QueryNode parent) { return new PathQueryNode(parent, validJcrSystemNodeTypeNames); }
/** * {@inheritDoc} */ public boolean equals(Object obj) { if (obj instanceof NodeTypeQueryNode) { return super.equals(obj); } return false; } }
/** * Adds a path step to this <code>PathQueryNode</code>. * * @param step the step to add. */ public void addPathStep(LocationStepQueryNode step) { addOperand(step); }
/** * {@inheritDoc} */ public NodeTypeQueryNode createNodeTypeQueryNode(QueryNode parent, Name nodeType) { return new NodeTypeQueryNode(parent, nodeType); }
/** * {@inheritDoc} */ public RelationQueryNode createRelationQueryNode(QueryNode parent, int operation) { return new RelationQueryNode(parent, operation, this); }
/** * {@inheritDoc} */ public OrderQueryNode createOrderQueryNode(QueryNode parent) { return new OrderQueryNode(parent); }
/** * {@inheritDoc} */ public OrQueryNode createOrQueryNode(QueryNode parent) { return new OrQueryNode(parent); }
/** * {@inheritDoc} */ public QueryRootNode createQueryRootNode() { return new QueryRootNode(); }
/** * Dumps the node tree to buffer. * @param node the root node. * @param buffer where to dump the tree. * @throws RepositoryException */ private QueryTreeDump(QueryNode node, StringBuffer buffer) throws RepositoryException { node.accept(this, buffer); }
public Object visit(QueryRootNode node, Object data) throws RepositoryException { PathQueryNode pathNode = node.getLocationNode(); if (pathNode != null) { pathNode.accept(this, data); } OrderQueryNode orderNode = node.getOrderNode(); if (orderNode != null) { orderNode.accept(this, data); } return data; }
/** * {@inheritDoc} */ public boolean needsSystemTree() { return (locationNode != null && locationNode.needsSystemTree()) || (orderNode != null && orderNode.needsSystemTree()); }
/** * {@inheritDoc} * @throws RepositoryException */ public Object accept(QueryNodeVisitor visitor, Object data) throws RepositoryException { return visitor.visit(this, data); }
/** * {@inheritDoc} */ public PathQueryNode createPathQueryNode(QueryNode parent) { return new PathQueryNode(parent, validJcrSystemNodeTypeNames); }
/** * {@inheritDoc} * @throws RepositoryException */ public Object accept(QueryNodeVisitor visitor, Object data) throws RepositoryException { return visitor.visit(this, data); }
/** * {@inheritDoc} * @throws RepositoryException */ public Object accept(QueryNodeVisitor visitor, Object data) throws RepositoryException { return visitor.visit(this, data); }