|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NodeSet
Field Summary | |
---|---|
static int |
ANCESTOR
|
static int |
DESCENDANT
|
static NodeSet |
EMPTY_SET
Constant representing an empty node set. |
static int |
FOLLOWING
|
static int |
PRECEDING
|
Fields inherited from interface org.exist.xquery.value.Sequence |
---|
EMPTY_SEQUENCE |
Method Summary | |
---|---|
void |
add(NodeProxy proxy)
Add a new proxy object to the node set. |
void |
add(NodeProxy proxy,
int sizeHint)
Add a proxy object to the node set. |
void |
addAll(NodeSet other)
Add all nodes from the given node set. |
boolean |
contains(NodeProxy proxy)
Check if this node set contains a node matching the document and node-id of the given NodeProxy object. |
NodeSet |
deepIntersection(NodeSet other)
Return a new node set, containing all nodes in this node set that are contained or have descendants in the other node set. |
NodeSet |
directSelectAttribute(DBBroker broker,
NodeTest test,
int contextId)
Optimized method to select attributes. |
NodeSet |
except(NodeSet other)
Return a new node set containing all nodes from this node set except those nodes which are also contained in the argument node set. |
NodeSet |
filterDocuments(NodeSet otherSet)
Create a new node set from this set containing only nodes in documents that are also contained in the argument set. |
NodeProxy |
get(DocumentImpl doc,
NodeId nodeId)
|
NodeProxy |
get(int pos)
Get the node at position pos within this node set. |
NodeProxy |
get(NodeProxy p)
Get a node from this node set matching the document and node id of the given NodeProxy. |
NodeSet |
getAncestors(int contextId,
boolean includeSelf)
|
Iterator |
getCollectionIterator()
Return an iterator on all collections referenced by documents contained in this node set. |
NodeSet |
getContextNodes(int contextId)
Returns all context nodes associated with the nodes in this node set. |
DocumentSet |
getDocumentSet()
Returns a DocumentSet containing all documents referenced in this node set. |
int |
getIndexType()
If all nodes in this set have an index, returns the common supertype used to build the index, e.g. |
NodeSet |
getParents(int contextId)
Return a new node set containing the parent nodes of all nodes in the current set. |
boolean |
getProcessInReverseOrder()
|
int |
getSizeHint(DocumentImpl doc)
Get a hint about how many nodes in this node set belong to the specified document. |
int |
getState()
|
boolean |
hasChanged(int previousState)
|
boolean |
hasMixedContent()
|
boolean |
hasTextIndex()
|
NodeSet |
intersection(NodeSet other)
Return a new node set, which represents the intersection of the current node set with the given node set. |
NodeSetIterator |
iterator()
Return an iterator on the nodes in this list. |
NodeProxy |
parentWithChild(DocumentImpl doc,
NodeId nodeId,
boolean directParent,
boolean includeSelf)
Check if the node identified by its node id has an ancestor contained in this node set and return the ancestor found. |
NodeProxy |
parentWithChild(NodeProxy proxy,
boolean directParent,
boolean includeSelf,
int level)
Check if the given node has an ancestor contained in this node set and return the ancestor found. |
NodeSet |
selectAncestorDescendant(NodeSet al,
int mode,
boolean includeSelf,
int contextId,
boolean copyMatches)
Check if any descendant nodes are found within this node set for a given set of potential ancestor nodes. |
NodeSet |
selectAncestors(NodeSet descendants,
boolean includeSelf,
int contextId)
For a given set of potential ancestor nodes, return all ancestors having descendants in this node set. |
NodeSet |
selectFollowing(NodeSet following,
int contextId)
|
NodeSet |
selectFollowing(NodeSet following,
int position,
int contextId)
|
NodeSet |
selectFollowingSiblings(NodeSet siblings,
int contextId)
Select all nodes from the passed node set, which are following siblings of the nodes in this set. |
NodeSet |
selectParentChild(NodeSet al,
int mode)
Check if any child nodes are found within this node set for a given set of potential parent nodes. |
NodeSet |
selectParentChild(NodeSet al,
int mode,
int contextId)
Check if any child nodes are found within this node set for a given set of potential parent nodes. |
NodeSet |
selectPreceding(NodeSet preceding,
int contextId)
|
NodeSet |
selectPreceding(NodeSet preceding,
int position,
int contextId)
|
NodeSet |
selectPrecedingSiblings(NodeSet siblings,
int contextId)
Select all nodes from the passed node set, which are preceding siblings of the nodes in this set. |
void |
setProcessInReverseOrder(boolean inReverseOrder)
|
NodeSet |
union(NodeSet other)
Return a new node set which represents the union of the current node set and the given node set. |
Methods inherited from interface org.exist.xquery.value.Sequence |
---|
add, addAll, clearContext, conversionPreference, convertTo, effectiveBooleanValue, getCardinality, getItemCount, getItemType, getStringValue, hasMany, hasOne, isCacheable, isCached, isEmpty, isPersistentSet, itemAt, iterate, nodeMoved, removeDuplicates, setIsCached, setSelfAsContext, toJavaObject, toMemNodeSet, toNodeSet, unorderedIterator |
Methods inherited from interface org.w3c.dom.NodeList |
---|
getLength, item |
Field Detail |
---|
static final int ANCESTOR
static final int DESCENDANT
static final int PRECEDING
static final int FOLLOWING
static final NodeSet EMPTY_SET
Method Detail |
---|
NodeSetIterator iterator()
boolean contains(NodeProxy proxy)
proxy
- DocumentSet getDocumentSet()
getDocumentSet
in interface Sequence
Iterator getCollectionIterator()
getCollectionIterator
in interface Sequence
void add(NodeProxy proxy)
proxy
- void add(NodeProxy proxy, int sizeHint)
proxy
- sizeHint
- void addAll(NodeSet other)
other
- NodeProxy get(int pos)
pos
- NodeProxy get(NodeProxy p)
p
- NodeProxy get(DocumentImpl doc, NodeId nodeId)
NodeSet selectParentChild(NodeSet al, int mode)
DESCENDANT
, the returned node set will contain
all child nodes found in this node set for each parent node. If mode is
ANCESTOR
, the returned set will contain those parent nodes,
for which children have been found.
al
- a node set containing potential parent nodesmode
- selection modeNodeSet selectParentChild(NodeSet al, int mode, int contextId)
DESCENDANT
, the returned node set will contain
all child nodes found in this node set for each parent node. If mode is
ANCESTOR
, the returned set will contain those parent nodes,
for which children have been found.
al
- a node set containing potential parent nodesmode
- selection modecontextId
- used to track context nodes when evaluating predicate
expressions. If contextId != Expression.NO_CONTEXT_ID
, the current context
will be added to each result of the of the selection.NodeSet selectAncestorDescendant(NodeSet al, int mode, boolean includeSelf, int contextId, boolean copyMatches)
DESCENDANT
, the returned node set will contain
all descendant nodes found in this node set for each ancestor. If mode is
ANCESTOR
, the returned set will contain those ancestor nodes,
for which descendants have been found.
al
- a node set containing potential parent nodesmode
- selection modeincludeSelf
- if true, check if the ancestor node itself is contained in
the set of descendant nodes (descendant-or-self axis)contextId
- used to track context nodes when evaluating predicate
expressions. If contextId != Expression.NO_CONTEXT_ID
, the current context
will be added to each result of the of the selection.NodeSet selectAncestors(NodeSet descendants, boolean includeSelf, int contextId)
descendants
- node set containing potential ancestorsincludeSelf
- if true, check if the ancestor node itself is contained
in this node set (ancestor-or-self axis)contextId
- used to track context nodes when evaluating predicate
expressions. If contextId != Expression.NO_CONTEXT_ID
, the current context
will be added to each result of the of the selection.NodeSet selectPrecedingSiblings(NodeSet siblings, int contextId)
siblings
- a node set containing potential siblingscontextId
- used to track context nodes when evaluating predicate
expressions. If contextId != Expression.NO_CONTEXT_ID
, the current context
will be added to each result of the of the selection.NodeSet selectFollowingSiblings(NodeSet siblings, int contextId)
siblings
- a node set containing potential siblingscontextId
- used to track context nodes when evaluating predicate
expressions. If contextId != Expression.NO_CONTEXT_ID
, the current context
will be added to each result of the of the selection.NodeSet selectPreceding(NodeSet preceding, int contextId) throws XPathException
XPathException
NodeSet selectPreceding(NodeSet preceding, int position, int contextId) throws XPathException, UnsupportedOperationException
XPathException
UnsupportedOperationException
NodeSet selectFollowing(NodeSet following, int contextId) throws XPathException
XPathException
NodeSet selectFollowing(NodeSet following, int position, int contextId) throws XPathException
XPathException
NodeProxy parentWithChild(DocumentImpl doc, NodeId nodeId, boolean directParent, boolean includeSelf)
NodeProxy parentWithChild(NodeProxy proxy, boolean directParent, boolean includeSelf, int level)
NodeSet getParents(int contextId)
NodeSet getAncestors(int contextId, boolean includeSelf)
NodeSet directSelectAttribute(DBBroker broker, NodeTest test, int contextId)
test
- a node testcontextId
- used to track context nodes when evaluating predicate
expressions. If contextId != Expression.NO_CONTEXT_ID
, the current context
will be added to each result of the of the selection.int getIndexType()
Type.ITEM
.
GeneralComparison
,
ValueComparison
boolean hasTextIndex()
boolean hasMixedContent()
int getSizeHint(DocumentImpl doc)
doc
- NodeSet intersection(NodeSet other)
other
- NodeSet deepIntersection(NodeSet other)
other
- NodeSet union(NodeSet other)
other
- NodeSet except(NodeSet other)
other
- NodeSet filterDocuments(NodeSet otherSet)
otherSet
- void setProcessInReverseOrder(boolean inReverseOrder)
boolean getProcessInReverseOrder()
NodeSet getContextNodes(int contextId)
contextId
- used to track context nodes when evaluating predicate
expressions. If contextId != Expression.NO_CONTEXT_ID
, the current context
will be added to each result of the of the selection.boolean hasChanged(int previousState)
hasChanged
in interface Sequence
int getState()
getState
in interface Sequence
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |