Qizx/open API

net.axyana.qizxopen.xquery
Interface XQItem

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
XQNode, XQValue
All Known Implementing Classes:
net.axyana.qizxopen.xquery.dt.BaseValue, NodeBase, XQFONIDataModel.INode, XQResultSequence

public interface XQItem
extends java.io.Serializable

XQuery abstract Item representation.

The type of the item (XQItemType) is returned by method getType().

Specialized methods getXXX() allow to retrieve or convert the actual item value according to the type. An exception (XQTypeException) is raised if the conversion is not possible.


Field Summary
static int INCOMPARABLE
          Returned by method compareTo when the two values are not comparable.
 
Method Summary
 int compareTo(XQItem that, java.text.Collator collator, int implicitTimeZone)
          Compares two items.
 boolean deepEqual(XQItem item, java.text.Collator collator)
          Deep equality of two items.
 boolean getBoolean()
          Gets the item as a boolean value.
 java.math.BigDecimal getDecimal()
          Gets the item as a decimal value.
 double getDouble()
          Gets the item as a double value.
 float getFloat()
          Gets the item as a float value.
 long getInteger()
          Gets the item as a integer value.
 XQNode getNode()
          Gets the item as a Node value.
 java.lang.String getString()
          Gets the item as a String value.
 XQItemType getType()
          Returns the type description.
 boolean isNode()
          Tests whether the item is a Node.
 

Field Detail

INCOMPARABLE

public static final int INCOMPARABLE
Returned by method compareTo when the two values are not comparable.

See Also:
Constant Field Values
Method Detail

getType

public XQItemType getType()
                   throws XQEvalException
Returns the type description.

Throws:
XQEvalException

getBoolean

public boolean getBoolean()
                   throws XQEvalException
Gets the item as a boolean value.

Throws:
XQEvalException

getFloat

public float getFloat()
               throws XQEvalException
Gets the item as a float value.

Throws:
XQEvalException

getDouble

public double getDouble()
                 throws XQEvalException
Gets the item as a double value.

Throws:
XQEvalException

getInteger

public long getInteger()
                throws XQEvalException
Gets the item as a integer value.

Throws:
XQEvalException

getDecimal

public java.math.BigDecimal getDecimal()
                                throws XQEvalException
Gets the item as a decimal value.

Throws:
XQEvalException

getString

public java.lang.String getString()
                           throws XQEvalException
Gets the item as a String value.

Throws:
XQEvalException

getNode

public XQNode getNode()
               throws XQEvalException
Gets the item as a Node value.

Throws:
XQEvalException

isNode

public boolean isNode()
Tests whether the item is a Node.


compareTo

public int compareTo(XQItem that,
                     java.text.Collator collator,
                     int implicitTimeZone)
              throws XQEvalException
Compares two items.

Returns:
0 if items are equal; -1 if this < that; 1 if this > that; INCOMPARABLE if no order is defined, or items are of different nature (no exception raised).
Throws:
XQEvalException

deepEqual

public boolean deepEqual(XQItem item,
                         java.text.Collator collator)
                  throws XQEvalException
Deep equality of two items.

Throws:
XQEvalException

© 2005 Axyana Software