|
||||||||||
| 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
A sequence that may contain a mixture of atomic values and nodes.
| Field Summary |
| Fields inherited from interface org.exist.xquery.value.Sequence |
EMPTY_SEQUENCE |
| Constructor Summary | |
ValueSequence()
|
|
ValueSequence(Sequence otherSequence)
|
|
| 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. |
DocumentSet |
getDocumentSet()
Returns the set of documents from which the node items in this sequence have been selected. |
int |
getItemType()
Return the primary type to which all items in this sequence belong. |
int |
getLength()
Returns the number of items contained in the sequence. |
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 |
removeDuplicates()
Explicitely remove all duplicate nodes from this sequence. |
void |
sortInDocumentOrder()
|
NodeSet |
toNodeSet()
Makes all in-memory nodes in this sequence persistent, so they can be handled like other node sets. |
java.lang.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, isCached, setIsCached, setSelfAsContext, toJavaObject |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ValueSequence()
public ValueSequence(Sequence otherSequence)
| Method Detail |
public void clear()
public 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 AbstractSequencepublic void addAll(Sequence otherSequence)
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 AbstractSequencepublic int getItemType()
SequenceType.NODE for node sets, Type.ITEM
for other sequences with mixed items.
getItemType in interface SequencegetItemType in class AbstractSequencepublic SequenceIterator iterate()
Sequence
iterate in interface Sequenceiterate in class AbstractSequencepublic SequenceIterator unorderedIterator()
Sequence
unorderedIterator in interface SequenceunorderedIterator in class AbstractSequencepublic int getLength()
Sequence
getLength in interface SequencegetLength in class AbstractSequencepublic Item itemAt(int pos)
Sequence
itemAt in interface SequenceitemAt in class AbstractSequence
public NodeSet toNodeSet()
throws XPathException
XPathException - if the sequence contains items which are not nodes.Sequence.toNodeSet()public boolean isPersistentSet()
isPersistentSet in interface SequenceisPersistentSet in class AbstractSequencepublic void sortInDocumentOrder()
public void removeDuplicates()
Sequence
public void clearContext(int contextId)
Sequence
clearContext in interface SequenceclearContext in class AbstractSequencepublic DocumentSet getDocumentSet()
Sequence
getDocumentSet in interface SequencegetDocumentSet in class AbstractSequencepublic java.lang.String toString()
toString in class AbstractSequence
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||