|
|||||||
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.Sequence |
---|
EMPTY_SEQUENCE |
Constructor Summary | |
---|---|
ValueSequence()
|
|
ValueSequence(int initialSize)
|
|
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. |
Iterator |
getCollectionIterator()
Return an iterator on all collections referenced by documents contained in this sequence.. |
DocumentSet |
getDocumentSet()
Returns the set of documents from which the node items in this sequence have been selected. |
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. |
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 |
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 |
sortInDocumentOrder()
|
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 |
Constructor Detail |
---|
public ValueSequence()
public ValueSequence(int initialSize)
public ValueSequence(Sequence otherSequence) throws XPathException
XPathException
Method Detail |
---|
public void clear()
public boolean isEmpty()
Sequence
isEmpty
in interface Sequence
isEmpty
in class AbstractSequence
true
is the sequence is emptypublic boolean hasOne()
Sequence
hasOne
in interface Sequence
hasOne
in class AbstractSequence
true
is the sequence has just one itempublic void add(Item item)
Sequence
XPathException
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 Sequence
add
in class AbstractSequence
public void addAll(Sequence otherSequence) throws XPathException
Sequence
XPathException
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 Sequence
addAll
in class AbstractSequence
XPathException
public int getItemType()
Sequence
Type.NODE
for node sets, Type.ITEM
for other sequences with mixed items.
getItemType
in interface Sequence
getItemType
in class AbstractSequence
public SequenceIterator iterate() throws XPathException
Sequence
iterate
in interface Sequence
iterate
in class AbstractSequence
XPathException
- TODOpublic SequenceIterator unorderedIterator()
Sequence
unorderedIterator
in interface Sequence
unorderedIterator
in class AbstractSequence
public int getItemCount()
Sequence
getItemCount
in interface Sequence
getItemCount
in class AbstractSequence
public Item itemAt(int pos)
Sequence
itemAt
in interface Sequence
itemAt
in class AbstractSequence
public void setHolderVariable(Variable var)
public NodeSet toNodeSet() throws XPathException
XPathException
- if the sequence contains items which are not nodes.Sequence.toNodeSet()
public boolean isPersistentSet()
isPersistentSet
in interface Sequence
isPersistentSet
in class AbstractSequence
public void sortInDocumentOrder()
public void removeDuplicates()
Sequence
public void clearContext(int contextId)
Sequence
clearContext
in interface Sequence
clearContext
in class AbstractSequence
public void nodeMoved(NodeId oldNodeId, StoredNode newNode)
Sequence
nodeMoved
in interface Sequence
nodeMoved
in class AbstractSequence
UpdateListener
public int getState()
getState
in interface Sequence
getState
in class AbstractSequence
public boolean hasChanged(int previousState)
hasChanged
in interface Sequence
hasChanged
in class AbstractSequence
public boolean isCacheable()
isCacheable
in interface Sequence
isCacheable
in class AbstractSequence
public DocumentSet getDocumentSet()
Sequence
getDocumentSet
in interface Sequence
getDocumentSet
in class AbstractSequence
public Iterator getCollectionIterator()
Sequence
getCollectionIterator
in interface Sequence
getCollectionIterator
in class AbstractSequence
public String toString()
toString
in class AbstractSequence
public String getHashKey()
GroupedValueSequenceTable
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |