public abstract class QueryNode extends Object
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_AND
Type value for
AndQueryNode |
static int |
TYPE_DEREF
Type value for
DerefQueryNode |
static int |
TYPE_EXACT
Type value for
ExactQueryNode |
static int |
TYPE_LOCATION
Type value for
LocationStepQueryNode |
static int |
TYPE_NODETYPE
Type value for
NodeTypeQueryNode |
static int |
TYPE_NOT
Type value for
NotQueryNode |
static int |
TYPE_OR
Type value for
OrQueryNode |
static int |
TYPE_ORDER
Type value for
OrderQueryNode |
static int |
TYPE_PATH
Type value for
PathQueryNode |
static int |
TYPE_PROP_FUNCTION
Type value for
PropertyFunctionQueryNode |
static int |
TYPE_RELATION
Type value for
RelationQueryNode |
static int |
TYPE_ROOT
Type value for
QueryRootNode |
static int |
TYPE_TEXTSEARCH
Type value for
TextsearchQueryNode |
Constructor and Description |
---|
QueryNode(QueryNode parent)
Constructs a new
QueryNode with a reference to it's parent. |
Modifier and Type | Method and Description |
---|---|
abstract Object |
accept(QueryNodeVisitor visitor,
Object data)
Accepts a
QueryNodeVisitor and calls the appropriate visit
method on the visitor depending on the concrete implementation of
this QueryNode . |
String |
dump()
Dumps this QueryNode and its child nodes to a String.
|
abstract boolean |
equals(Object obj)
Returns
true if obj is the same type of
QueryNode as this node and is equal to
this node. |
QueryNode |
getParent()
Returns the parent
QueryNode or null if this is
the root node of a query tree. |
abstract int |
getType()
Returns the type of this query node.
|
abstract boolean |
needsSystemTree()
Returns
true if this query node needs items under
/jcr:system to be queried. |
public static final int TYPE_ROOT
QueryRootNode
public static final int TYPE_RELATION
RelationQueryNode
public static final int TYPE_ORDER
OrderQueryNode
public static final int TYPE_TEXTSEARCH
TextsearchQueryNode
public static final int TYPE_EXACT
ExactQueryNode
public static final int TYPE_NODETYPE
NodeTypeQueryNode
public static final int TYPE_AND
AndQueryNode
public static final int TYPE_OR
OrQueryNode
public static final int TYPE_NOT
NotQueryNode
public static final int TYPE_LOCATION
LocationStepQueryNode
public static final int TYPE_PATH
PathQueryNode
public static final int TYPE_DEREF
DerefQueryNode
public static final int TYPE_PROP_FUNCTION
PropertyFunctionQueryNode
public QueryNode(QueryNode parent)
QueryNode
with a reference to it's parent.parent
- the parent node, or null
if this is the root
node of a query tree.public QueryNode getParent()
QueryNode
or null
if this is
the root node of a query tree.QueryNode
or null
if this is
the root node of a query tree.public String dump() throws RepositoryException
RepositoryException
public abstract Object accept(QueryNodeVisitor visitor, Object data) throws RepositoryException
QueryNodeVisitor
and calls the appropriate visit
method on the visitor depending on the concrete implementation of
this QueryNode
.visitor
- the visitor to call back.data
- arbitrary data for the visitor.visitor.visit()
call.RepositoryException
public abstract int getType()
public abstract boolean equals(Object obj)
true
if obj
is the same type of
QueryNode
as this
node and is equal to
this
node.public abstract boolean needsSystemTree()
true
if this query node needs items under
/jcr:system to be queried.true
if this query node needs content under
/jcr:system to be queried; false
otherwise.Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.