|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exist.xquery.value.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 |
| Constructor Summary | |
protected |
AbstractSequence()
|
| 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(java.lang.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. |
DocumentSet |
getDocumentSet()
Returns the set of documents from which the node items in this sequence have been selected. |
abstract int |
getItemType()
Return the primary type to which all items in this sequence belong. |
abstract int |
getLength()
Returns the number of items contained in the sequence. |
java.lang.String |
getStringValue()
Convert the sequence to a string. |
boolean |
isCached()
Returns true if the sequence is the result of a previous operation and has been cached. |
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 |
setIsCached(boolean cached)
Indicates that the sequence is the result of a previous operation and has not been recomputed. |
void |
setSelfAsContext(int contextId)
|
java.lang.Object |
toJavaObject(java.lang.Class target)
Convert the value into an instance of the specified Java class. |
java.lang.String |
toString()
|
abstract SequenceIterator |
unorderedIterator()
Returns an iterator over all items in the sequence. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.exist.xquery.value.Sequence |
removeDuplicates, toNodeSet |
| Constructor Detail |
protected AbstractSequence()
| Method Detail |
public abstract int getItemType()
SequenceType.NODE for node sets, Type.ITEM
for other sequences with mixed items.
getItemType in interface Sequencepublic abstract SequenceIterator iterate()
Sequence
iterate in interface Sequencepublic abstract SequenceIterator unorderedIterator()
Sequence
unorderedIterator in interface Sequencepublic abstract int getLength()
Sequence
getLength 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
XPathException
public java.lang.String getStringValue()
throws XPathException
Sequence
getStringValue in interface SequenceXPathExceptionpublic java.lang.String toString()
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 Sequenceitem -
XPathException
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 Sequenceother -
XPathExceptionpublic abstract Item itemAt(int pos)
Sequence
itemAt in interface Sequencepos -
public DocumentSet getDocumentSet()
Sequence
getDocumentSet in interface Sequence
public boolean effectiveBooleanValue()
throws XPathException
effectiveBooleanValue in interface SequenceXPathExceptionSequence.effectiveBooleanValue()public int conversionPreference(java.lang.Class javaClass)
Sequence
conversionPreference in interface SequencejavaClass -
public java.lang.Object toJavaObject(java.lang.Class target)
throws XPathException
Sequence
toJavaObject in interface Sequencetarget -
XPathExceptionpublic 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 Sequencecached - public boolean isPersistentSet()
isPersistentSet in interface Sequence
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||