|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exist.memtree.NodeImpl
org.exist.memtree.DocumentImpl
An in-memory implementation of Document. This implementation stores all node data in the document object. Nodes from another document, i.e. a persistent document in the database, can be stored as reference nodes, i.e. the nodes are not copied into this document object. Instead a reference is inserted which will only be expanded during serialization.
| Field Summary | |
protected int[] |
alpha
|
protected int[] |
alphaLen
|
protected int[] |
attrName
|
protected int[] |
attrParent
|
protected java.lang.String[] |
attrValue
|
protected char[] |
characters
|
protected XQueryContext |
context
|
protected int |
documentRootNode
|
protected NamePool |
namePool
|
protected int[] |
namespaceCode
|
protected int[] |
namespaceParent
|
protected int[] |
next
|
protected int |
nextAttr
|
protected int |
nextChar
|
protected int |
nextNamespace
|
protected int |
nextRef
|
protected short[] |
nodeKind
|
protected int[] |
nodeName
|
protected NodeProxy[] |
references
|
protected int |
size
|
protected short[] |
treeLevel
|
| Fields inherited from class org.exist.memtree.NodeImpl |
document, NAMESPACE_NODE, nodeNumber, 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 | |
DocumentImpl(XQueryContext context)
|
|
| Method Summary | |
int |
addAttribute(int nodeNr,
QName qname,
java.lang.String value)
|
void |
addChars(int nodeNr,
char[] ch,
int start,
int len)
|
void |
addChars(int nodeNr,
java.lang.CharSequence s)
|
int |
addNamespace(int nodeNr,
QName qname)
|
int |
addNode(short kind,
short level,
QName qname)
|
void |
addReferenceNode(int nodeNr,
NodeProxy proxy)
|
org.w3c.dom.Node |
adoptNode(org.w3c.dom.Node source)
? @see org.w3c.dom.Document#adoptNode(org.w3c.dom.Node) |
void |
copyTo(NodeImpl node,
DocumentBuilderReceiver receiver)
Copy the document fragment starting at the specified node to the given document builder. |
protected void |
copyTo(NodeImpl node,
DocumentBuilderReceiver receiver,
boolean expandRefs)
|
org.w3c.dom.Attr |
createAttribute(java.lang.String arg0)
|
org.w3c.dom.Attr |
createAttributeNS(java.lang.String arg0,
java.lang.String arg1)
|
org.w3c.dom.CDATASection |
createCDATASection(java.lang.String arg0)
|
org.w3c.dom.Comment |
createComment(java.lang.String arg0)
|
org.w3c.dom.DocumentFragment |
createDocumentFragment()
|
org.w3c.dom.Element |
createElement(java.lang.String arg0)
|
org.w3c.dom.Element |
createElementNS(java.lang.String arg0,
java.lang.String arg1)
|
org.w3c.dom.EntityReference |
createEntityReference(java.lang.String arg0)
|
org.w3c.dom.ProcessingInstruction |
createProcessingInstruction(java.lang.String arg0,
java.lang.String arg1)
|
org.w3c.dom.Text |
createTextNode(java.lang.String arg0)
|
void |
expand()
Expand all reference nodes in the current document, i.e. |
DocumentImpl |
expandRefs(NodeImpl rootNode)
|
NodeImpl |
getAttribute(int nodeNr)
|
int |
getAttributesCountFor(int nodeNumber)
|
int |
getChildCount()
|
int |
getChildCountFor(int nr)
|
org.w3c.dom.DocumentType |
getDoctype()
|
org.w3c.dom.Element |
getDocumentElement()
|
java.lang.String |
getDocumentURI()
? @see org.w3c.dom.Document#getDocumentURI() |
DOMConfiguration |
getDomConfig()
? @see org.w3c.dom.Document#getDomConfig() |
org.w3c.dom.Element |
getElementById(java.lang.String arg0)
|
org.w3c.dom.NodeList |
getElementsByTagName(java.lang.String name)
|
org.w3c.dom.NodeList |
getElementsByTagNameNS(java.lang.String arg0,
java.lang.String arg1)
|
org.w3c.dom.Node |
getFirstChild()
|
int |
getFirstChildFor(int nodeNumber)
|
org.w3c.dom.DOMImplementation |
getImplementation()
|
java.lang.String |
getInputEncoding()
? @see org.w3c.dom.Document#getInputEncoding() |
int |
getLastNode()
|
NodeImpl |
getNamespaceNode(int nodeNr)
|
int |
getNextSiblingFor(int nodeNumber)
|
NodeImpl |
getNode(int nodeNr)
|
org.w3c.dom.Document |
getOwnerDocument()
|
org.w3c.dom.Node |
getParentNode()
|
int |
getParentNodeFor(int nodeNumber)
|
int |
getSize()
|
boolean |
getStrictErrorChecking()
? @see org.w3c.dom.Document#getStrictErrorChecking() |
java.lang.String |
getXmlEncoding()
? @see org.w3c.dom.Document#getXmlEncoding() |
boolean |
getXmlStandalone()
? @see org.w3c.dom.Document#getXmlStandalone() |
java.lang.String |
getXmlVersion()
? @see org.w3c.dom.Document#getXmlVersion() |
org.w3c.dom.Node |
importNode(org.w3c.dom.Node arg0,
boolean arg1)
|
Int2ObjectHashMap |
makePersistent()
|
void |
normalizeDocument()
? @see org.w3c.dom.Document#normalizeDocument() |
org.w3c.dom.Node |
renameNode(org.w3c.dom.Node n,
java.lang.String namespaceURI,
java.lang.String qualifiedName)
? @see org.w3c.dom.Document#renameNode(org.w3c.dom.Node, java.lang.String, java.lang.String) |
void |
reset()
|
void |
setContext(XQueryContext context)
|
void |
setDocumentURI(java.lang.String documentURI)
? @see org.w3c.dom.Document#setDocumentURI(java.lang.String) |
void |
setStrictErrorChecking(boolean strictErrorChecking)
? @see org.w3c.dom.Document#setStrictErrorChecking(boolean) |
void |
setXmlStandalone(boolean xmlStandalone)
? @see org.w3c.dom.Document#setXmlStandalone(boolean) |
void |
setXmlVersion(java.lang.String xmlVersion)
? @see org.w3c.dom.Document#setXmlVersion(java.lang.String) |
void |
streamTo(Serializer serializer,
NodeImpl node,
Receiver receiver)
Stream the specified document fragment to a receiver. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
| Field Detail |
protected XQueryContext context
protected NamePool namePool
protected short[] nodeKind
protected short[] treeLevel
protected int[] next
protected int[] nodeName
protected int[] alpha
protected int[] alphaLen
protected char[] characters
protected int nextChar
protected int[] attrName
protected int[] attrParent
protected java.lang.String[] attrValue
protected int nextAttr
protected int[] namespaceParent
protected int[] namespaceCode
protected int nextNamespace
protected int size
protected int documentRootNode
protected NodeProxy[] references
protected int nextRef
| Constructor Detail |
public DocumentImpl(XQueryContext context)
| Method Detail |
public void reset()
public int getSize()
public int addNode(short kind,
short level,
QName qname)
public void addChars(int nodeNr,
char[] ch,
int start,
int len)
public void addChars(int nodeNr,
java.lang.CharSequence s)
public void addReferenceNode(int nodeNr,
NodeProxy proxy)
public int addAttribute(int nodeNr,
QName qname,
java.lang.String value)
throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public int addNamespace(int nodeNr,
QName qname)
public int getLastNode()
public NodeImpl getAttribute(int nodeNr)
throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public NodeImpl getNamespaceNode(int nodeNr)
throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public NodeImpl getNode(int nodeNr)
throws org.w3c.dom.DOMException
org.w3c.dom.DOMExceptionpublic org.w3c.dom.Node getParentNode()
getParentNode in interface org.w3c.dom.NodegetParentNode in class NodeImplpublic org.w3c.dom.DocumentType getDoctype()
getDoctype in interface org.w3c.dom.Documentpublic org.w3c.dom.DOMImplementation getImplementation()
getImplementation in interface org.w3c.dom.Documentpublic org.w3c.dom.Element getDocumentElement()
getDocumentElement in interface org.w3c.dom.Documentpublic org.w3c.dom.Node getFirstChild()
getFirstChild in interface org.w3c.dom.NodegetFirstChild in class NodeImplpublic int getAttributesCountFor(int nodeNumber)
public int getChildCountFor(int nr)
public int getFirstChildFor(int nodeNumber)
public int getNextSiblingFor(int nodeNumber)
public int getParentNodeFor(int nodeNumber)
public org.w3c.dom.Element createElement(java.lang.String arg0)
throws org.w3c.dom.DOMException
createElement in interface org.w3c.dom.Documentorg.w3c.dom.DOMExceptionpublic org.w3c.dom.DocumentFragment createDocumentFragment()
createDocumentFragment in interface org.w3c.dom.Documentpublic org.w3c.dom.Text createTextNode(java.lang.String arg0)
createTextNode in interface org.w3c.dom.Documentpublic org.w3c.dom.Comment createComment(java.lang.String arg0)
createComment in interface org.w3c.dom.Document
public org.w3c.dom.CDATASection createCDATASection(java.lang.String arg0)
throws org.w3c.dom.DOMException
createCDATASection in interface org.w3c.dom.Documentorg.w3c.dom.DOMException
public org.w3c.dom.ProcessingInstruction createProcessingInstruction(java.lang.String arg0,
java.lang.String arg1)
throws org.w3c.dom.DOMException
createProcessingInstruction in interface org.w3c.dom.Documentorg.w3c.dom.DOMException
public org.w3c.dom.Attr createAttribute(java.lang.String arg0)
throws org.w3c.dom.DOMException
createAttribute in interface org.w3c.dom.Documentorg.w3c.dom.DOMException
public org.w3c.dom.EntityReference createEntityReference(java.lang.String arg0)
throws org.w3c.dom.DOMException
createEntityReference in interface org.w3c.dom.Documentorg.w3c.dom.DOMExceptionpublic org.w3c.dom.NodeList getElementsByTagName(java.lang.String name)
getElementsByTagName in interface org.w3c.dom.Document
public org.w3c.dom.Node importNode(org.w3c.dom.Node arg0,
boolean arg1)
throws org.w3c.dom.DOMException
importNode in interface org.w3c.dom.Documentorg.w3c.dom.DOMException
public org.w3c.dom.Element createElementNS(java.lang.String arg0,
java.lang.String arg1)
throws org.w3c.dom.DOMException
createElementNS in interface org.w3c.dom.Documentorg.w3c.dom.DOMException
public org.w3c.dom.Attr createAttributeNS(java.lang.String arg0,
java.lang.String arg1)
throws org.w3c.dom.DOMException
createAttributeNS in interface org.w3c.dom.Documentorg.w3c.dom.DOMException
public org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String arg0,
java.lang.String arg1)
getElementsByTagNameNS in interface org.w3c.dom.Documentpublic org.w3c.dom.Element getElementById(java.lang.String arg0)
getElementById in interface org.w3c.dom.Documentpublic org.w3c.dom.Document getOwnerDocument()
getOwnerDocument in interface org.w3c.dom.NodegetOwnerDocument in class NodeImpl
public void copyTo(NodeImpl node,
DocumentBuilderReceiver receiver)
throws org.xml.sax.SAXException
node - receiver -
org.xml.sax.SAXException
protected void copyTo(NodeImpl node,
DocumentBuilderReceiver receiver,
boolean expandRefs)
throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void expand()
throws org.w3c.dom.DOMException
expand in class NodeImplorg.w3c.dom.DOMException
public DocumentImpl expandRefs(NodeImpl rootNode)
throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public void streamTo(Serializer serializer,
NodeImpl node,
Receiver receiver)
throws org.xml.sax.SAXException
serializer - node - receiver -
org.xml.sax.SAXException
public Int2ObjectHashMap makePersistent()
throws XPathException
XPathExceptionpublic int getChildCount()
public java.lang.String getInputEncoding()
public java.lang.String getXmlEncoding()
public boolean getXmlStandalone()
public void setXmlStandalone(boolean xmlStandalone)
throws org.w3c.dom.DOMException
org.w3c.dom.DOMExceptionpublic java.lang.String getXmlVersion()
public void setXmlVersion(java.lang.String xmlVersion)
throws org.w3c.dom.DOMException
org.w3c.dom.DOMExceptionpublic boolean getStrictErrorChecking()
public void setStrictErrorChecking(boolean strictErrorChecking)
public java.lang.String getDocumentURI()
public void setDocumentURI(java.lang.String documentURI)
public org.w3c.dom.Node adoptNode(org.w3c.dom.Node source)
throws org.w3c.dom.DOMException
org.w3c.dom.DOMExceptionpublic DOMConfiguration getDomConfig()
public void normalizeDocument()
public org.w3c.dom.Node renameNode(org.w3c.dom.Node n,
java.lang.String namespaceURI,
java.lang.String qualifiedName)
throws org.w3c.dom.DOMException
org.w3c.dom.DOMExceptionpublic void setContext(XQueryContext context)
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||