|
|||||||
| 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)
|
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 |
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)
|
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, getBaseURI, 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
DOMExceptionpublic Node getParentNode()
getParentNode in interface NodegetParentNode in class NodeImplpublic DocumentType getDoctype()
getDoctype in interface Documentpublic DOMImplementation getImplementation()
getImplementation in interface Documentpublic Element getDocumentElement()
getDocumentElement in interface Documentpublic Node getFirstChild()
getFirstChild in interface NodegetFirstChild in class NodeImplpublic 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)
public Element createElement(String arg0)
throws DOMException
createElement in interface DocumentDOMExceptionpublic DocumentFragment createDocumentFragment()
createDocumentFragment in interface Documentpublic Text createTextNode(String arg0)
createTextNode in interface Documentpublic Comment createComment(String arg0)
createComment in interface Document
public CDATASection createCDATASection(String arg0)
throws DOMException
createCDATASection in interface DocumentDOMException
public ProcessingInstruction createProcessingInstruction(String arg0,
String arg1)
throws DOMException
createProcessingInstruction in interface DocumentDOMException
public Attr createAttribute(String arg0)
throws DOMException
createAttribute in interface DocumentDOMException
public EntityReference createEntityReference(String arg0)
throws DOMException
createEntityReference in interface DocumentDOMExceptionpublic NodeList getElementsByTagName(String name)
getElementsByTagName in interface Document
public Node importNode(Node arg0,
boolean arg1)
throws DOMException
importNode in interface DocumentDOMException
public Element createElementNS(String arg0,
String arg1)
throws DOMException
createElementNS in interface DocumentDOMException
public Attr createAttributeNS(String arg0,
String arg1)
throws DOMException
createAttributeNS in interface DocumentDOMException
public NodeList getElementsByTagNameNS(String arg0,
String arg1)
getElementsByTagNameNS in interface Documentpublic Element getElementById(String arg0)
getElementById in interface Documentpublic Document getOwnerDocument()
getOwnerDocument in interface NodeValuegetOwnerDocument in interface NodegetOwnerDocument in class NodeImpl
public void copyTo(NodeImpl node,
DocumentBuilderReceiver receiver)
throws SAXException
node - receiver -
SAXException
public void expand()
throws DOMException
expand in class NodeImplDOMException
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
XPathExceptionpublic int getChildCount()
public String getLocalName()
getLocalName in interface NodegetLocalName in class NodeImplpublic String getNamespaceURI()
getNamespaceURI in interface NodegetNamespaceURI in class NodeImplpublic String getInputEncoding()
getInputEncoding in interface Documentpublic String getXmlEncoding()
getXmlEncoding in interface Documentpublic boolean getXmlStandalone()
getXmlStandalone in interface Document
public void setXmlStandalone(boolean xmlStandalone)
throws DOMException
setXmlStandalone in interface DocumentDOMExceptionpublic String getXmlVersion()
getXmlVersion in interface Document
public void setXmlVersion(String xmlVersion)
throws DOMException
setXmlVersion in interface DocumentDOMExceptionpublic boolean getStrictErrorChecking()
getStrictErrorChecking in interface Documentpublic void setStrictErrorChecking(boolean strictErrorChecking)
setStrictErrorChecking in interface Documentpublic String getDocumentURI()
getDocumentURI in interface Documentpublic void setDocumentURI(String documentURI)
setDocumentURI in interface Document
public Node adoptNode(Node source)
throws DOMException
adoptNode in interface DocumentDOMExceptionpublic DOMConfiguration getDomConfig()
getDomConfig in interface Documentpublic void normalizeDocument()
normalizeDocument in interface Document
public Node renameNode(Node n,
String namespaceURI,
String qualifiedName)
throws DOMException
renameNode in interface DocumentDOMExceptionpublic void setContext(XQueryContext context)
public String toString()
toString in class Object
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||