public class DocumentImpl extends NodeImpl implements Document
This interface is effectively read-only: Setters and update methods inherited
from org.w3c.Node
are not supported and will raise an exception
if called. To create a modifiable copy of a node for XML document, use
cloneNode(boolean)
. Text document cannot be cloned.
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
LOG |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
Constructor and Description |
---|
DocumentImpl(ExpandedTree tree,
int node) |
Modifier and Type | Method and Description |
---|---|
Node |
adoptNode(Node arg0)
Unsupported.
|
Node |
cloneNode(boolean deep)
CloneNode is only supported for document node.
|
Attr |
createAttribute(String arg0)
Unsupported.
|
Attr |
createAttributeNS(String arg0,
String arg1)
Unsupported.
|
CDATASection |
createCDATASection(String arg0)
Unsupported.
|
Comment |
createComment(String arg0)
Unsupported.
|
DocumentFragment |
createDocumentFragment()
Unsupported.
|
Element |
createElement(String arg0)
Unsupported.
|
Element |
createElementNS(String arg0,
String arg1)
Unsupported.
|
EntityReference |
createEntityReference(String arg0)
Unsupported.
|
ProcessingInstruction |
createProcessingInstruction(String arg0,
String arg1)
Unsupported.
|
Text |
createTextNode(String arg0)
Unsupported.
|
NodeList |
getChildNodes() |
DocumentType |
getDoctype()
Returns a dummy DocumentTypeImpl object that contains nothing.
|
Element |
getDocumentElement() |
String |
getDocumentURI() |
DOMConfiguration |
getDomConfig()
Unsupported.
|
Element |
getElementById(String arg0)
Unsupported.
|
NodeList |
getElementsByTagName(String localName) |
NodeList |
getElementsByTagNameNS(String namespaceURI,
String name) |
Node |
getFirstChild() |
int |
getFirstChildIndex() |
DOMImplementation |
getImplementation()
Unsupported.
|
String |
getInputEncoding()
Unsupported.
|
Node |
getLastChild() |
protected Node |
getNextChild(int child) |
String |
getNodeName() |
protected int |
getNumChildren() |
Document |
getOwnerDocument()
OwnerDocument of namespace attribute is created artificially,
which only contains the attribute only.
|
protected Node |
getPreviousChild(int node) |
boolean |
getStrictErrorChecking()
Unsupported.
|
String |
getXmlEncoding()
Unsupported.
|
boolean |
getXmlStandalone()
Unsupported.
|
String |
getXmlVersion() |
boolean |
hasChildNodes() |
Node |
importNode(Node arg0,
boolean arg1)
Unsupported.
|
protected void |
initClonedOwnerDoc() |
boolean |
isDefaultNamespace(String namespaceURI) |
boolean |
isXMLDoc()
Document can be an XML document or a text document.
|
String |
lookupNamespaceURI(String prefix) |
String |
lookupPrefix(String namespaceURI) |
void |
normalizeDocument()
Unsupported.
|
Node |
renameNode(Node arg0,
String arg1,
String arg2)
Unsupported.
|
void |
setDocumentURI(String arg0)
Unsupported.
|
void |
setStrictErrorChecking(boolean arg0)
Unsupported.
|
void |
setXmlStandalone(boolean arg0)
Unsupported.
|
void |
setXmlVersion(String arg0)
Unsupported.
|
appendChild, builtinNSPrefix, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getElementsByTagNameNSOrNodeName, getExpandedTree, getFeature, getLocalName, getNamespaceURI, getNextSibling, getNodeType, getNodeValue, getNSNodeID, getNSNodeID, getParentNode, getPrefix, getPrefixID, getPreviousSibling, getTextContent, getUserData, hasAttributes, insertBefore, isEqualNode, isSameNode, isSupported, nextNSNodeID, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendChild, compareDocumentPosition, getAttributes, getBaseURI, getFeature, getLocalName, getNamespaceURI, getNextSibling, getNodeType, getNodeValue, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, insertBefore, isEqualNode, isSameNode, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
public DocumentImpl(ExpandedTree tree, int node)
public Node cloneNode(boolean deep)
Text documents in MarkLogic cannot be cloned. UnsupportedOperationException will be thrown if cloneNode is call on text document. >
DocumentType node will not be cloned as it is not part of the Expanded Tree.>
protected void initClonedOwnerDoc() throws ParserConfigurationException
ParserConfigurationException
public boolean isXMLDoc()
public String getNodeName()
NodeImpl
getNodeName
in interface Node
getNodeName
in class NodeImpl
public Document getOwnerDocument()
NodeImpl
getOwnerDocument
in interface Node
getOwnerDocument
in class NodeImpl
protected int getNumChildren()
public int getFirstChildIndex()
public NodeList getChildNodes()
NodeImpl
getChildNodes
in interface Node
getChildNodes
in class NodeImpl
public Node getFirstChild()
NodeImpl
getFirstChild
in interface Node
getFirstChild
in class NodeImpl
public Node getLastChild()
NodeImpl
getLastChild
in interface Node
getLastChild
in class NodeImpl
public boolean hasChildNodes()
NodeImpl
hasChildNodes
in interface Node
hasChildNodes
in class NodeImpl
protected Node getNextChild(int child)
getNextChild
in class NodeImpl
protected Node getPreviousChild(int node)
getPreviousChild
in class NodeImpl
public Node adoptNode(Node arg0) throws DOMException
adoptNode
in interface Document
DOMException
public Attr createAttribute(String arg0) throws DOMException
createAttribute
in interface Document
DOMException
public Attr createAttributeNS(String arg0, String arg1) throws DOMException
createAttributeNS
in interface Document
DOMException
public CDATASection createCDATASection(String arg0) throws DOMException
createCDATASection
in interface Document
DOMException
public Comment createComment(String arg0)
createComment
in interface Document
public DocumentFragment createDocumentFragment()
createDocumentFragment
in interface Document
public Element createElement(String arg0) throws DOMException
createElement
in interface Document
DOMException
public Element createElementNS(String arg0, String arg1) throws DOMException
createElementNS
in interface Document
DOMException
public EntityReference createEntityReference(String arg0) throws DOMException
createEntityReference
in interface Document
DOMException
public ProcessingInstruction createProcessingInstruction(String arg0, String arg1) throws DOMException
createProcessingInstruction
in interface Document
DOMException
public Text createTextNode(String arg0)
createTextNode
in interface Document
public DocumentType getDoctype()
getDoctype
in interface Document
public Element getDocumentElement()
getDocumentElement
in interface Document
public boolean isDefaultNamespace(String namespaceURI)
NodeImpl
Not supported for namespace declaration. Overrided by DocumentImpl and ElementImpl
isDefaultNamespace
in interface Node
isDefaultNamespace
in class NodeImpl
public String getDocumentURI()
getDocumentURI
in interface Document
public DOMConfiguration getDomConfig()
getDomConfig
in interface Document
public Element getElementById(String arg0)
getElementById
in interface Document
public NodeList getElementsByTagNameNS(String namespaceURI, String name)
getElementsByTagNameNS
in interface Document
public NodeList getElementsByTagName(String localName)
getElementsByTagName
in interface Document
public DOMImplementation getImplementation()
getImplementation
in interface Document
public String getInputEncoding()
getInputEncoding
in interface Document
public boolean getStrictErrorChecking()
getStrictErrorChecking
in interface Document
public String getXmlEncoding()
getXmlEncoding
in interface Document
public boolean getXmlStandalone()
getXmlStandalone
in interface Document
public String getXmlVersion()
getXmlVersion
in interface Document
public Node importNode(Node arg0, boolean arg1) throws DOMException
importNode
in interface Document
DOMException
public String lookupNamespaceURI(String prefix)
NodeImpl
lookupNamespaceURI
in interface Node
lookupNamespaceURI
in class NodeImpl
public String lookupPrefix(String namespaceURI)
NodeImpl
lookupPrefix
in interface Node
lookupPrefix
in class NodeImpl
public void normalizeDocument()
normalizeDocument
in interface Document
public Node renameNode(Node arg0, String arg1, String arg2) throws DOMException
renameNode
in interface Document
DOMException
public void setDocumentURI(String arg0)
setDocumentURI
in interface Document
public void setStrictErrorChecking(boolean arg0)
setStrictErrorChecking
in interface Document
public void setXmlStandalone(boolean arg0) throws DOMException
setXmlStandalone
in interface Document
DOMException
public void setXmlVersion(String arg0) throws DOMException
setXmlVersion
in interface Document
DOMException
> Copyright © 2018 MarkLogic Corporation. All Rights Reserved.
Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com