|
|||||||||
| 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
org.priha.query.aqt.LocationStepQueryNode
public class LocationStepQueryNode
Defines a location step for querying the path of a node.
/foo -> descendants = false, nameTest = foo
//foo -> descendants = true, nameTest = foo
//* -> descendants = true, nameTest = null
/* -> descendants = false, nameTest = null
/ -> descendants = false, nameTest = ""
| Field Summary | |
|---|---|
static QName |
EMPTY_NAME
The empty name used in matching the root node. |
static int |
LAST
Constant value for position index = last() |
static int |
NONE
Constant value to indicate no position index |
| Fields inherited from class org.priha.query.aqt.NAryQueryNode |
|---|
operands |
| 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 | |
|---|---|
protected |
LocationStepQueryNode(QueryNode parent)
Creates a new LocationStepQueryNode that matches only
the empty name (the repository root). |
| Method Summary | |
|---|---|
java.lang.Object |
accept(QueryNodeVisitor visitor,
java.lang.Object data)
Accepts a QueryNodeVisitor and calls the apropriate visit
method on the visitor depending on the concrete implementation of
this QueryNode. |
void |
addPredicate(QueryNode predicate)
Adds a predicate node to this location step. |
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. |
boolean |
getIncludeDescendants()
Returns true if this location step uses the
descendant-or-self axis, false if this step uses the child
axis. |
int |
getIndex()
Returns the position index for this step. |
QName |
getNameTest()
Returns the label of the node for this location step, or null
if the name test is '*'. |
QueryNode[] |
getPredicates()
Returns the predicate nodes for this location step. |
int |
getType()
Returns the type of this query node. |
void |
setIncludeDescendants(boolean include)
Sets a new value for the includeDescendants property. |
void |
setIndex(int index)
Sets the position index for this step. |
void |
setNameTest(QName nameTest)
Sets a new name test. |
java.lang.String |
toString()
|
| Methods inherited from class org.priha.query.aqt.NAryQueryNode |
|---|
acceptOperands, addOperand, getNumOperands, getOperands, needsSystemTree, removeOperand |
| Methods inherited from class org.priha.query.aqt.QueryNode |
|---|
dump, getAttribute, getParent, setAttribute |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int LAST
public static final int NONE
public static final QName EMPTY_NAME
| Constructor Detail |
|---|
protected LocationStepQueryNode(QueryNode parent)
LocationStepQueryNode that matches only
the empty name (the repository root). The created location step
uses only the child axis.
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic QName getNameTest()
null
if the name test is '*'.
public void setNameTest(QName nameTest)
nameTest - the name test or null to match all names.public boolean getIncludeDescendants()
true if this location step uses the
descendant-or-self axis, false if this step uses the child
axis.
true if this step uses the descendant-or-self axis.public void setIncludeDescendants(boolean include)
include - the new value.getIncludeDescendants()public void addPredicate(QueryNode predicate)
predicate - the node to add.public QueryNode[] getPredicates()
public void setIndex(int index)
NONE indicates
that this location step has no position index assigned. That is, the
step selects all same name siblings.
index - the position index.public int getIndex()
NONE indicates
that this location step has no position index assigned. That is, the
step selects all same name siblings.
public java.lang.Object accept(QueryNodeVisitor visitor,
java.lang.Object data)
throws javax.jcr.RepositoryException
QueryNodeVisitor and calls the apropriate visit
method on the visitor depending on the concrete implementation of
this QueryNode.
accept in class QueryNodevisitor - the visitor to call back.data - arbitrary data for the visitor.
visitor.visit() call.
javax.jcr.RepositoryExceptionpublic int getType()
getType in class QueryNodepublic 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 NAryQueryNodeobj - the reference object with which to compare.
true if obj is equal to
this; false otherwise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||