|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.priha.query.aqt.QueryNode
org.priha.query.aqt.NAryQueryNode
public abstract class NAryQueryNode
Defines an abstract query node for nodes that have child nodes.
| Field Summary | |
|---|---|
protected java.util.List<QueryNode> |
operands
The list of operands / children |
| Fields inherited from class org.priha.query.aqt.QueryNode |
|---|
TYPE_AND, TYPE_DEREF, TYPE_EXACT, TYPE_LOCATION, TYPE_NODETYPE, TYPE_NOT, TYPE_OR, TYPE_ORDER, TYPE_PATH, TYPE_PROP_FUNCTION, TYPE_RELATION, TYPE_ROOT, TYPE_TEXTSEARCH |
| Constructor Summary | |
|---|---|
NAryQueryNode(QueryNode parent)
Creates a new NAryQueryNode with a reference to a parent
QueryNode. |
|
NAryQueryNode(QueryNode parent,
QueryNode[] operands)
Creates a new NAryQueryNode with a reference to a parent
QueryNode and initial operands. |
|
| Method Summary | |
|---|---|
java.lang.Object[] |
acceptOperands(QueryNodeVisitor visitor,
java.lang.Object data)
Helper class to accept a visitor for all operands
of this NAryQueryNode. |
void |
addOperand(QueryNode operand)
Adds a new operand (child node) to this query node. |
boolean |
equals(java.lang.Object obj)
Returns true if obj is the same type of
QueryNode as this node and is equal to
this node. |
int |
getNumOperands()
Returns the number of operands. |
QueryNode[] |
getOperands()
Returns an array of currently set QueryNode operands of this
QueryNode. |
boolean |
needsSystemTree()
Returns true if this query node needs items under
/jcr:system to be queried. |
boolean |
removeOperand(QueryNode operand)
Removes an operand (child node) from this query node. |
| Methods inherited from class org.priha.query.aqt.QueryNode |
|---|
accept, dump, getAttribute, getParent, getType, setAttribute |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.List<QueryNode> operands
| Constructor Detail |
|---|
public NAryQueryNode(QueryNode parent)
NAryQueryNode with a reference to a parent
QueryNode.
parent - the parent node.
public NAryQueryNode(QueryNode parent,
QueryNode[] operands)
NAryQueryNode with a reference to a parent
QueryNode and initial operands.
parent - the parent node.operands - child nodes of this NAryQueryNode.| Method Detail |
|---|
public void addOperand(QueryNode operand)
operand (child node) to this query node.
operand - the child QueryNode to add.public boolean removeOperand(QueryNode operand)
operand (child node) from this query node.
operand - the child to remove.
true if the operand was in the list of child nodes
and has been removed; false if this node does not contain
operand as a child node.public QueryNode[] getOperands()
QueryNode operands of this
QueryNode. Returns an empty array if no operands are set.
QueryNode operands.public int getNumOperands()
public java.lang.Object[] acceptOperands(QueryNodeVisitor visitor,
java.lang.Object data)
throws RepositoryException
visitor for all operands
of this NAryQueryNode.
visitor - the visitor to call back.data - arbitrary data for the visitor.
visitor.visit() calls.
RepositoryExceptionpublic boolean equals(java.lang.Object obj)
QueryNodetrue if obj is the same type of
QueryNode as this node and is equal to
this node.
equals in class QueryNodeobj - the reference object with which to compare.
true if obj is equal to
this; false otherwise.public boolean needsSystemTree()
true if this query node needs items under
/jcr:system to be queried.
needsSystemTree in class QueryNodetrue if this query node needs content under
/jcr:system to be queried; false otherwise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||