|
Qizx/Open v0.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Node as defined by the XQuery1/XPath2 Data Model, with extensions.
Field Summary | |
static int |
ATTRIBUTE
|
static int |
COMMENT
|
static int |
DOCUMENT
|
static int |
ELEMENT
|
static int |
NAMESPACE
|
static int |
PROCESSING_INSTRUCTION
|
static int |
TEXT
|
static int |
TYPE_BINARY
|
static int |
TYPE_BOOLEAN
|
static int |
TYPE_DATETIME
|
static int |
TYPE_DOUBLE
|
static int |
TYPE_INTEGER
|
static int |
TYPE_NODE
|
static int |
TYPE_STRING
|
Method Summary | |
void |
addText(java.lang.String text)
Adds text inside the node. |
NodeSequence |
ancestors(NodeTest nodeTest)
Returns an iterator on ancestors that match the node test. |
NodeSequence |
ancestorsOrSelf(NodeTest nodeTest)
|
Node |
attribute(QName name)
get attribute by name. |
NodeSequence |
attributes()
Accessor dm:attributes. |
NodeSequence |
attributes(NodeTest nodeTest)
|
NodeSequence |
children()
Accessor dm:children. |
NodeSequence |
children(NodeTest nodeTest)
|
int |
compareStringValues(Node node,
java.text.Collator collator)
|
boolean |
contains(Node node)
Returns true if this node is an ancestor of the node, or the node itself. |
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. |
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). |
int |
getNature()
Returns a numeric node kind: DOCUMENT, ELEMENT etc. |
java.lang.String |
getNodeKind()
Accessor dm:node-kind(). |
QName |
getNodeName()
Accessor dm:node-name(). |
java.lang.String |
getNsPrefix(java.lang.String nsuri)
Returns a matching prefix for the Namespace by looking up the namespace nodes. |
java.lang.String |
getNsUri(java.lang.String prefix)
Returns a matching Namespace for the prefix by looking up the namespace nodes. |
java.lang.String |
getStringValue()
Accessor dm:string-value(). |
boolean |
isElement()
Convenience: quick test of elements. |
NodeSequence |
namespaces(boolean inScope)
Accessor dm:namespaces(). |
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. |
Field Detail |
public static final int DOCUMENT
public static final int ELEMENT
public static final int ATTRIBUTE
public static final int TEXT
public static final int PROCESSING_INSTRUCTION
public static final int COMMENT
public static final int NAMESPACE
public static final int TYPE_NODE
public static final int TYPE_BINARY
public static final int TYPE_BOOLEAN
public static final int TYPE_DATETIME
public static final int TYPE_DOUBLE
public static final int TYPE_INTEGER
public static final int TYPE_STRING
Method Detail |
public java.lang.String getNodeKind()
public QName getNodeName()
public Node parent()
public java.lang.String getStringValue()
public java.lang.String getBaseURI()
public java.lang.String getDocumentURI()
public NodeSequence children()
public NodeSequence attributes()
public NodeSequence namespaces(boolean inScope)
inScope
- if true, return the closure of in-scope namespaces,
else namespaces defined specifically on this node.public int getNature()
public Node document()
public int docPosition()
public boolean isElement()
public Node attribute(QName name)
public char[] getChars()
public int getDefinedNSCount()
public java.lang.String getNsPrefix(java.lang.String nsuri)
public java.lang.String getNsUri(java.lang.String prefix)
public int orderCompare(Node node)
public int compareStringValues(Node node, java.text.Collator collator)
public boolean contains(Node node)
public NodeSequence ancestors(NodeTest nodeTest)
nodeTest
- concrete classes are BaseNodeTest(node-kind?, nsuri?, ncname?),
UnionNodeTest, DocumentTest.public NodeSequence ancestorsOrSelf(NodeTest nodeTest)
public NodeSequence parent(NodeTest nodeTest)
public NodeSequence children(NodeTest nodeTest)
public NodeSequence descendants(NodeTest nodeTest)
public NodeSequence descendantsOrSelf(NodeTest nodeTest)
public NodeSequence attributes(NodeTest nodeTest)
public NodeSequence followingSiblings(NodeTest nodeTest)
public NodeSequence precedingSiblings(NodeTest nodeTest)
public NodeSequence following(NodeTest nodeTest)
public NodeSequence preceding(NodeTest nodeTest)
public void addText(java.lang.String text)
public int getAtomType()
public java.lang.Object getAtomValue()
public double getDoubleValue() throws DataModelException
DataModelException
- if not convertible to double.public long getIntegerValue() throws DataModelException
DataModelException
- if not convertible to integer.
|
Copyright Xavier FRANC 2003-2004 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |