Qizx/Open v0.4p2

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
ATOM_ANY, ATOM_BOOL, ATOM_DATE, ATOM_DOUBLE, ATOM_INT, ATTRIBUTE, COMMENT, DOCUMENT, ELEMENT, NAMESPACE, PROCESSING_INSTRUCTION, TEXT
 
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)
          Returns an iterator on ancestors (including the node itself) that match the node test.
 NodeSequence attributes(NodeTest nodeTest)
          Returns an iterator on attributes of this element that match the node test.
 NodeSequence children(NodeTest nodeTest)
          Returns an iterator on children that match the node test.
 int compareStringValues(Node that, java.text.Collator collator)
          Compares the string values of two nodes, optionally using a collation.
 boolean contains(Node node)
          Returns true if this node is an ancestor of the parameter 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)
          Returns an iterator on descendants that match the node test.
 NodeSequence descendantsOrSelf(NodeTest nodeTest)
          Returns an iterator on descendants (including the node itself) that match the node test.
 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)
          Returns an iterator on following nodes that match the node test.
 NodeSequence followingSiblings(NodeTest nodeTest)
          Returns an iterator on following siblings that match the node test.
 java.lang.String getBaseURI()
          Accessor dm:base-uri().
 char[] getChars()
          Gets text contents as a char array.
 int getDefinedNSCount()
          Number of Namespaces defined on this particular node.
 java.lang.String getDocumentURI()
          Returns the URI of the document.
 long getIntegerValue()
          Returns the integer value (attempts to convert).
 QName getNodeName()
          Accessor dm:node-name().
 java.lang.Object getValue()
          Returns the value of an atomic node.
 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)
          Returns an iterator preceding nodes (in document order) that match the node test.
 NodeSequence precedingSiblings(NodeTest nodeTest)
          Returns an iterator on preceding siblings (in document order) that match the node test.
 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, isAtom, 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()
Description copied from interface: Node
Returns the URI of the document.

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 parameter 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)
Description copied from interface: Node
Compares the string values of two nodes, optionally using a collation.

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 particular 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
Gets text contents as a char array. Applicable only to text nodes, PI nodes and attributes.

Specified by:
getChars in interface Node

getValue

public java.lang.Object getValue()
Description copied from interface: Node
Returns the value of an atomic node.

Specified by:
getValue in interface Node
Returns:
Generally a String, but for typed atoms it is an object of class Boolean (ATOM_BOOL), Long (ATOM_INT), Double (ATOM_BOOL) or any class (ATOM_ANY).

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, UnionNodeTest.

ancestorsOrSelf

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

Specified by:
ancestorsOrSelf in interface Node
Parameters:
nodeTest - concrete classes are BaseNodeTest, UnionNodeTest.

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)
Description copied from interface: Node
Returns an iterator on children that match the node test.

Specified by:
children in interface Node

descendants

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

Specified by:
descendants in interface Node

descendantsOrSelf

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

Specified by:
descendantsOrSelf in interface Node

attributes

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

Specified by:
attributes in interface Node

followingSiblings

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

Specified by:
followingSiblings in interface Node

precedingSiblings

public NodeSequence precedingSiblings(NodeTest nodeTest)
Description copied from interface: Node
Returns an iterator on preceding siblings (in document order) that match the node test.

Specified by:
precedingSiblings in interface Node

following

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

Specified by:
following in interface Node

preceding

public NodeSequence preceding(NodeTest nodeTest)
Description copied from interface: Node
Returns an iterator preceding nodes (in document order) that match the node test.

Specified by:
preceding in interface Node

setNextSibling

public void setNextSibling(CoreDM.BaseNode sibling)

 Copyright Xavier FRANC 2003-2004