|
Qizx/open 4.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Node
Nodes of the Document Data Model, as defined by XQuery1/XPath2, plus extensions.
Caution: a node of a Data Model can be represented by several
different instances of Node. Therefore Node instances should never be
compared with ==, but with the equals
method, or possibly with the documentOrderCompareTo method.
Common exception causes: the node belongs to an unreachable Document (deleted or belonging to a closed Library).
| Field Summary | |
|---|---|
static int |
ATOM_ANY
Node nature (returned by getNodeNature) for typed leaf node holding a value of any serializable class. |
static int |
ATOM_BOOLEAN
Node nature (returned by getNodeNature) for a typed leaf node holding a boolean value. |
static int |
ATOM_DATE
Node nature (returned by getNodeNature) for typed leaf node holding a date/time value. |
static int |
ATOM_DOUBLE
Node nature (returned by getNodeNature) for a typed leaf node holding a double value. |
static int |
ATOM_LONG
Node nature (returned by getNodeNature) for a typed integer node, holding a long integer value. |
static int |
ATTRIBUTE
Node nature (returned by getNodeNature) for an Attribute node. |
static int |
COMMENT
Node nature (returned by getNodeNature) for a Comment node. |
static int |
DOCUMENT
Node nature (returned by getNodeNature) for a document node. |
static int |
ELEMENT
Node nature (returned by getNodeNature) for an Element node. |
static int |
NAMESPACE
Node nature (returned by getNodeNature) for a namespace node. |
static int |
PROCESSING_INSTRUCTION
Node nature (returned by getNodeNature) for a processing instruction node. |
static int |
TEXT
Node nature (returned by getNodeNature) for a leaf text node. |
| Method Summary | |
|---|---|
boolean |
contains(Node node)
Returns true if this node is an ancestor of the parameter node or the node itself. |
boolean |
deepEquals(Node node,
Collator collator)
Deep equality of two subtrees. |
int |
documentOrderCompareTo(Node that)
Compares the document order of two nodes. |
Object |
getAtomValue()
Returns the value of an atomic node. |
Node |
getAttribute(QName name)
Gets an attribute of an element by name. |
int |
getAttributeCount()
Returns the number of attributes of an Element. |
Node[] |
getAttributes()
Gets the attributes of an element. |
String |
getBaseURI()
Return the base-URI of this Node. |
char[] |
getCharValue()
Returns the String Value of this leaf Node as a char array. |
Node |
getDocumentNode()
Returns the document node if any, else the top-level node. |
String |
getDocumentURI()
Returns the URI of the document. |
Node |
getFirstChild()
Returns the first child node of an element or a document node. |
long |
getLongAtomValue()
Returns the node contents as an integer value. |
String |
getNamespacePrefix(String nsURI)
Returns a matching prefix for the Namespace URI by looking up the in-scope namespace definitions. |
String |
getNamespaceUri(String prefix)
Returns a matching Namespace for the prefix by looking up the in-scope namespace definitions. |
Node |
getNextNode()
Returns the next Node in document order. |
Node |
getNextSibling()
Returns the next sibling Node. |
String |
getNodeKind()
Returns the node kind as a string: "document", "element", "attribute", "text", "comment", or "processing-instruction". |
QName |
getNodeName()
Returns the Qualified Name of the node. |
int |
getNodeNature()
Returns a node kind in numeric form: DOCUMENT, ELEMENT etc. |
Node |
getParent()
Returns the parent node. |
String |
getStringValue()
Returns the String Value of this Node. |
boolean |
isElement()
Returns true if the Node is an Element. |
int |
stringValueCompareTo(Node node,
Collator collator)
Compares the string values of two nodes, optionally using a collation. |
| Methods inherited from interface com.qizx.api.Item |
|---|
export, exportNode, getBoolean, getDecimal, getDouble, getFloat, getInteger, getNode, getObject, getQName, getString, getType, isNode |
| Field Detail |
|---|
static final int DOCUMENT
static final int ELEMENT
static final int ATTRIBUTE
static final int NAMESPACE
static final int PROCESSING_INSTRUCTION
static final int COMMENT
static final int TEXT
static final int ATOM_BOOLEAN
static final int ATOM_LONG
static final int ATOM_DOUBLE
static final int ATOM_ANY
static final int ATOM_DATE
| Method Detail |
|---|
String getNodeKind()
throws DataModelException
Corresponds to Data Model accessor dm:node-kind().
DataModelException - common causes
QName getNodeName()
throws DataModelException
Corresponds to Data Model accessor dm:node-name().
DataModelException - common causes
Node getParent()
throws DataModelException
Corresponds to the XQuery Data Model accessor dm:parent().
DataModelException - common causes
Node getFirstChild()
throws DataModelException
DataModelException - common causes
Node getNextSibling()
throws DataModelException
DataModelException - common causes
Node getNextNode()
throws DataModelException
DataModelException - common causes
String getStringValue()
throws DataModelException
Corresponds to the XQuery Data Model accessor dm:string-value().
DataModelException - common causes
char[] getCharValue()
throws DataModelException
Corresponds to the XQuery Data Model accessor dm:string-value().
DataModelException - common causes, Node is not
atomic/leaf.
String getBaseURI()
throws DataModelException
Corresponds to the XQuery Data Model accessor dm:base-uri().
DataModelException - common causes
String getDocumentURI()
throws DataModelException
DataModelException - common causes
Node getDocumentNode()
throws DataModelException
DataModelException - common causes
int getNodeNature()
throws DataModelException
DataModelException - common causes
boolean isElement()
throws DataModelException
getNodeNature() == Node.ELEMENT.
DataModelException - common causes
Node getAttribute(QName name)
throws DataModelException
name - qualified name of the sought attribute
DataModelException - common causes
Node[] getAttributes()
throws DataModelException
DataModelException - common causes
int getAttributeCount()
throws DataModelException
DataModelException - common causes
Object getAtomValue()
throws DataModelException
DataModelException - common causes
long getLongAtomValue()
throws DataModelException
DataModelException - if not convertible to integer;
common causes
String getNamespacePrefix(String nsURI)
throws DataModelException
nsURI - a namespace URI as a String
DataModelException - common causes
String getNamespaceUri(String prefix)
throws DataModelException
prefix - a prefix as a String (canbe the empty string)
DataModelException - common causes
int documentOrderCompareTo(Node that)
throws DataModelException
that - other node to compare
DataModelException - common causes
int stringValueCompareTo(Node node,
Collator collator)
throws DataModelException
node - other node to comparecollator - an optional collator to compare string values; can be null
DataModelException - common causes
boolean deepEquals(Node node,
Collator collator)
throws DataModelException
node - other node to comparecollator - an optional collator to compare string values; can be null
DataModelException - common causes
boolean contains(Node node)
throws DataModelException
node - other node to check for containment
DataModelException - common causes
|
© 2010 Axyana Software | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||