Qizx/Open v0.3

net.xfra.qizxopen.dm
Class CoreDM.BaseNode

java.lang.Object
  |
  +--net.xfra.qizxopen.dm.CoreDM.BaseNode
All Implemented Interfaces:
Node
Enclosing class:
CoreDM

public abstract static class CoreDM.BaseNode
extends java.lang.Object
implements Node

[Internal].


Field Summary
 CoreDM.BaseNode nextSibling
           
 int order
           
 net.xfra.qizxopen.dm.CoreDM.Element parent
           
 
Fields inherited from interface net.xfra.qizxopen.dm.Node
ATTRIBUTE, COMMENT, DOCUMENT, ELEMENT, NAMESPACE, PROCESSING_INSTRUCTION, TEXT, TYPE_BINARY, TYPE_BOOLEAN, TYPE_DATETIME, TYPE_DOUBLE, TYPE_INTEGER, TYPE_NODE, TYPE_STRING
 
Constructor Summary
CoreDM.BaseNode()
           
 
Method Summary
 void addNamespace(java.lang.String prefix, java.lang.String value)
           
 NodeSequence ancestors(NodeTest nodeTest)
          Returns an iterator on ancestors that match the node test.
 NodeSequence ancestorsOrSelf(NodeTest nodeTest)
           
 NodeSequence attributes(NodeTest nodeTest)
           
 NodeSequence children(NodeTest nodeTest)
           
 int compareStringValues(Node that, java.text.Collator collator)
           
 boolean contains(Node node)
          Returns true if this node is an ancestor of the node, or the node itself.
 boolean deepEq(Node that, java.text.Collator collator)
           
 boolean deepEqual(Node node, java.text.Collator collator)
           
 NodeSequence descendants(NodeTest nodeTest)
           
 NodeSequence descendantsOrSelf(NodeTest nodeTest)
           
 int docPosition()
          Returns an arbitrary value that is stable on the whole document (for order comparison).
 Node document()
          Returns the document node if any, else the top-level node.
 boolean equals(java.lang.Object that)
           
 NodeSequence following(NodeTest nodeTest)
           
 NodeSequence followingSiblings(NodeTest nodeTest)
           
 int getAtomType()
          returns the real type of the atom value: TYPE_STRING, TYPE_BINARY, etc.
 java.lang.Object getAtomValue()
          Returns the real value of the atom: byte[], Boolean, Date, Double, Long, String.
 java.lang.String getBaseURI()
          Accessor dm:base-uri().
 char[] getChars()
          get text as char array (atomic nodes only).
 int getDefinedNSCount()
          Number of Namespaces defined on this node.
 java.lang.String getDocumentURI()
           
 double getDoubleValue()
          Returns the double value (attempts to convert).
 long getIntegerValue()
          Returns the integer value (attempts to convert).
 QName getNodeName()
          Accessor dm:node-name().
 CoreDM.BaseNode nodeAfter()
           
 CoreDM.BaseNode nodeNext()
           
 int orderCompare(Node node)
          Returns -1 if this node is strictly before the argument node in document order, 0 if nodes are identical, 1 if after the argument node.
 Node parent()
          Accessor dm:parent().
 NodeSequence parent(NodeTest nodeTest)
          Returns a sequence of length 1 (if the parent matches the nodeTest) else 0.
 NodeSequence preceding(NodeTest nodeTest)
          Preceding nodes in document order.
 NodeSequence precedingSiblings(NodeTest nodeTest)
          Preceding siblings in document order.
 void setNextSibling(CoreDM.BaseNode sibling)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.xfra.qizxopen.dm.Node
addText, attribute, attributes, children, getNature, getNodeKind, getNsPrefix, getNsUri, getStringValue, isElement, namespaces
 

Field Detail

parent

public net.xfra.qizxopen.dm.CoreDM.Element parent

nextSibling

public CoreDM.BaseNode nextSibling

order

public int order
Constructor Detail

CoreDM.BaseNode

public CoreDM.BaseNode()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getBaseURI

public java.lang.String getBaseURI()
Description copied from interface: Node
Accessor dm:base-uri().

Specified by:
getBaseURI in interface Node

getDocumentURI

public java.lang.String getDocumentURI()
Specified by:
getDocumentURI in interface Node

getNodeName

public QName getNodeName()
Description copied from interface: Node
Accessor dm:node-name().

Specified by:
getNodeName in interface Node
Returns:
null if the node has no name (document, text, comment, pi).

parent

public Node parent()
Description copied from interface: Node
Accessor dm:parent().

