Qizx/open API

net.axyana.qizxopen.xquery
Class Empty

java.lang.Object
  extended bynet.axyana.qizxopen.xquery.dt.BaseValue
      extended bynet.axyana.qizxopen.xquery.Empty
All Implemented Interfaces:
java.io.Serializable, XQItem, XQValue

public class Empty
extends net.axyana.qizxopen.xquery.dt.BaseValue

The empty sequence (unique instance).

See Also:
Serialized Form

Field Summary
static XQValue sequence
           
 
Fields inherited from interface net.axyana.qizxopen.xquery.XQItem
INCOMPARABLE
 
Constructor Summary
Empty()
           
 
Method Summary
 XQItem asAtom()
          Gets the current item with atomization.
 XQValue bornAgain()
          Returns a new version of the sequence in its initial state.
 int compareTo(XQItem that, EvalContext context)
          Compares two items.
 net.axyana.qizxopen.util.time.Duration getDuration()
          Gets the item as a Duration value.
 XQItem getItem()
          Gets the current item (undefined result if end of sequence reached).
 net.axyana.qizxopen.util.time.DateTimeBase getMoment()
          Gets the item as a Duration value.
 XQItemType getType()
          Returns the type description.
 boolean isNode()
          Tests whether the item is a Node.
 boolean next()
          Attempts to get the next atomic item.
 
Methods inherited from class net.axyana.qizxopen.xquery.dt.BaseValue
deepEqual, getBoolean, getDecimal, getDouble, getFloat, getInteger, getNode, getString, hasQuickIndex, nextCollection, quickCount, quickIndex, setLazy, worthExpanding
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sequence

public static XQValue sequence
Constructor Detail

Empty

public Empty()
Method Detail

getType

public XQItemType getType()
Description copied from interface: XQItem
Returns the type description.


next

public boolean next()
Description copied from interface: XQValue
Attempts to get the next atomic item. If true is returned, the item value is available through one of the specialized accessors.


bornAgain

public XQValue bornAgain()
Description copied from interface: XQValue
Returns a new version of the sequence in its initial state. Value objects are in principle immutable, but due to the iterative implementation style (see the XQValue.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.


isNode

public boolean isNode()
Description copied from interface: XQItem
Tests whether the item is a Node.


getItem

public XQItem getItem()
               throws XQTypeException
Description copied from interface: XQValue
Gets the current item (undefined result if end of sequence reached).

Throws:
XQTypeException

asAtom

public XQItem asAtom()
              throws XQTypeException
Description copied from interface: XQValue
Gets the current item with atomization. If the current item is a Node, it is transparently transformed into a sequence of atomic values (in the future schema-aware implementation), or simply to its string value (in XQuery Basic).

Throws:
XQTypeException

compareTo

public int compareTo(XQItem that,
                     EvalContext context)
Description copied from interface: XQItem
Compares two items.


getDuration

public net.axyana.qizxopen.util.time.Duration getDuration()
                                                   throws XQEvalException
Description copied from interface: XQItem
Gets the item as a Duration value.

Throws:
XQEvalException

getMoment

public net.axyana.qizxopen.util.time.DateTimeBase getMoment()
                                                     throws XQEvalException
Description copied from interface: XQItem
Gets the item as a Duration value.

Throws:
XQEvalException

© 2005 Axyana Software