|
Qizx/open API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.axyana.qizxopen.dm.FONIDataModel.BaseNode
Field Summary |
Fields inherited from interface net.axyana.qizxopen.dm.Node |
ATOM_ANY, ATOM_BOOL, ATOM_DATE, ATOM_DOUBLE, ATOM_INT, ATTRIBUTE, COMMENT, DOCUMENT, ELEMENT, NAMESPACE, PROCESSING_INSTRUCTION, TEXT |
Constructor Summary | |
FONIDataModel.BaseNode()
|
|
FONIDataModel.BaseNode(int id,
FONIDataModel dm)
|
Method Summary | |
void |
addAttribute(Node attribute)
|
void |
addChild(Node child)
|
void |
addText(java.lang.String value)
Adds text inside the node. |
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. |
Node |
attribute(QName name)
Gets an attribute [of this element] by name. |
NodeSequence |
attributes()
Accessor dm:attributes. |
NodeSequence |
attributes(NodeTest nodeTest)
Returns an iterator on attributes that match the node test. |
NodeSequence |
children()
Accessor dm:children. |
NodeSequence |
children(NodeTest nodeTest)
Returns an iterator on children that match the node test. |
int |
compareStringValues(Node node,
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 |
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. |
int |
getDocId()
|
java.lang.String |
getDocumentURI()
Returns the URI of the document. |
FONIDocument |
getDom()
|
long |
getIntegerValue()
Returns the integer value (attempts to convert). |
int |
getNature()
Returns a numeric node kind: DOCUMENT, ELEMENT etc. |
int |
getNodeDepth()
|
int |
getNodeId()
|
java.lang.String |
getNodeKind()
Accessor dm:node-kind(). |
QName |
getNodeName()
Accessor dm:node-name(). |
int |
getNodeSpan()
|
java.lang.String |
getNsPrefix(java.lang.String nsuri)
Returns a matching prefix for the Namespace by looking up the namespace nodes on this element and its ancestors. |
java.lang.String |
getNsUri(java.lang.String prefix)
Returns a matching Namespace for the prefix by looking up the namespace nodes on this element and its ancestors. |
java.lang.String |
getStringValue()
Accessor dm:string-value(). |
java.lang.Object |
getValue()
Returns the value of an atomic node. |
int |
hashCode()
|
boolean |
isAtom()
Convenience: quick test of atomic nodes (text, comment, typed atoms). |
boolean |
isElement()
Convenience: quick test of elements. |
boolean |
isRemote()
Tests whether the node is a remote reference or is local to the JVM. |
NodeSequence |
namespaces(boolean inScope)
Accessor dm:namespaces(). |
int |
orderCompare(Node node)
Returns -1 if this node is strictly before that node in document order, 0 if nodes are identical, 1 if after the that 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. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public FONIDataModel.BaseNode()
public FONIDataModel.BaseNode(int id, FONIDataModel dm)
Method Detail |
public int getDocId() throws DataModelException
DataModelException
public int getNodeId()
public final FONIDocument getDom()
public boolean isRemote()
Node
This helps to choose an optimal strategy to retrieve the node contents: an remote node is more efficiently retrieved using methods like XMLDocument.exportNode.
Note: a node from a CoreDataModel is never remote.
isRemote
in interface Node
public java.lang.String getNodeKind() throws DataModelException
Node
getNodeKind
in interface Node
DataModelException
public QName getNodeName() throws DataModelException
Node
getNodeName
in interface Node
DataModelException
public Node parent() throws DataModelException
Node
parent
in interface Node
DataModelException
public java.lang.String getStringValue() throws DataModelException
Node
Returns the string value of the node. For an element, it is the concatenation of text nodes contained in the element.
getStringValue
in interface Node
DataModelException
public java.lang.String getDocumentURI() throws DataModelException
Node
getDocumentURI
in interface Node
DataModelException
public java.lang.String getBaseURI()
Node
getBaseURI
in interface Node
public NodeSequence children()
Node
Only for Document and Elements: other kinds return an empty sequence.
children
in interface Node
public NodeSequence attributes()
Node
attributes
in interface Node
public int getDefinedNSCount()
Node
getDefinedNSCount
in interface Node
public NodeSequence namespaces(boolean inScope)
Node
namespaces
in interface Node
inScope
- if true, return the closure of in-scope namespaces,
else the namespaces defined specifically on this node.public int docPosition() throws DataModelException
Node
docPosition
in interface Node
DataModelException
public int getNature() throws DataModelException
Node
getNature
in interface Node
DataModelException
public boolean isElement() throws DataModelException
Node
isElement
in interface Node
DataModelException
public boolean isAtom() throws DataModelException
Node
isAtom
in interface Node
DataModelException
public Node document() throws DataModelException
Node
document
in interface Node
DataModelException
public java.lang.String toString()
public Node attribute(QName name) throws DataModelException
Node
attribute
in interface Node
DataModelException
public java.lang.String getNsPrefix(java.lang.String nsuri) throws DataModelException
Node
getNsPrefix
in interface Node
DataModelException
public java.lang.String getNsUri(java.lang.String prefix) throws DataModelException
Node
getNsUri
in interface Node
DataModelException
public int orderCompare(Node node)
Node
orderCompare
in interface Node
public boolean contains(Node node)
Node
contains
in interface Node
public int getNodeSpan() throws DataModelException
DataModelException
public int getNodeDepth() throws DataModelException
DataModelException
public boolean equals(java.lang.Object that)
public int hashCode()
public boolean deepEqual(Node node, java.text.Collator collator) throws DataModelException
DataModelException
public int compareStringValues(Node node, java.text.Collator collator) throws DataModelException
Node
compareStringValues
in interface Node
DataModelException
public NodeSequence ancestors(NodeTest nodeTest)
Node
ancestors
in interface Node
nodeTest
- concrete classes are BaseNodeTest, UnionNodeTest.public NodeSequence ancestorsOrSelf(NodeTest nodeTest)
Node
ancestorsOrSelf
in interface Node
nodeTest
- concrete classes are BaseNodeTest, UnionNodeTest.public NodeSequence parent(NodeTest nodeTest)
Node
parent
in interface Node
public NodeSequence children(NodeTest nodeTest)
Node
children
in interface Node
public NodeSequence descendants(NodeTest nodeTest)
Node
descendants
in interface Node
public NodeSequence descendantsOrSelf(NodeTest nodeTest)
Node
descendantsOrSelf
in interface Node
public NodeSequence attributes(NodeTest nodeTest)
Node
attributes
in interface Node
public NodeSequence followingSiblings(NodeTest nodeTest)
Node
followingSiblings
in interface Node
public NodeSequence precedingSiblings(NodeTest nodeTest)
Node
precedingSiblings
in interface Node
public NodeSequence following(NodeTest nodeTest)
Node
following
in interface Node
public NodeSequence preceding(NodeTest nodeTest)
Node
preceding
in interface Node
public void addChild(Node child)
public void addAttribute(Node attribute)
public void addText(java.lang.String value)
Node
Caution: Some implementations do not support modification and can raise a run-time exception.
addText
in interface Node
public char[] getChars() throws DataModelException
Node
getChars
in interface Node
DataModelException
public java.lang.Object getValue() throws DataModelException
Node
getValue
in interface Node
DataModelException
public long getIntegerValue() throws DataModelException
Node
getIntegerValue
in interface Node
DataModelException
- if not convertible to integer.
|
© 2005 Axyana Software | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |