|
Qizx/Open v0.4p2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents the result of the evaluation of a XML Query, which is a sequence of Items.
The next() method must be repeatedly invoked to check that an item is available.
When next() returns true, the current item value can be retrieved through specialized methods asX() (defined in super-interface Item) according to its type.
Value has often the dual aspect of a sequence and an Item. It is not immutable, because of the next() method. It can be regenerated by bornAgain().
Nested Class Summary | |
static class |
Value.Empty
The empty sequence. |
Field Summary | |
static Value |
empty
The empty sequence (single instance) |
Fields inherited from interface net.xfra.qizxopen.xquery.Item |
INCOMPARABLE |
Method Summary | |
Item |
asAtom()
Gets the current item with atomization. |
Item |
asItem()
Gets the current item (undefined result if end of sequence reached). |
Value |
bornAgain()
Returns a new version of the sequence in its initial state. |
boolean |
next()
Attempts to get the next atomic item. |
boolean |
nextCollection()
Attempts to get the next atomic item, without expanding collections. |
long |
quickCount(EvalContext context)
Optimized evaluation of count() or last(). |
void |
setLazy(boolean lazy)
Boosts iterations that dont need the item value (count(), skipping) |
boolean |
worthExpanding()
Returns true if it is more efficient to keep the value as an iterator, and not to expand it into an array sequence. |
Methods inherited from interface net.xfra.qizxopen.xquery.Item |
asBoolean, asDecimal, asDouble, asFloat, asInteger, asNode, asString, compareTo, deepEqual, getType, isNode |
Field Detail |
public static final Value empty
Method Detail |
public boolean next() throws XQueryException
XQueryException
public boolean nextCollection() throws XQueryException
XQueryException
public Item asItem() throws TypeException
TypeException
public Item asAtom() throws TypeException
TypeException
public Value bornAgain()
next()
method), this is not actually true. Therefore when
a value is used several times (in particular the value of a variable), there is a
need for "regeneration". NOTE: this needs not be a deep copy, because only the state of the iterator is concerned, not the underlying data.
public boolean worthExpanding()
public void setLazy(boolean lazy)
public long quickCount(EvalContext context) throws XQueryException
context
- evaluation context: used for debugging and timeout detection.
XQueryException
|
Copyright Xavier FRANC 2003-2004 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |