Qizx/Open v0.4

net.xfra.qizxopen.xquery.dm
Class NodeBase

java.lang.Object
  |
  +--net.xfra.qizxopen.xquery.dm.NodeBase
All Implemented Interfaces:
Item, Node, Node

public abstract class NodeBase
extends java.lang.Object
implements Node

Abstract base for actual Node implementations.


Field Summary
 
Fields inherited from interface net.xfra.qizxopen.xquery.Item
INCOMPARABLE
 
Fields inherited from interface net.xfra.qizxopen.dm.Node
ATOM_ANY, ATOM_BOOL, ATOM_DATE, ATOM_DOUBLE, ATOM_INT, ATTRIBUTE, COMMENT, DOCUMENT, ELEMENT, NAMESPACE, PROCESSING_INSTRUCTION, TEXT
 
Constructor Summary
NodeBase()
           
 
Method Summary
 boolean asBoolean()
          Gets the item as a boolean value (optimisable).
 java.math.BigDecimal asDecimal()
          Gets the item as a decimal value.
 double asDouble()
          Gets the item as a double value (optimisable).
 float asFloat()
          Gets the item as a float value (optimisable).
 long asInteger()
          Gets the item as a integer value (optimisable).
 Item asItem()
           
 Node asNode()
          Gets the item as a Node value (optimisable).
 java.lang.String asString()
          Gets the item as a String value (optimisable).
 int compareTo(Item that, java.text.Collator collator, int implicitTimeZone)
          Value comparison: equivalent to (untypedAtomic, string-value).
 boolean equals(java.lang.Object that)
          Based on identity, not on string-value.
 ItemType getType()
          Returns the type description.
 int hashCode()
          Based on identity, not on string-value.
 boolean isNode()
          Tests whether the item is a Node.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.xfra.qizxopen.xquery.dm.Node
getAncestors, getAncestorsOrSelf, getAttribute, getAttributes, getAttributes, getChildren, getChildren, getDescendants, getDescendantsOrSelf, getDocument, getFollowing, getFollowingSiblings, getNamespaces, getParent, getParent, getPreceding, getPrecedingSiblings
 
Methods inherited from interface net.xfra.qizxopen.xquery.Item
deepEqual
 
Methods inherited from interface net.xfra.qizxopen.dm.Node
addText, ancestors, ancestorsOrSelf, attribute, attributes, attributes, children, children, compareStringValues, contains, descendants, descendantsOrSelf, docPosition, document, following, followingSiblings, getBaseURI, getChars, getDefinedNSCount, getDocumentURI, getIntegerValue, getNature, getNodeKind, getNodeName, getNsPrefix, getNsUri, getStringValue, getValue, isAtom, isElement, namespaces, orderCompare, parent, parent, preceding, precedingSiblings
 

Constructor Detail

NodeBase

public NodeBase()
Method Detail

getType

public ItemType getType()
Description copied from interface: Item
Returns the type description.

Specified by:
getType in interface Item

isNode

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

Specified by:
isNode in interface Item

asBoolean

public boolean asBoolean()
                  throws TypeException
Description copied from interface: Item
Gets the item as a boolean value (optimisable).

Specified by:
asBoolean in interface Item
TypeException

asInteger

public long asInteger()
               throws TypeException
Description copied from interface: Item
Gets the item as a integer value (optimisable).

Specified by:
asInteger in interface Item
TypeException

asDecimal

public java.math.BigDecimal asDecimal()
                               throws TypeException
Description copied from interface: Item
Gets the item as a decimal value.

Specified by:
asDecimal in interface Item
TypeException

asFloat

public float asFloat()
              throws TypeException
Description copied from interface: Item
Gets the item as a float value (optimisable).

Specified by:
asFloat in interface Item
TypeException

asDouble

public double asDouble()
                throws TypeException
Description copied from interface: Item
Gets the item as a double value (optimisable).

Specified by:
asDouble in interface Item
TypeException

asString

public java.lang.String asString()
                          throws TypeException
Description copied from interface: Item
Gets the item as a String value (optimisable).

Specified by:
asString in interface Item
TypeException

asNode

public Node asNode()
            throws TypeException
Description copied from interface: Item
Gets the item as a Node value (optimisable).

Specified by:
asNode in interface Item
TypeException

asItem

public Item asItem()
            throws TypeException
TypeException

compareTo

public int compareTo(Item that,
                     java.text.Collator collator,
                     int implicitTimeZone)
              throws TypeException
Value comparison: equivalent to (untypedAtomic, string-value). TODO schema import

Specified by:
compareTo in interface Item
TypeException

equals

public boolean equals(java.lang.Object that)
Based on identity, not on string-value.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Based on identity, not on string-value. Redefined here just for documentation purpose.

Overrides:
hashCode in class java.lang.Object

 Copyright Xavier FRANC 2003-2004