|
|||||||
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
public class 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 |
---|
Fields inherited from class org.exist.memtree.NodeImpl |
---|
NAMESPACE_NODE, REFERENCE_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,
String value)
|
void |
addChars(int nodeNr,
char[] ch,
int start,
int len)
|
void |
addChars(int nodeNr,
CharSequence s)
|
int |
addNamespace(int nodeNr,
QName qname)
|
int |
addNode(short kind,
short level,
QName qname)
|
void |
addReferenceNode(int nodeNr,
NodeProxy proxy)
|
Node |
adoptNode(Node source)
? @see org.w3c.dom.Document#adoptNode(org.w3c.dom.Node) |
void |
appendChars(int nodeNr,
char[] ch,
int start,
int len)
|
void |
appendChars(int nodeNr,
CharSequence s)
|
void |
copyTo(NodeImpl node,
DocumentBuilderReceiver receiver)
Copy the document fragment starting at the specified node to the given document builder. |
Attr |
createAttribute(String arg0)
|
Attr |
createAttributeNS(String arg0,
String arg1)
|
CDATASection |
createCDATASection(String arg0)
|
Comment |
createComment(String arg0)
|
DocumentFragment |
createDocumentFragment()
|
Element |
createElement(String arg0)
|
Element |
createElementNS(String arg0,
String arg1)
|
EntityReference |
createEntityReference(String arg0)
|
ProcessingInstruction |
createProcessingInstruction(String arg0,
String arg1)
|
Text |
createTextNode(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)
|
String |
getBaseURI()
? @see org.w3c.dom.Node#getBaseURI() |
int |
getChildCount()
|
int |
getChildCountFor(int nr)
|
DocumentType |
getDoctype()
|
Element |
getDocumentElement()
|
String |
getDocumentURI()
? @see org.w3c.dom.Document#getDocumentURI() |
DOMConfiguration |
getDomConfig()
? @see org.w3c.dom.Document#getDomConfig() |
Element |
getElementById(String arg0)
|
NodeList |
getElementsByTagName(String name)
|
NodeList |
getElementsByTagNameNS(String arg0,
String arg1)
|
Node |
getFirstChild()
|
int |
getFirstChildFor(int nodeNumber)
|
DOMImplementation |
getImplementation()
|
String |
getInputEncoding()
? @see org.w3c.dom.Document#getInputEncoding() |
int |
getItemType()
Return the primary type to which all items in this sequence belong. |
NodeImpl |
getLastAttr()
|
int |
getLastNode()
|
String |
getLocalName()
|
NodeImpl |
getNamespaceNode(int nodeNr)
|
int |
getNamespacesCountFor(int nodeNumber)
|
String |
getNamespaceURI()
|
int |
getNextSiblingFor(int nodeNumber)
|
NodeImpl |
getNode(int nodeNr)
|
short |
getNodeType(int nodeNr)
|
Document |
getOwnerDocument()
|
Node |
getParentNode()
|
int |
getParentNodeFor(int nodeNumber)
The method getParentNodeFor |
int |
getSize()
|
boolean |
getStrictErrorChecking()
? @see org.w3c.dom.Document#getStrictErrorChecking() |
short |
getTreeLevel(int nodeNr)
|
String |
getXmlEncoding()
? @see org.w3c.dom.Document#getXmlEncoding() |
boolean |
getXmlStandalone()
? @see org.w3c.dom.Document#getXmlStandalone() |
String |
getXmlVersion()
? @see org.w3c.dom.Document#getXmlVersion() |
Node |
importNode(Node arg0,
boolean arg1)
|
Int2ObjectHashMap |
makePersistent()
|
void |
normalizeDocument()
? @see org.w3c.dom.Document#normalizeDocument() |
Node |
renameNode(Node n,
String namespaceURI,
String qualifiedName)
? @see org.w3c.dom.Document#renameNode(org.w3c.dom.Node, java.lang.String, java.lang.String) |
void |
replaceReferenceNode(int nodeNr,
CharSequence ch)
|
void |
reset()
|
void |
setContext(XQueryContext context)
|
void |
setDocumentURI(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(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. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
---|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getChildNodes, getFeature, getLastChild, getNextSibling, getNodeName, getNodeType, getNodeValue, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
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, CharSequence s)
public void appendChars(int nodeNr, char[] ch, int start, int len)
public void appendChars(int nodeNr, CharSequence s)
public void addReferenceNode(int nodeNr, NodeProxy proxy)
public void replaceReferenceNode(int nodeNr, CharSequence ch)
public int addAttribute(int nodeNr, QName qname, String value) throws DOMException
DOMException
public int addNamespace(int nodeNr, QName qname)
public short getTreeLevel(int nodeNr)
public int getLastNode()
public short getNodeType(int nodeNr)
public NodeImpl getAttribute(int nodeNr) throws DOMException
DOMException
public NodeImpl getNamespaceNode(int nodeNr) throws DOMException
DOMException
public NodeImpl getNode(int nodeNr) throws DOMException
DOMException
public NodeImpl getLastAttr()
public Node getParentNode()
getParentNode
in interface Node
getParentNode
in class NodeImpl
public DocumentType getDoctype()
getDoctype
in interface Document
public DOMImplementation getImplementation()
getImplementation
in interface Document
public Element getDocumentElement()
getDocumentElement
in interface Document
public Node getFirstChild()
getFirstChild
in interface Node
getFirstChild
in class NodeImpl
public int getAttributesCountFor(int nodeNumber)
public int getNamespacesCountFor(int nodeNumber)
public int getChildCountFor(int nr)
public int getFirstChildFor(int nodeNumber)
public int getNextSiblingFor(int nodeNumber)
public int getParentNodeFor(int nodeNumber)
getParentNodeFor
nodeNumber
- an int
value
int
valuepublic Element createElement(String arg0) throws DOMException
createElement
in interface Document
DOMException
public DocumentFragment createDocumentFragment()
createDocumentFragment
in interface Document
public Text createTextNode(String arg0)
createTextNode
in interface Document
public Comment createComment(String arg0)
createComment
in interface Document
public CDATASection createCDATASection(String arg0) throws DOMException
createCDATASection
in interface Document
DOMException
public ProcessingInstruction createProcessingInstruction(String arg0, String arg1) throws DOMException
createProcessingInstruction
in interface Document
DOMException
public Attr createAttribute(String arg0) throws DOMException
createAttribute
in interface Document
DOMException
public EntityReference createEntityReference(String arg0) throws DOMException
createEntityReference
in interface Document
DOMException
public NodeList getElementsByTagName(String name)
getElementsByTagName
in interface Document
public Node importNode(Node arg0, boolean arg1) throws DOMException
importNode
in interface Document
DOMException
public Element createElementNS(String arg0, String arg1) throws DOMException
createElementNS
in interface Document
DOMException
public Attr createAttributeNS(String arg0, String arg1) throws DOMException
createAttributeNS
in interface Document
DOMException
public NodeList getElementsByTagNameNS(String arg0, String arg1)
getElementsByTagNameNS
in interface Document
public Element getElementById(String arg0)
getElementById
in interface Document
public Document getOwnerDocument()
getOwnerDocument
in interface NodeValue
getOwnerDocument
in interface Node
getOwnerDocument
in class NodeImpl
public void copyTo(NodeImpl node, DocumentBuilderReceiver receiver) throws SAXException
node
- receiver
-
SAXException
public void expand() throws DOMException
expand
in class NodeImpl
DOMException
public DocumentImpl expandRefs(NodeImpl rootNode) throws DOMException
DOMException
public void streamTo(Serializer serializer, NodeImpl node, Receiver receiver) throws SAXException
serializer
- node
- receiver
-
SAXException
public Int2ObjectHashMap makePersistent() throws XPathException
XPathException
public int getChildCount()
public String getLocalName()
getLocalName
in interface Node
getLocalName
in class NodeImpl
public String getNamespaceURI()
getNamespaceURI
in interface Node
getNamespaceURI
in class NodeImpl
public String getInputEncoding()
getInputEncoding
in interface Document
public String getXmlEncoding()
getXmlEncoding
in interface Document
public boolean getXmlStandalone()
getXmlStandalone
in interface Document
public void setXmlStandalone(boolean xmlStandalone) throws DOMException
setXmlStandalone
in interface Document
DOMException
public String getXmlVersion()
getXmlVersion
in interface Document
public void setXmlVersion(String xmlVersion) throws DOMException
setXmlVersion
in interface Document
DOMException
public boolean getStrictErrorChecking()
getStrictErrorChecking
in interface Document
public void setStrictErrorChecking(boolean strictErrorChecking)
setStrictErrorChecking
in interface Document
public String getDocumentURI()
getDocumentURI
in interface Document
public void setDocumentURI(String documentURI)
setDocumentURI
in interface Document
public Node adoptNode(Node source) throws DOMException
adoptNode
in interface Document
DOMException
public DOMConfiguration getDomConfig()
getDomConfig
in interface Document
public void normalizeDocument()
normalizeDocument
in interface Document
public Node renameNode(Node n, String namespaceURI, String qualifiedName) throws DOMException
renameNode
in interface Document
DOMException
public void setContext(XQueryContext context)
public String getBaseURI()
getBaseURI
in interface Node
getBaseURI
in class NodeImpl
public int getItemType()
Sequence
Type.NODE
for node sets, Type.ITEM
for other sequences with mixed items.
getItemType
in interface Sequence
getItemType
in class NodeImpl
public String toString()
toString
in class Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |