|
Qizx/db 2.1 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
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 naemespacenode. |
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. |
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. |
Document |
getLibraryDocument()
Returns the XML Library Document the Node belongs to, if applicable. |
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 |
public static final int DOCUMENT
public static final int ELEMENT
public static final int ATTRIBUTE
public static final int NAMESPACE
public static final int PROCESSING_INSTRUCTION
public static final int COMMENT
public static final int TEXT
public static final int ATOM_BOOLEAN
public static final int ATOM_LONG
public static final int ATOM_DOUBLE
public static final int ATOM_ANY
public static final int ATOM_DATE
| Method Detail |
public String getNodeKind()
throws DataModelException
Corresponds to Data Model accessor dm:node-kind().
DataModelException - common causes
public QName getNodeName()
throws DataModelException
Corresponds to Data Model accessor dm:node-name().
DataModelException - common causes
public Node getParent()
throws DataModelException
Corresponds to the XQuery Data Model accessor dm:parent().
DataModelException - common causes
public Node getFirstChild()
throws DataModelException
DataModelException - common causes
public Node getNextSibling()
throws DataModelException
DataModelException - common causes
public Node getNextNode()
throws DataModelException
DataModelException - common causes
public String getStringValue()
throws DataModelException
Corresponds to the XQuery Data Model accessor dm:string-value().
DataModelException - common causes
public String getBaseURI()
throws DataModelException
Corresponds to the XQuery Data Model accessor dm:base-uri().
DataModelException - common causes
public String getDocumentURI()
throws DataModelException
DataModelException - common causes
public Node getDocumentNode()
throws DataModelException
DataModelException - common causes
public Document getLibraryDocument()
throws DataModelException
DataModelException - common causes
public int getNodeNature()
throws DataModelException
DataModelException - common causes
public boolean isElement()
throws DataModelException
getNodeNature() == Node.ELEMENT.
DataModelException - common causes
public Node getAttribute(QName name)
throws DataModelException
name - qualified name of the sought attribute
DataModelException - common causes
public Node[] getAttributes()
throws DataModelException
DataModelException - common causes
public int getAttributeCount()
throws DataModelException
DataModelException - common causes
public Object getAtomValue()
throws DataModelException
DataModelException - common causes
public long getLongAtomValue()
throws DataModelException
DataModelException - if not convertible to integer;
common causes
public String getNamespacePrefix(String nsURI)
throws DataModelException
nsURI - a namespace URI as a String
DataModelException - common causes
public String getNamespaceUri(String prefix)
throws DataModelException
prefix - a prefix as a String (canbe the empty string)
DataModelException - common causes
public int documentOrderCompareTo(Node that)
throws DataModelException
that - other node to compare
DataModelException - common causes
public 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
public 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
public boolean contains(Node node)
throws DataModelException
node - other node to check for containment
DataModelException - common causes
|
© 2008 Axyana Software | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||