|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exist.memtree.NodeImpl
| Field Summary | |
protected DocumentImpl |
document
|
static short |
NAMESPACE_NODE
|
protected int |
nodeNumber
|
static short |
REFERENCE_NODE
|
| Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
| Fields inherited from interface org.exist.xquery.value.NodeValue |
IN_MEMORY_NODE, PERSISTENT_NODE |
| Fields inherited from interface org.exist.xquery.value.Sequence |
EMPTY_SEQUENCE |
| Constructor Summary | |
NodeImpl(DocumentImpl doc,
int nodeNumber)
|
|
| Method Summary | |
void |
add(Item item)
Add an item to the current sequence. |
void |
addAll(Sequence other)
Add all items of the other sequence to this item. |
void |
addContextNode(int contextId,
NodeValue node)
|
boolean |
after(NodeValue other)
Returns true if this node comes after another node in document order. |
org.w3c.dom.Node |
appendChild(org.w3c.dom.Node arg0)
|
AtomicValue |
atomize()
|
boolean |
before(NodeValue other)
Returns true if this node comes before another node in document order. |
void |
clearContext(int contextId)
For every item in the sequence, clear any context-dependant information that is stored during query processing. |
org.w3c.dom.Node |
cloneNode(boolean arg0)
|
short |
compareDocumentPosition(org.w3c.dom.Node other)
? @see org.w3c.dom.Node#compareDocumentPosition(org.w3c.dom.Node) |
int |
compareTo(java.lang.Object other)
|
int |
conversionPreference(java.lang.Class javaClass)
Returns a preference indicator, indicating the preference of a value to be converted into the given Java class. |
AtomicValue |
convertTo(int requiredType)
Convert this item into an atomic value, whose type corresponds to the specified target type. |
void |
copyTo(DBBroker broker,
DocumentBuilderReceiver receiver)
|
void |
deepCopy()
|
boolean |
effectiveBooleanValue()
Get the effective boolean value of this sequence. |
boolean |
equals(NodeValue other)
Returns true if this node has the same identity as another node. |
boolean |
equals(java.lang.Object obj)
|
void |
expand()
|
org.w3c.dom.NamedNodeMap |
getAttributes()
|
java.lang.String |
getBaseURI()
? @see org.w3c.dom.Node#getBaseURI() |
int |
getCardinality()
Returns the cardinality of this sequence. |
org.w3c.dom.NodeList |
getChildNodes()
|
DocumentImpl |
getDocument()
|
DocumentSet |
getDocumentSet()
Returns the set of documents from which the node items in this sequence have been selected. |
java.lang.Object |
getFeature(java.lang.String feature,
java.lang.String version)
? @see org.w3c.dom.Node#getFeature(java.lang.String, java.lang.String) |
org.w3c.dom.Node |
getFirstChild()
|
int |
getImplementationType()
Returns the implementation-type of this node, i.e. |
int |
getItemType()
Return the primary type to which all items in this sequence belong. |
org.w3c.dom.Node |
getLastChild()
|
int |
getLength()
Returns the number of items contained in the sequence. |
java.lang.String |
getLocalName()
|
java.lang.String |
getNamespaceURI()
|
org.w3c.dom.Node |
getNextSibling()
|
org.w3c.dom.Node |
getNode()
|
java.lang.String |
getNodeName()
|
int |
getNodeNumber()
|
short |
getNodeType()
|
java.lang.String |
getNodeValue()
|
org.w3c.dom.Document |
getOwnerDocument()
|
org.w3c.dom.Node |
getParentNode()
|
java.lang.String |
getPrefix()
|
org.w3c.dom.Node |
getPreviousSibling()
|
QName |
getQName()
|
java.lang.String |
getStringValue()
Return the string value of this item (see the definition of string value in XPath). |
java.lang.String |
getTextContent()
? @see org.w3c.dom.Node#getTextContent() |
int |
getType()
Return the type of this item according to the type constants defined in class Type. |
java.lang.Object |
getUserData(java.lang.String key)
? @see org.w3c.dom.Node#getUserData(java.lang.String) |
boolean |
hasAttributes()
|
boolean |
hasChildNodes()
|
org.w3c.dom.Node |
insertBefore(org.w3c.dom.Node arg0,
org.w3c.dom.Node arg1)
|
boolean |
isCached()
Returns true if the sequence is the result of a previous operation and has been cached. |
boolean |
isDefaultNamespace(java.lang.String namespaceURI)
? @see org.w3c.dom.Node#isDefaultNamespace(java.lang.String) |
boolean |
isEqualNode(org.w3c.dom.Node arg)
? @see org.w3c.dom.Node#isEqualNode(org.w3c.dom.Node) |
boolean |
isPersistentSet()
|
boolean |
isSameNode(org.w3c.dom.Node other)
? @see org.w3c.dom.Node#isSameNode(org.w3c.dom.Node) |
boolean |
isSupported(java.lang.String arg0,
java.lang.String arg1)
|
Item |
itemAt(int pos)
Returns the item located at the specified position within this sequence. |
SequenceIterator |
iterate()
Returns an iterator over all items in the sequence. |
java.lang.String |
lookupNamespaceURI(java.lang.String prefix)
? @see org.w3c.dom.Node#lookupNamespaceURI(java.lang.String) |
java.lang.String |
lookupPrefix(java.lang.String namespaceURI)
? @see org.w3c.dom.Node#lookupPrefix(java.lang.String) |
void |
normalize()
|
org.w3c.dom.Node |
removeChild(org.w3c.dom.Node arg0)
|
void |
removeDuplicates()
Explicitely remove all duplicate nodes from this sequence. |
org.w3c.dom.Node |
replaceChild(org.w3c.dom.Node arg0,
org.w3c.dom.Node arg1)
|
void |
setIsCached(boolean cached)
Indicates that the sequence is the result of a previous operation and has not been recomputed. |
void |
setNodeValue(java.lang.String arg0)
|
void |
setPrefix(java.lang.String arg0)
|
void |
setSelfAsContext(int contextId)
|
void |
setTextContent(java.lang.String textContent)
? @see org.w3c.dom.Node#setTextContent(java.lang.String) |
java.lang.Object |
setUserData(java.lang.String key,
java.lang.Object data,
UserDataHandler handler)
? @see org.w3c.dom.Node#setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler) |
void |
streamTo(Serializer serializer,
Receiver receiver)
|
java.lang.Object |
toJavaObject(java.lang.Class target)
Convert the value into an instance of the specified Java class. |
NodeSet |
toNodeSet()
Convert the sequence into a NodeSet. |
void |
toSAX(DBBroker broker,
org.xml.sax.ContentHandler handler)
|
Sequence |
toSequence()
Convert this item into a sequence, containing only the item. |
SequenceIterator |
unorderedIterator()
Returns an iterator over all items in the sequence. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final short REFERENCE_NODE
public static final short NAMESPACE_NODE
protected int nodeNumber
protected DocumentImpl document
| Constructor Detail |
public NodeImpl(DocumentImpl doc,
int nodeNumber)
| Method Detail |
public int getNodeNumber()
public int getImplementationType()
NodeValueNodeValue.IN_MEMORY_NODE or NodeValue.PERSISTENT_NODE.
getImplementationType in interface NodeValuepublic DocumentSet getDocumentSet()
Sequence
getDocumentSet in interface Sequencepublic org.w3c.dom.Node getNode()
getNode in interface NodeValuepublic java.lang.String getNodeName()
getNodeName in interface org.w3c.dom.Nodepublic QName getQName()
getQName in interface QNameable
public void expand()
throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public void deepCopy()
throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public java.lang.String getNodeValue()
throws org.w3c.dom.DOMException
getNodeValue in interface org.w3c.dom.Nodeorg.w3c.dom.DOMException
public void setNodeValue(java.lang.String arg0)
throws org.w3c.dom.DOMException
setNodeValue in interface org.w3c.dom.Nodeorg.w3c.dom.DOMExceptionpublic short getNodeType()
getNodeType in interface org.w3c.dom.Nodepublic org.w3c.dom.Node getParentNode()
getParentNode in interface org.w3c.dom.Node
public void addContextNode(int contextId,
NodeValue node)
addContextNode in interface NodeValuepublic boolean equals(java.lang.Object obj)
public boolean equals(NodeValue other)
throws XPathException
NodeValue
equals in interface NodeValueother -
XPathException
public boolean after(NodeValue other)
throws XPathException
NodeValue
after in interface NodeValueother -
XPathException
public boolean before(NodeValue other)
throws XPathException
NodeValue
before in interface NodeValueother -
XPathExceptionpublic int compareTo(java.lang.Object other)
compareTo in interface java.lang.Comparablepublic org.w3c.dom.NodeList getChildNodes()
getChildNodes in interface org.w3c.dom.Nodepublic org.w3c.dom.Node getFirstChild()
getFirstChild in interface org.w3c.dom.Nodepublic org.w3c.dom.Node getLastChild()
getLastChild in interface org.w3c.dom.Nodepublic org.w3c.dom.Node getPreviousSibling()
getPreviousSibling in interface org.w3c.dom.Nodepublic org.w3c.dom.Node getNextSibling()
getNextSibling in interface org.w3c.dom.Nodepublic org.w3c.dom.NamedNodeMap getAttributes()
getAttributes in interface org.w3c.dom.Nodepublic org.w3c.dom.Document getOwnerDocument()
getOwnerDocument in interface org.w3c.dom.Nodepublic DocumentImpl getDocument()
public org.w3c.dom.Node insertBefore(org.w3c.dom.Node arg0,
org.w3c.dom.Node arg1)
throws org.w3c.dom.DOMException
insertBefore in interface org.w3c.dom.Nodeorg.w3c.dom.DOMException
public org.w3c.dom.Node replaceChild(org.w3c.dom.Node arg0,
org.w3c.dom.Node arg1)
throws org.w3c.dom.DOMException
replaceChild in interface org.w3c.dom.Nodeorg.w3c.dom.DOMException
public org.w3c.dom.Node removeChild(org.w3c.dom.Node arg0)
throws org.w3c.dom.DOMException
removeChild in interface org.w3c.dom.Nodeorg.w3c.dom.DOMException
public org.w3c.dom.Node appendChild(org.w3c.dom.Node arg0)
throws org.w3c.dom.DOMException
appendChild in interface org.w3c.dom.Nodeorg.w3c.dom.DOMExceptionpublic boolean hasChildNodes()
hasChildNodes in interface org.w3c.dom.Nodepublic org.w3c.dom.Node cloneNode(boolean arg0)
cloneNode in interface org.w3c.dom.Nodepublic void normalize()
normalize in interface org.w3c.dom.Node
public boolean isSupported(java.lang.String arg0,
java.lang.String arg1)
isSupported in interface org.w3c.dom.Nodepublic java.lang.String getNamespaceURI()
getNamespaceURI in interface org.w3c.dom.Nodepublic java.lang.String getPrefix()
getPrefix in interface org.w3c.dom.Node
public void setPrefix(java.lang.String arg0)
throws org.w3c.dom.DOMException
setPrefix in interface org.w3c.dom.Nodeorg.w3c.dom.DOMExceptionpublic java.lang.String getLocalName()
getLocalName in interface org.w3c.dom.Nodepublic boolean hasAttributes()
hasAttributes in interface org.w3c.dom.Nodepublic int getType()
ItemType.
getType in interface Itempublic java.lang.String getStringValue()
Item
getStringValue in interface Itempublic Sequence toSequence()
Item
toSequence in interface Item
public AtomicValue convertTo(int requiredType)
throws XPathException
ItemType. An XPathException is thrown
if the conversion is impossible.
convertTo in interface ItemrequiredType -
XPathException
public AtomicValue atomize()
throws XPathException
atomize in interface ItemXPathException
public void add(Item item)
throws XPathException
SequenceXPathException may be thrown
if the item's type is incompatible with this type of sequence (e.g. if the sequence
is a node set).
The sequence may or may not allow duplicate values.
add in interface Sequenceitem -
XPathException
public void addAll(Sequence other)
throws XPathException
SequenceXPathException may
be thrown if the type of the items in the other sequence is incompatible with
the primary type of this sequence.
addAll in interface Sequenceother -
XPathExceptionpublic int getItemType()
SequenceType.NODE for node sets, Type.ITEM
for other sequences with mixed items.
getItemType in interface Sequencepublic SequenceIterator iterate()
Sequence
iterate in interface Sequencepublic SequenceIterator unorderedIterator()
Sequence
unorderedIterator in interface Sequencepublic int getLength()
Sequence
getLength in interface Sequencepublic int getCardinality()
SequenceCardinality.
getCardinality in interface SequenceCardinalitypublic Item itemAt(int pos)
Sequence
itemAt in interface Sequencepos -
public boolean effectiveBooleanValue()
throws XPathException
Sequence
effectiveBooleanValue in interface SequenceXPathException
public NodeSet toNodeSet()
throws XPathException
Sequence
toNodeSet in interface SequenceXPathException - if the sequence contains items which are not nodes.
public void toSAX(DBBroker broker,
org.xml.sax.ContentHandler handler)
throws org.xml.sax.SAXException
toSAX in interface Itemorg.xml.sax.SAXException
public void copyTo(DBBroker broker,
DocumentBuilderReceiver receiver)
throws org.xml.sax.SAXException
copyTo in interface Itemorg.xml.sax.SAXException
public void streamTo(Serializer serializer,
Receiver receiver)
throws org.xml.sax.SAXException
org.xml.sax.SAXExceptionpublic int conversionPreference(java.lang.Class javaClass)
Sequence
conversionPreference in interface Item
public java.lang.Object toJavaObject(java.lang.Class target)
throws XPathException
Sequence
toJavaObject in interface ItemXPathExceptionpublic void setSelfAsContext(int contextId)
setSelfAsContext in interface Sequencepublic boolean isCached()
Sequence
isCached in interface Sequencepublic void setIsCached(boolean cached)
Sequence
setIsCached in interface Sequencecached - public void removeDuplicates()
Sequence
removeDuplicates in interface Sequencepublic java.lang.String getBaseURI()
public short compareDocumentPosition(org.w3c.dom.Node other)
throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public java.lang.String getTextContent()
throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public void setTextContent(java.lang.String textContent)
throws org.w3c.dom.DOMException
org.w3c.dom.DOMExceptionpublic boolean isSameNode(org.w3c.dom.Node other)
public java.lang.String lookupPrefix(java.lang.String namespaceURI)
public boolean isDefaultNamespace(java.lang.String namespaceURI)
public java.lang.String lookupNamespaceURI(java.lang.String prefix)
public boolean isEqualNode(org.w3c.dom.Node arg)
public java.lang.Object getFeature(java.lang.String feature,
java.lang.String version)
public java.lang.Object setUserData(java.lang.String key,
java.lang.Object data,
UserDataHandler handler)
public java.lang.Object getUserData(java.lang.String key)
public boolean isPersistentSet()
isPersistentSet in interface Sequencepublic void clearContext(int contextId)
Sequence
clearContext in interface Sequence
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||