|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectorg.exist.xquery.value.AbstractSequence
org.exist.dom.AbstractNodeSet
org.exist.dom.VirtualNodeSet
public class VirtualNodeSet
This node set is called virtual because it is just a placeholder for the set of relevant nodes. For XPath expressions like //* or //node(), it would be totally unefficient to actually retrieve all descendant nodes. In many cases, the expression can be resolved at a later point in time without retrieving the whole node set. VirtualNodeSet basically provides method getFirstParent to retrieve the first matching descendant of its context according to the primary type axis. Class LocationStep will always return an instance of VirtualNodeSet if it finds something like descendant::* etc..
| Field Summary |
|---|
| Fields inherited from interface org.exist.dom.NodeSet |
|---|
ANCESTOR, DESCENDANT, EMPTY_SET, FOLLOWING, PRECEDING |
| Fields inherited from interface org.exist.xquery.value.Sequence |
|---|
EMPTY_SEQUENCE |
| Constructor Summary | |
|---|---|
VirtualNodeSet(int axis,
NodeTest test,
int contextId,
NodeSet context)
Creates a new VirtualNodeSet instance. |
|
| Method Summary | |
|---|---|
void |
add(DocumentImpl doc,
long nodeId)
The method add |
void |
add(Node node)
The method add |
void |
add(NodeProxy proxy)
The method add |
void |
addAll(NodeList other)
The method addAll |
void |
addAll(NodeSet other)
The method addAll |
void |
clearContext()
The method clearContext |
boolean |
contains(NodeProxy p)
The method contains |
NodeSet |
filterDocuments(NodeSet otherSet)
The method filterDocuments |
NodeProxy |
get(DocumentImpl doc,
NodeId nodeId)
The method get |
NodeProxy |
get(int pos)
The method get |
NodeProxy |
get(NodeProxy proxy)
The method get |
Iterator |
getCollectionIterator()
The method getCollectionIterator |
DocumentSet |
getDocumentSet()
Returns the set of documents from which the node items in this sequence have been selected. |
int |
getItemCount()
The method getItemCount |
int |
getLength()
The method getLength |
boolean |
hasIndex()
|
boolean |
hasMany()
The method hasMany |
boolean |
hasOne()
The method hasOne |
NodeSet |
intersection(NodeSet other)
The method intersection |
boolean |
isEmpty()
The method isEmpty |
Node |
item(int pos)
The method item |
Item |
itemAt(int pos)
The method itemAt |
SequenceIterator |
iterate()
Returns an iterator over all items in the sequence. |
NodeSetIterator |
iterator()
The method iterator |
NodeProxy |
parentWithChild(DocumentImpl doc,
NodeId nodeId,
boolean directParent,
boolean includeSelf)
The method parentWithChild |
NodeProxy |
parentWithChild(NodeProxy proxy,
boolean directParent,
boolean includeSelf,
int level)
The method parentWithChild |
boolean |
preferTreeTraversal()
The method preferTreeTraversal |
void |
realize()
The method realize |
void |
remove(NodeProxy node)
The method remove |
void |
set(int position,
DocumentImpl doc,
long nodeId)
The method set |
void |
setContextId(int contextId)
The method setContextId |
void |
setInPredicate(boolean predicate)
The method setInPredicate |
void |
setSelfIsContext()
The method setSelfIsContext |
String |
toString()
The method toString |
NodeSet |
union(NodeSet other)
The method union |
SequenceIterator |
unorderedIterator()
Returns an iterator over all items in the sequence. |
| Methods inherited from class org.exist.xquery.value.AbstractSequence |
|---|
conversionPreference, convertTo, effectiveBooleanValue, getCardinality, getStringValue, setSelfAsContext, toJavaObject |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.exist.xquery.value.Sequence |
|---|
conversionPreference, convertTo, effectiveBooleanValue, getCardinality, getStringValue, setSelfAsContext, toJavaObject |
| Constructor Detail |
|---|
public VirtualNodeSet(int axis,
NodeTest test,
int contextId,
NodeSet context)
VirtualNodeSet instance.
axis - an int valuetest - a NodeTest valuecontextId - an int valuecontext - a NodeSet value| Method Detail |
|---|
public boolean contains(NodeProxy p)
contains
contains in interface NodeSetcontains in class AbstractNodeSetp - a NodeProxy value
boolean valuepublic void setInPredicate(boolean predicate)
setInPredicate
predicate - a boolean valuepublic DocumentSet getDocumentSet()
Sequence
getDocumentSet in interface NodeSetgetDocumentSet in interface SequencegetDocumentSet in class AbstractNodeSetpublic Iterator getCollectionIterator()
getCollectionIterator
getCollectionIterator in interface NodeSetgetCollectionIterator in interface SequencegetCollectionIterator in class AbstractNodeSetIterator value
public NodeProxy parentWithChild(NodeProxy proxy,
boolean directParent,
boolean includeSelf,
int level)
parentWithChild
parentWithChild in interface NodeSetparentWithChild in class AbstractNodeSetproxy - a NodeProxy valuedirectParent - a boolean valueincludeSelf - a boolean valuelevel - an int value
NodeProxy value
public NodeProxy parentWithChild(DocumentImpl doc,
NodeId nodeId,
boolean directParent,
boolean includeSelf)
parentWithChild
parentWithChild in interface NodeSetparentWithChild in class AbstractNodeSetdoc - a DocumentImpl valuenodeId - a NodeId valuedirectParent - a boolean valueincludeSelf - a boolean value
NodeProxy valuepublic final void realize()
realize
public boolean preferTreeTraversal()
preferTreeTraversal
boolean valuepublic void setSelfIsContext()
setSelfIsContext
public void setContextId(int contextId)
setContextId
contextId - an int valuepublic boolean hasIndex()
public boolean isEmpty()
isEmpty
isEmpty in interface SequenceisEmpty in class AbstractSequenceboolean valuepublic boolean hasOne()
hasOne
hasOne in interface SequencehasOne in class AbstractSequenceboolean valuepublic boolean hasMany()
hasMany
hasMany in interface SequencehasMany in class AbstractSequenceboolean value
public void add(DocumentImpl doc,
long nodeId)
add
doc - a DocumentImpl valuenodeId - a long valuepublic void add(Node node)
add
node - a Node valuepublic void add(NodeProxy proxy)
add
add in interface NodeSetadd in class AbstractNodeSetproxy - a NodeProxy valuepublic void addAll(NodeList other)
addAll
other - a NodeList valuepublic void addAll(NodeSet other)
addAll
addAll in interface NodeSetaddAll in class AbstractNodeSetother - a NodeSet value
public void set(int position,
DocumentImpl doc,
long nodeId)
set
position - an int valuedoc - a DocumentImpl valuenodeId - a long valuepublic void remove(NodeProxy node)
remove
node - a NodeProxy valuepublic int getLength()
getLength
getLength in interface NodeListgetLength in class AbstractNodeSetint valuepublic int getItemCount()
getItemCount
getItemCount in interface SequencegetItemCount in class AbstractSequenceint valuepublic Node item(int pos)
item
item in interface NodeListitem in class AbstractNodeSetpos - an int value
Node valuepublic NodeProxy get(int pos)
get
get in interface NodeSetget in class AbstractNodeSetpos - an int value
NodeProxy valuepublic Item itemAt(int pos)
itemAt
itemAt in interface SequenceitemAt in class AbstractSequencepos - an int value
Item value
public NodeProxy get(DocumentImpl doc,
NodeId nodeId)
get
doc - a DocumentImpl valuenodeId - a NodeId value
NodeProxy valuepublic NodeProxy get(NodeProxy proxy)
get
get in interface NodeSetget in class AbstractNodeSetproxy - a NodeProxy value
NodeProxy valuepublic NodeSetIterator iterator()
iterator
iterator in interface NodeSetiterator in class AbstractNodeSetNodeSetIterator value
public SequenceIterator iterate()
throws XPathException
Sequence
iterate in interface Sequenceiterate in class AbstractNodeSetXPathException - TODOpublic SequenceIterator unorderedIterator()
Sequence
unorderedIterator in interface SequenceunorderedIterator in class AbstractNodeSetpublic NodeSet intersection(NodeSet other)
intersection
intersection in interface NodeSetintersection in class AbstractNodeSetother - a NodeSet value
NodeSet valuepublic NodeSet union(NodeSet other)
union
union in interface NodeSetunion in class AbstractNodeSetother - a NodeSet value
NodeSet valuepublic NodeSet filterDocuments(NodeSet otherSet)
filterDocuments
filterDocuments in interface NodeSetfilterDocuments in class AbstractNodeSetotherSet - a NodeSet value
NodeSet valuepublic void clearContext()
clearContext
public String toString()
toString
toString in class AbstractNodeSetString value
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||