|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectorg.exist.xquery.value.AbstractSequence
public abstract class AbstractSequence
An abstract implementation of Sequence with
default implementations for some methods.
| Field Summary |
|---|
| Fields inherited from interface org.exist.xquery.value.Sequence |
|---|
EMPTY_SEQUENCE |
| Method Summary | |
|---|---|
abstract void |
add(Item item)
Add an item to the current sequence. |
void |
addAll(Sequence other)
Add all items of the other sequence to this item. |
void |
clearContext(int contextId)
For every item in the sequence, clear any context-dependant information that is stored during query processing. |
int |
conversionPreference(Class javaClass)
Returns a preference indicator, indicating the preference of a value to be converted into the given Java class. |
AtomicValue |
convertTo(int requiredType)
Try to convert the sequence into an atomic value. |
boolean |
effectiveBooleanValue()
See 2.4.3 Effective Boolean Value |
int |
getCardinality()
Returns the cardinality of this sequence. |
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. |
abstract int |
getItemCount()
Returns the number of items contained in the sequence. |
abstract int |
getItemType()
Return the primary type to which all items in this sequence belong. |
String |
getStringValue()
Convert the sequence to a string. |
boolean |
hasMany()
Returns whether the sequence more than one item or not. |
abstract boolean |
hasOne()
Returns whether the sequence has just one item or not. |
boolean |
isCached()
Returns true if the sequence is the result of a previous operation and has been cached. |
abstract boolean |
isEmpty()
Returns whether the sequence is empty or not. |
boolean |
isPersistentSet()
|
abstract Item |
itemAt(int pos)
Returns the item located at the specified position within this sequence. |
abstract 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 |
setIsCached(boolean cached)
Indicates that the sequence is the result of a previous operation and has not been recomputed. |
void |
setSelfAsContext(int contextId)
|
Object |
toJavaObject(Class target)
Convert the value into an instance of the specified Java class. |
String |
toString()
|
abstract SequenceIterator |
unorderedIterator()
Returns an iterator over all items in the sequence. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.exist.xquery.value.Sequence |
|---|
removeDuplicates, toNodeSet |
| Method Detail |
|---|
public abstract int getItemType()
SequenceType.NODE for node sets, Type.ITEM
for other sequences with mixed items.
getItemType in interface Sequence
public abstract SequenceIterator iterate()
throws XPathException
Sequence
iterate in interface SequenceXPathException - TODOpublic abstract SequenceIterator unorderedIterator()
Sequence
unorderedIterator in interface Sequencepublic abstract int getItemCount()
Sequence
getItemCount in interface Sequencepublic int getCardinality()
SequenceCardinality.
getCardinality in interface SequenceCardinality
public AtomicValue convertTo(int requiredType)
throws XPathException
SequenceType. An XPathException
is thrown if the conversion is impossible.
convertTo in interface SequencerequiredType - one of the type constants defined in class Type
XPathExceptionpublic abstract boolean isEmpty()
Sequence
isEmpty in interface Sequencetrue is the sequence is emptypublic abstract boolean hasOne()
Sequence
hasOne in interface Sequencetrue is the sequence has just one itempublic boolean hasMany()
Sequence
hasMany in interface Sequencetrue is the sequence more than one item
public String getStringValue()
throws XPathException
Sequence
getStringValue in interface SequenceXPathExceptionpublic String toString()
toString in class Object
public abstract void add(Item item)
throws XPathException
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 SequenceXPathException
public void addAll(Sequence other)
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 SequenceXPathExceptionpublic abstract Item itemAt(int pos)
Sequence
itemAt in interface Sequencepublic DocumentSet getDocumentSet()
Sequence
getDocumentSet in interface Sequencepublic Iterator getCollectionIterator()
Sequence
getCollectionIterator in interface Sequence
public void nodeMoved(NodeId oldNodeId,
StoredNode newNode)
Sequence
nodeMoved in interface SequenceUpdateListener
public boolean effectiveBooleanValue()
throws XPathException
effectiveBooleanValue in interface SequenceXPathExceptionSequence.effectiveBooleanValue()public int conversionPreference(Class javaClass)
Sequence
conversionPreference in interface Sequence
public Object toJavaObject(Class target)
throws XPathException
Sequence
toJavaObject in interface SequenceXPathExceptionpublic void clearContext(int contextId)
Sequence
clearContext in interface Sequencepublic void setSelfAsContext(int contextId)
setSelfAsContext in interface Sequencepublic boolean isCached()
Sequence
isCached in interface Sequencepublic void setIsCached(boolean cached)
Sequence
setIsCached in interface Sequencepublic boolean isPersistentSet()
isPersistentSet in interface Sequence
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||