|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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. |
boolean |
containsDoc(DocumentImpl doc)
Check if this node set contains nodes belonging to the given document. |
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(QName qname,
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. |
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)
|
NodeSet |
getContextNodes(int contextId)
Returns all context nodes associated with the nodes in this node set. |
DocumentSet |
getDocumentSet()
Returns the set of documents from which the node items in this sequence have been selected. |
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)
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)
|
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)
|
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, getItemType, getLength, getStringValue, hasMany, hasOne, isCached, isEmpty, isPersistentSet, itemAt, iterate, removeDuplicates, setIsCached, setSelfAsContext, toJavaObject, toNodeSet, unorderedIterator |
Methods inherited from interface org.w3c.dom.NodeList |
getLength, item |
Field Detail |
public static final int ANCESTOR
public static final int DESCENDANT
public static final int PRECEDING
public static final int FOLLOWING
public static final NodeSet EMPTY_SET
Method Detail |
public NodeSetIterator iterator()
public boolean contains(NodeProxy proxy)
proxy
- public boolean containsDoc(DocumentImpl doc)
doc
- public DocumentSet getDocumentSet()
Sequence
getDocumentSet
in interface Sequence
public void add(NodeProxy proxy)
proxy
- public void add(NodeProxy proxy, int sizeHint)
proxy
- sizeHint
- public void addAll(NodeSet other)
other
- public NodeProxy get(int pos)
pos
- public NodeProxy get(NodeProxy p)
p
- public NodeProxy get(DocumentImpl doc, NodeId nodeId)
public 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 modepublic NodeSet 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.public NodeSet selectAncestorDescendant(NodeSet al, int mode, boolean includeSelf, int contextId)
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.public 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.public 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.public 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.public NodeSet selectPreceding(NodeSet preceding) throws XPathException
XPathException
public NodeSet selectFollowing(NodeSet following) throws XPathException
XPathException
public NodeProxy parentWithChild(DocumentImpl doc, NodeId nodeId, boolean directParent, boolean includeSelf)
public NodeProxy parentWithChild(NodeProxy proxy, boolean directParent, boolean includeSelf, int level)
public NodeSet getParents(int contextId)
public NodeSet getAncestors(int contextId, boolean includeSelf)
public NodeSet directSelectAttribute(QName qname, int contextId)
qname
- the QName of the attributecontextId
- 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.public int getIndexType()
Type.ITEM
.
GeneralComparison
,
ValueComparison
public boolean hasTextIndex()
public boolean hasMixedContent()
public int getSizeHint(DocumentImpl doc)
doc
- public NodeSet intersection(NodeSet other)
other
- public NodeSet deepIntersection(NodeSet other)
other
- public NodeSet union(NodeSet other)
other
- public NodeSet except(NodeSet other)
other
- public void setProcessInReverseOrder(boolean inReverseOrder)
public boolean getProcessInReverseOrder()
public 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.public boolean hasChanged(int previousState)
public int getState()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |