|
|||||||
| 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.xquery.value.ValueSequence
public class ValueSequence
A sequence that may contain a mixture of atomic values and nodes.
| Field Summary |
|---|
| Fields inherited from interface org.exist.xquery.value.MemoryNodeSet |
|---|
EMPTY |
| Fields inherited from interface org.exist.xquery.value.Sequence |
|---|
EMPTY_SEQUENCE |
| Constructor Summary | |
|---|---|
ValueSequence()
|
|
ValueSequence(boolean ordered)
|
|
ValueSequence(int initialSize)
|
|
ValueSequence(Sequence otherSequence)
|
|
ValueSequence(Sequence otherSequence,
boolean ordered)
|
|
| Method Summary | |
|---|---|
void |
add(Item item)
Add an item to the current sequence. |
void |
addAll(Sequence otherSequence)
Add all items of the other sequence to this item. |
void |
clear()
|
void |
clearContext(int contextId)
For every item in the sequence, clear any context-dependant information that is stored during query processing. |
Sequence |
getAncestors(boolean includeSelf,
NodeTest test)
|
Sequence |
getAttributes(NodeTest test)
|
Sequence |
getChildren(NodeTest test)
|
Iterator |
getCollectionIterator()
Return an iterator on all collections referenced by documents contained in this sequence.. |
Sequence |
getDescendantAttributes(NodeTest test)
|
Sequence |
getDescendants(boolean includeSelf,
NodeTest test)
|
DocumentSet |
getDocumentSet()
Returns the set of documents from which the node items in this sequence have been selected. |
Sequence |
getFollowing(NodeTest test)
|
Sequence |
getFollowingSiblings(NodeTest test)
|
String |
getHashKey()
Returns a hashKey based on sequence item string values. |
int |
getItemCount()
Returns the number of items contained in the sequence. |
int |
getItemType()
Return the primary type to which all items in this sequence belong. |
Sequence |
getParents(NodeTest test)
|
Sequence |
getPreceding(NodeTest test)
|
Sequence |
getPrecedingSiblings(NodeTest test)
|
Sequence |
getSelf(NodeTest test)
|
int |
getState()
|
boolean |
hasChanged(int previousState)
|
boolean |
hasOne()
Returns whether the sequence has just one item or not. |
boolean |
isCacheable()
|
boolean |
isEmpty()
Returns whether the sequence is empty or not. |
boolean |
isInMemorySet()
|
boolean |
isOrdered()
|
boolean |
isPersistentSet()
|
Item |
itemAt(int pos)
Returns the item located at the specified position within this sequence. |
SequenceIterator |
iterate()
Returns an iterator over all items in the sequence. |
void |
nodeMoved(NodeId oldNodeId,
StoredNode newNode)
Node sets may implement this method to be informed of storage address and node id changes after updates. |
void |
removeDuplicates()
Explicitely remove all duplicate nodes from this sequence. |
void |
setHolderVariable(Variable var)
|
void |
setIsOrdered(boolean ordered)
|
void |
sortInDocumentOrder()
|
MemoryNodeSet |
toMemNodeSet()
Convert the sequence into an in-memory node set. |
NodeSet |
toNodeSet()
Makes all in-memory nodes in this sequence persistent, so they can be handled like other node sets. |
String |
toString()
|
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, hasMany, isCached, setIsCached, 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, hasMany, isCached, setIsCached, setSelfAsContext, toJavaObject |
| Constructor Detail |
|---|
public ValueSequence()
public ValueSequence(boolean ordered)
public ValueSequence(int initialSize)
public ValueSequence(Sequence otherSequence)
throws XPathException
XPathException
public ValueSequence(Sequence otherSequence,
boolean ordered)
throws XPathException
XPathException| Method Detail |
|---|
public void clear()
public boolean isEmpty()
Sequence
isEmpty in interface SequenceisEmpty in class AbstractSequencetrue is the sequence is emptypublic boolean hasOne()
Sequence
hasOne in interface SequencehasOne in class AbstractSequencetrue is the sequence has just one itempublic void add(Item item)
SequenceXPathException may be thrown
if the item's type is incompatible with this type of sequence (e.g. if the sequence
is a node set).
The sequence may or may not allow duplicate values.
add in interface Sequenceadd in class AbstractSequence
public void addAll(Sequence otherSequence)
throws XPathException
SequenceXPathException may
be thrown if the type of the items in the other sequence is incompatible with
the primary type of this sequence.
addAll in interface SequenceaddAll in class AbstractSequenceXPathExceptionpublic int getItemType()
SequenceType.NODE for node sets, Type.ITEM
for other sequences with mixed items.
getItemType in interface SequencegetItemType in class AbstractSequence
public SequenceIterator iterate()
throws XPathException
Sequence
iterate in interface Sequenceiterate in class AbstractSequenceXPathException - TODOpublic SequenceIterator unorderedIterator()
Sequence
unorderedIterator in interface SequenceunorderedIterator in class AbstractSequencepublic boolean isOrdered()
public void setIsOrdered(boolean ordered)
public int getItemCount()
Sequence
getItemCount in interface SequencegetItemCount in class AbstractSequencepublic Item itemAt(int pos)
Sequence
itemAt in interface SequenceitemAt in class AbstractSequencepublic void setHolderVariable(Variable var)
public NodeSet toNodeSet()
throws XPathException
toNodeSet in interface SequenceXPathException - if the sequence contains items which are not nodes.Sequence.toNodeSet()
public MemoryNodeSet toMemNodeSet()
throws XPathException
SequenceSequence.isPersistentSet() to check
if the sequence is a persistent node set.
toMemNodeSet in interface SequenceXPathException - if the sequence contains items which are not nodes or is
a persistent node setpublic boolean isInMemorySet()
public boolean isPersistentSet()
isPersistentSet in interface SequenceisPersistentSet in class AbstractSequencepublic void sortInDocumentOrder()
public void removeDuplicates()
Sequence
removeDuplicates in interface Sequencepublic void clearContext(int contextId)
Sequence
clearContext in interface SequenceclearContext in class AbstractSequence
public void nodeMoved(NodeId oldNodeId,
StoredNode newNode)
Sequence
nodeMoved in interface SequencenodeMoved in class AbstractSequenceUpdateListenerpublic int getState()
getState in interface SequencegetState in class AbstractSequencepublic boolean hasChanged(int previousState)
hasChanged in interface SequencehasChanged in class AbstractSequencepublic boolean isCacheable()
isCacheable in interface SequenceisCacheable in class AbstractSequencepublic DocumentSet getDocumentSet()
Sequence
getDocumentSet in interface SequencegetDocumentSet in class AbstractSequence
public Sequence getAttributes(NodeTest test)
throws XPathException
getAttributes in interface MemoryNodeSetXPathException
public Sequence getDescendantAttributes(NodeTest test)
throws XPathException
getDescendantAttributes in interface MemoryNodeSetXPathException
public Sequence getChildren(NodeTest test)
throws XPathException
getChildren in interface MemoryNodeSetXPathException
public Sequence getDescendants(boolean includeSelf,
NodeTest test)
throws XPathException
getDescendants in interface MemoryNodeSetXPathException
public Sequence getAncestors(boolean includeSelf,
NodeTest test)
throws XPathException
getAncestors in interface MemoryNodeSetXPathException
public Sequence getParents(NodeTest test)
throws XPathException
getParents in interface MemoryNodeSetXPathException
public Sequence getSelf(NodeTest test)
throws XPathException
getSelf in interface MemoryNodeSetXPathException
public Sequence getPrecedingSiblings(NodeTest test)
throws XPathException
getPrecedingSiblings in interface MemoryNodeSetXPathException
public Sequence getPreceding(NodeTest test)
throws XPathException
getPreceding in interface MemoryNodeSetXPathException
public Sequence getFollowingSiblings(NodeTest test)
throws XPathException
getFollowingSiblings in interface MemoryNodeSetXPathException
public Sequence getFollowing(NodeTest test)
throws XPathException
getFollowing in interface MemoryNodeSetXPathExceptionpublic Iterator getCollectionIterator()
Sequence
getCollectionIterator in interface SequencegetCollectionIterator in class AbstractSequencepublic String toString()
toString in class AbstractSequencepublic String getHashKey()
GroupedValueSequenceTable
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||