Specified by:
parent in interface Node
Returns:
null if the node has no parent.

document

public Node document()
Description copied from interface: Node
Returns the document node if any, else the top-level node.

Specified by:
document in interface Node

orderCompare

public int orderCompare(Node node)
Description copied from interface: Node
Returns -1 if this node is strictly before the argument node in document order, 0 if nodes are identical, 1 if after the argument node. If the two nodes belong to different documents, returns an arbitrary but stable "order of documents".

Specified by:
orderCompare in interface Node

contains

public boolean contains(Node node)
Description copied from interface: Node
Returns true if this node is an ancestor of the node, or the node itself.

Specified by:
contains in interface Node

equals

public boolean equals(java.lang.Object that)
Overrides:
equals in class java.lang.Object

deepEqual

public boolean deepEqual(Node node,
                         java.text.Collator collator)

deepEq

public boolean deepEq(Node that,
                      java.text.Collator collator)

compareStringValues

public int compareStringValues(Node that,
                               java.text.Collator collator)
Specified by:
compareStringValues in interface Node

nodeNext

public CoreDM.BaseNode nodeNext()

nodeAfter

public CoreDM.BaseNode nodeAfter()

docPosition

public int docPosition()
Description copied from interface: Node
Returns an arbitrary value that is stable on the whole document (for order comparison).

Specified by:
docPosition in interface Node

getDefinedNSCount

public int getDefinedNSCount()
Description copied from interface: Node
Number of Namespaces defined on this node.

Specified by:
getDefinedNSCount in interface Node

addNamespace

public void addNamespace(java.lang.String prefix,
                         java.lang.String value)

getChars

public char[] getChars()
Description copied from interface: Node
get text as char array (atomic nodes only).

Specified by:
getChars in interface Node

getAtomValue

public java.lang.Object getAtomValue()
Description copied from interface: Node
Returns the real value of the atom: byte[], Boolean, Date, Double, Long, String.

Specified by:
getAtomValue in interface Node

getAtomType

public int getAtomType()
Description copied from interface: Node
returns the real type of the atom value: TYPE_STRING, TYPE_BINARY, etc.

Specified by:
getAtomType in interface Node

getDoubleValue

public double getDoubleValue()
                      throws DataModelException
Description copied from interface: Node
Returns the double value (attempts to convert).

Specified by:
getDoubleValue in interface Node
Throws:
DataModelException - if not convertible to double.

getIntegerValue

public long getIntegerValue()
                     throws DataModelException
Description copied from interface: Node
Returns the integer value (attempts to convert).

Specified by:
getIntegerValue in interface Node
Throws:
DataModelException - if not convertible to integer.

ancestors

public NodeSequence ancestors(NodeTest nodeTest)
Description copied from interface: Node
Returns an iterator on ancestors that match the node test.

Specified by:
ancestors in interface Node
Parameters:
nodeTest - concrete classes are BaseNodeTest(node-kind?, nsuri?, ncname?), UnionNodeTest, DocumentTest.

ancestorsOrSelf

public NodeSequence ancestorsOrSelf(NodeTest nodeTest)
Specified by:
ancestorsOrSelf in interface Node

parent

public NodeSequence parent(NodeTest nodeTest)
Description copied from interface: Node
Returns a sequence of length 1 (if the parent matches the nodeTest) else 0.

Specified by:
parent in interface Node

children

public NodeSequence children(NodeTest nodeTest)
Specified by:
children in interface Node

descendants

public NodeSequence descendants(NodeTest nodeTest)
Specified by:
descendants in interface Node

descendantsOrSelf

public NodeSequence descendantsOrSelf(NodeTest nodeTest)
Specified by:
descendantsOrSelf in interface Node

attributes

public NodeSequence attributes(NodeTest nodeTest)
Specified by:
attributes in interface Node

followingSiblings

public NodeSequence followingSiblings(NodeTest nodeTest)
Specified by:
followingSiblings in interface Node

precedingSiblings

public NodeSequence precedingSiblings(NodeTest nodeTest)
Description copied from interface: Node
Preceding siblings in document order.

Specified by:
precedingSiblings in interface Node

following

public NodeSequence following(NodeTest nodeTest)
Specified by:
following in interface Node

preceding

public NodeSequence preceding(NodeTest nodeTest)
Description copied from interface: Node
Preceding nodes in document order.

Specified by:
preceding in interface Node

setNextSibling

public void setNextSibling(CoreDM.BaseNode sibling)

 Copyright Xavier FRANC 2003-2004