org.exist.dom
Class DocumentImpl

java.lang.Object
  extended by org.exist.dom.NodeImpl
      extended by org.exist.dom.DocumentImpl
All Implemented Interfaces:
java.lang.Comparable<java.lang.Object>, java.lang.Iterable<NodeImpl>, DocumentAtExist, NodeAtExist, QNameable, org.w3c.dom.Document, org.w3c.dom.Node
Direct Known Subclasses:
BinaryDocument

public class DocumentImpl
extends NodeImpl
implements org.w3c.dom.Document, DocumentAtExist, java.lang.Iterable<NodeImpl>

Represents a persistent document object in the database; it can be an XML_FILE , a BINARY_FILE, or Xquery source code.


Field Summary
static byte BINARY_FILE
           
static int LENGTH_DOCUMENT_ID
           
static int LENGTH_DOCUMENT_TYPE
           
protected  BrokerPool pool
           
static int UNKNOWN_DOCUMENT_ID
           
static byte XML_FILE
           
 
Fields inherited from class org.exist.dom.NodeImpl
LOG
 
Fields inherited from interface org.w3c.dom.Node
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 Summary
DocumentImpl(BrokerPool pool)
          Creates a new DocumentImpl instance.
DocumentImpl(BrokerPool pool, Collection collection)
          Creates a new DocumentImpl instance.
DocumentImpl(BrokerPool pool, Collection collection, XmldbURI fileURI)
          Creates a new DocumentImpl instance.
DocumentImpl(BrokerPool pool, XmldbURI fileURI)
          Creates a new DocumentImpl instance.
 
Method Summary
 org.w3c.dom.Node adoptNode(org.w3c.dom.Node node)
          The method adoptNode
 void appendChild(StoredNode child)
          The method appendChild
 short compareDocumentPosition(org.w3c.dom.Node other)
          ? @see org.w3c.dom.Node#compareDocumentPosition(org.w3c.dom.Node)
 int compareTo(java.lang.Object other)
          The method compareTo
 void copyChildren(DocumentImpl other)
          The method copyChildren
 void copyOf(DocumentImpl other)
          Copy the relevant internal fields from the specified document object.
 org.w3c.dom.Attr createAttribute(java.lang.String name)
          The method createAttribute
 org.w3c.dom.Attr createAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName)
          The method createAttributeNS
 org.w3c.dom.CDATASection createCDATASection(java.lang.String data)
          The method createCDATASection
 org.w3c.dom.Comment createComment(java.lang.String data)
          The method createComment
 org.w3c.dom.DocumentFragment createDocumentFragment()
          The method createDocumentFragment
 org.w3c.dom.Element createElement(java.lang.String tagName)
          The method createElement
 org.w3c.dom.Element createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName)
          The method createElementNS
 org.w3c.dom.EntityReference createEntityReference(java.lang.String name)
          The method createEntityReference
 org.w3c.dom.ProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data)
          The method createProcessingInstruction
 org.w3c.dom.Text createTextNode(java.lang.String data)
          The method createTextNode
protected  org.w3c.dom.NodeList findElementsByTagName(StoredNode root, QName qname)
          The method findElementsByTagName
 java.lang.String getBaseURI()
          ? @see org.w3c.dom.Node#getBaseURI()
 BrokerPool getBrokerPool()
           
 int getChildCount()
          The method getChildCount
 org.w3c.dom.NodeList getChildNodes()
          The method getChildNodes
 Collection getCollection()
          The method getCollection
 long getContentLength()
          Returns the estimated size of the data in this document.
 BrokerPool getDatabase()
           
 int getDocId()
          The method getDocId
 org.w3c.dom.DocumentType getDoctype()
          The method getDoctype
 DocumentAtExist getDocumentAtExist()
           
 org.w3c.dom.Element getDocumentElement()
          The method getDocumentElement
 java.lang.String getDocumentURI()
          ? @see org.w3c.dom.Document#getDocumentURI()
 org.w3c.dom.DOMConfiguration getDomConfig()
          ? @see org.w3c.dom.Document#getDomConfig()
 org.w3c.dom.Element getElementById(java.lang.String elementId)
          The method getElementById
 org.w3c.dom.NodeList getElementsByTagName(java.lang.String tagname)
          The method getElementsByTagName
 org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
          The method getElementsByTagNameNS
 java.lang.String getEncoding()
          The method getEncoding
 java.lang.Object getFeature(java.lang.String feature, java.lang.String version)
          ? @see org.w3c.dom.Node#getFeature(java.lang.String, java.lang.String)
 XmldbURI getFileURI()
          The method getFileURI
 org.w3c.dom.Node getFirstChild()
           
 long getFirstChildAddress()
          The method getFirstChildAddress
 int getFirstChildFor(int nodeNumber)
           
 NodeProxy getFirstChildProxy()
           
protected  org.w3c.dom.Node getFollowingSibling(StoredNode node)
          The method getFollowingSibling
 org.w3c.dom.DOMImplementation getImplementation()
          The method getImplementation
 java.lang.String getInputEncoding()
          ? @see org.w3c.dom.Document#getInputEncoding()
 java.lang.String getLocalName()
          The method getLocalName
 DocumentMetadata getMetadata()
          The method getMetadata
 java.lang.String getNamespaceURI()
          The method getNamespaceURI
 int getNextNodeNumber(int nodeNr)
           
 org.w3c.dom.Node getNextSibling()
          The method getNextSibling
 NodeAtExist getNode(int nodeNr)
           
 org.w3c.dom.Node getNode(NodeId nodeId)
          The method getNode
 org.w3c.dom.Node getNode(NodeProxy p)
          The method getNode
 NodeId getNodeId()
           
 int getNodeNumber()
           
 short getNodeType()
          The method getNodeType
 org.w3c.dom.Document getOwnerDocument()
          The method getOwnerDocument
 org.w3c.dom.Node getParentNode()
           
 Permission getPermissions()
          The method getMode
 org.w3c.dom.Node getPreviousSibling()
          The method getPreviousSibling
protected  org.w3c.dom.Node getPreviousSibling(StoredNode node)
          The method getPreviousSibling
 QName getQName()
          The method getQName
 byte getResourceType()
          Returns the type of this resource, either XML_FILE or BINARY_FILE.
 boolean getStandalone()
          The method getStandalone
 boolean getStrictErrorChecking()
          The method getStrictErrorChecking
 java.lang.String getTextContent()
          ? @see org.w3c.dom.Node#getTextContent()
 Lock getUpdateLock()
          Returns the update lock associated with this resource.
 XmldbURI getURI()
          The method getURI
 java.lang.Object getUserData(java.lang.String key)
          ? @see org.w3c.dom.Node#getUserData(java.lang.String)
 Account getUserLock()
          The method getUserLock
 java.lang.String getVersion()
          The method getVersion
 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()
 boolean hasReferenceNodes()
           
 org.w3c.dom.Node importNode(org.w3c.dom.Node importedNode, boolean deep)
          The method importNode
 void insertAfter(org.w3c.dom.NodeList nodes, org.w3c.dom.Node refChild)
           
 void insertBefore(org.w3c.dom.NodeList nodes, org.w3c.dom.Node refChild)
           
 boolean isCollectionConfig()
           
 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 isLockedForWrite()
          Returns true if the document is currently locked for write.
 boolean isSameNode(org.w3c.dom.Node other)
          ? @see org.w3c.dom.Node#isSameNode(org.w3c.dom.Node)
 boolean isSupported(java.lang.String type, java.lang.String value)
          The method isSupported
 java.util.Iterator<NodeImpl> iterator()
           
 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 normalizeDocument()
          ? @see org.w3c.dom.Document#normalizeDocument()
 void read(VariableByteInput istream)
          The method read
 void readDocumentMeta(VariableByteInput istream)
          The method readDocumentMeta
 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 setChildCount(int count)
          The method setChildCount
 void setCollection(Collection parent)
          The method setCollection
 void setDocId(int docId)
          The method setDocId
 void setDocumentType(org.w3c.dom.DocumentType docType)
          The method setDocumentType
 void setDocumentURI(java.lang.String documentURI)
          ? @see org.w3c.dom.Document#setDocumentURI(java.lang.String)
 void setEncoding(java.lang.String enc)
          The method setEncoding
 void setFileURI(XmldbURI fileURI)
          The method setFileURI
 void setMetadata(DocumentMetadata meta)
          The method setMetadata
 void setOwnerDocument(org.w3c.dom.Document doc)
          The method setOwnerDocument
 void setPermissions(Permission perm)
          The method setMode
 void setStandalone(boolean alone)
          The method setStandalone
 void setStrictErrorChecking(boolean strict)
          The method setStrictErrorChecking
 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, org.w3c.dom.UserDataHandler handler)
          ? @see org.w3c.dom.Node#setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler)
 void setUserLock(Account user)
          The method setUserLock
 void setVersion(java.lang.String version)
          The method setVersion
 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)
 java.lang.String toString()
          The method toString
 void triggerDefrag()
          The method triggerDefrag
 StoredNode updateChild(Txn transaction, org.w3c.dom.Node oldChild, org.w3c.dom.Node newChild)
          Update a child node.
 void write(VariableByteOutputStream ostream)
          The method write
 
Methods inherited from class org.exist.dom.NodeImpl
appendChild, appendChildren, calculateBaseURI, cloneNode, getAttributes, getAttributesCount, getLastChild, getNodeName, getNodeValue, getPrefix, hasAttributes, hasChildNodes, insertAfter, insertAfter, insertBefore, insertBefore, normalize, removeChild, removeChild, replaceChild, replaceChild, setAttributes, setNodeName, setNodeValue, setPrefix, supports, updateChild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, getAttributes, getLastChild, getNodeName, getNodeValue, getPrefix, hasAttributes, hasChildNodes, insertBefore, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 

Field Detail

UNKNOWN_DOCUMENT_ID

public static final int UNKNOWN_DOCUMENT_ID
See Also:
Constant Field Values

XML_FILE

public static final byte XML_FILE
See Also:
Constant Field Values

BINARY_FILE

public static final byte BINARY_FILE
See Also:
Constant Field Values

LENGTH_DOCUMENT_ID

public static int LENGTH_DOCUMENT_ID

LENGTH_DOCUMENT_TYPE

public static int LENGTH_DOCUMENT_TYPE

pool

protected BrokerPool pool
Constructor Detail

DocumentImpl

public DocumentImpl(BrokerPool pool)
Creates a new DocumentImpl instance.

Parameters:
pool - a BrokerPool instance representing the db

DocumentImpl

public DocumentImpl(BrokerPool pool,
                    Collection collection)
Creates a new DocumentImpl instance.

Parameters:
pool - a BrokerPool instance representing the db
collection - a Collection value

DocumentImpl

public DocumentImpl(BrokerPool pool,
                    XmldbURI fileURI)
Creates a new DocumentImpl instance.

Parameters:
pool - a BrokerPool instance representing the db
fileURI - a XmldbURI value

DocumentImpl

public DocumentImpl(BrokerPool pool,
                    Collection collection,
                    XmldbURI fileURI)
Creates a new DocumentImpl instance.

Parameters:
pool - a BrokerPool instance representing the db
collection - a Collection value
fileURI - a XmldbURI value
Method Detail

getBrokerPool

public BrokerPool getBrokerPool()

getDatabase

public BrokerPool getDatabase()
Specified by:
getDatabase in interface DocumentAtExist

getLocalName

public java.lang.String getLocalName()
The method getLocalName

Specified by:
getLocalName in interface org.w3c.dom.Node
Overrides:
getLocalName in class NodeImpl
Returns:
a String value
See Also:
Node.getLocalName()

getNamespaceURI

public java.lang.String getNamespaceURI()
The method getNamespaceURI

Specified by:
getNamespaceURI in interface org.w3c.dom.Node
Overrides:
getNamespaceURI in class NodeImpl
Returns:
a String value
See Also:
Node.getNamespaceURI()

getCollection

public Collection getCollection()
The method getCollection

Returns:
a Collection value

setCollection

public void setCollection(Collection parent)
The method setCollection

Parameters:
parent - a Collection value

getDocId

public int getDocId()
The method getDocId

Specified by:
getDocId in interface DocumentAtExist
Returns:
an int value

setDocId

public void setDocId(int docId)
The method setDocId

Parameters:
docId - an int value

getResourceType

public byte getResourceType()
Returns the type of this resource, either XML_FILE or BINARY_FILE.


getFileURI

public XmldbURI getFileURI()
The method getFileURI

Returns:
a XmldbURI value

setFileURI

public void setFileURI(XmldbURI fileURI)
The method setFileURI

Parameters:
fileURI - a XmldbURI value

getURI

public XmldbURI getURI()
The method getURI

Specified by:
getURI in interface DocumentAtExist
Returns:
a XmldbURI value

isCollectionConfig

public boolean isCollectionConfig()

getPermissions

public Permission getPermissions()
The method getMode

Returns:
a Permission value

setPermissions

public void setPermissions(Permission perm)
The method setMode

Parameters:
perm - a Permission value

setMetadata

public void setMetadata(DocumentMetadata meta)
The method setMetadata

Parameters:
meta - a DocumentMetadata value

getMetadata

public DocumentMetadata getMetadata()
The method getMetadata

Returns:
a DocumentMetadata value

copyOf

public void copyOf(DocumentImpl other)
Copy the relevant internal fields from the specified document object. This is called by Collection when replacing a document.

Parameters:
other - a DocumentImpl value

copyChildren

public void copyChildren(DocumentImpl other)
The method copyChildren

Parameters:
other - a DocumentImpl value

isLockedForWrite

public boolean isLockedForWrite()
Returns true if the document is currently locked for write.


getUpdateLock

public final Lock getUpdateLock()
Returns the update lock associated with this resource.


setUserLock

public void setUserLock(Account user)
The method setUserLock

Parameters:
user - an User value

getUserLock

public Account getUserLock()
The method getUserLock

Returns:
an User value

getContentLength

public long getContentLength()
Returns the estimated size of the data in this document. As an estimation, the number of pages occupied by the document is multiplied with the current page size.


triggerDefrag

public void triggerDefrag()
The method triggerDefrag


getNode

public org.w3c.dom.Node getNode(NodeId nodeId)
The method getNode

Parameters:
nodeId - a NodeId value
Returns:
a Node value

getNode

public org.w3c.dom.Node getNode(NodeProxy p)
The method getNode

Parameters:
p - a NodeProxy value
Returns:
a Node value

appendChild

public void appendChild(StoredNode child)
                 throws org.w3c.dom.DOMException
The method appendChild

Parameters:
child - a StoredNode value
Throws:
org.w3c.dom.DOMException - if an error occurs

write

public void write(VariableByteOutputStream ostream)
           throws java.io.IOException
The method write

Parameters:
ostream - a VariableByteOutputStream value
Throws:
java.io.IOException - if an error occurs

read

public void read(VariableByteInput istream)
          throws java.io.IOException,
                 java.io.EOFException
The method read

Parameters:
istream - a VariableByteInput value
Throws:
java.io.IOException - if an error occurs
java.io.EOFException - if an error occurs

readDocumentMeta

public void readDocumentMeta(VariableByteInput istream)
The method readDocumentMeta

Parameters:
istream - a VariableByteInput value

compareTo

public final int compareTo(java.lang.Object other)
The method compareTo

Specified by:
compareTo in interface java.lang.Comparable<java.lang.Object>
Parameters:
other - an DocumentImpl value
Returns:
an int value

updateChild

public StoredNode updateChild(Txn transaction,
                              org.w3c.dom.Node oldChild,
                              org.w3c.dom.Node newChild)
                       throws org.w3c.dom.DOMException
Description copied from class: NodeImpl
Update a child node. This method will only update the child node but not its potential descendant nodes.

Overrides:
updateChild in class NodeImpl
Throws:
org.w3c.dom.DOMException

insertBefore

public void insertBefore(org.w3c.dom.NodeList nodes,
                         org.w3c.dom.Node refChild)
                  throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

insertAfter

public void insertAfter(org.w3c.dom.NodeList nodes,
                        org.w3c.dom.Node refChild)
                 throws org.w3c.dom.DOMException
Throws:
org.w3c.dom.DOMException

getFirstChild

public org.w3c.dom.Node getFirstChild()
Specified by:
getFirstChild in interface org.w3c.dom.Node
Overrides:
getFirstChild in class NodeImpl
See Also:
Node.getFirstChild()

getFirstChildProxy

public NodeProxy getFirstChildProxy()

getFirstChildAddress

public long getFirstChildAddress()
The method getFirstChildAddress

Returns:
a long value

getChildNodes

public org.w3c.dom.NodeList getChildNodes()
The method getChildNodes

Specified by:
getChildNodes in interface org.w3c.dom.Node
Overrides:
getChildNodes in class NodeImpl
Returns:
a NodeList value

getPreviousSibling

protected org.w3c.dom.Node getPreviousSibling(StoredNode node)
The method getPreviousSibling

Parameters:
node - a StoredNode value
Returns:
a Node value

getFollowingSibling

protected org.w3c.dom.Node getFollowingSibling(StoredNode node)
The method getFollowingSibling

Parameters:
node - a StoredNode value
Returns:
a Node value

findElementsByTagName

protected org.w3c.dom.NodeList findElementsByTagName(StoredNode root,
                                                     QName qname)
The method findElementsByTagName

Parameters:
root - a StoredNode value
qname - a QName value
Returns:
a NodeList value

getDoctype

public org.w3c.dom.DocumentType getDoctype()
The method getDoctype

Specified by:
getDoctype in interface org.w3c.dom.Document
Returns:
a DocumentType value

setDocumentType

public void setDocumentType(org.w3c.dom.DocumentType docType)
The method setDocumentType

Parameters:
docType - a DocumentType value

getOwnerDocument

public org.w3c.dom.Document getOwnerDocument()
The method getOwnerDocument

Specified by:
getOwnerDocument in interface org.w3c.dom.Node
Returns:
a Document value

setOwnerDocument

public void setOwnerDocument(org.w3c.dom.Document doc)
The method setOwnerDocument

Parameters:
doc - a Document value

getQName

public QName getQName()
The method getQName

Specified by:
getQName in interface QNameable
Returns:
a QName value

getNodeType

public short getNodeType()
The method getNodeType

Specified by:
getNodeType in interface org.w3c.dom.Node
Returns:
a short value

getPreviousSibling

public org.w3c.dom.Node getPreviousSibling()
The method getPreviousSibling

Specified by:
getPreviousSibling in interface org.w3c.dom.Node
Returns:
a Node value

getNextSibling

public org.w3c.dom.Node getNextSibling()
The method getNextSibling

Specified by:
getNextSibling in interface org.w3c.dom.Node
Returns:
a Node value

createAttribute

public org.w3c.dom.Attr createAttribute(java.lang.String name)
                                 throws org.w3c.dom.DOMException
The method createAttribute

Specified by:
createAttribute in interface org.w3c.dom.Document
Parameters:
name - a String value
Returns:
an Attr value
Throws:
org.w3c.dom.DOMException - if an error occurs

createAttributeNS

public org.w3c.dom.Attr createAttributeNS(java.lang.String namespaceURI,
                                          java.lang.String qualifiedName)
                                   throws org.w3c.dom.DOMException
The method createAttributeNS

Specified by:
createAttributeNS in interface org.w3c.dom.Document
Parameters:
namespaceURI - a String value
qualifiedName - a String value
Returns:
an Attr value
Throws:
org.w3c.dom.DOMException - if an error occurs

createElement

public org.w3c.dom.Element createElement(java.lang.String tagName)
                                  throws org.w3c.dom.DOMException
The method createElement

Specified by:
createElement in interface org.w3c.dom.Document
Parameters:
tagName - a String value
Returns:
an Element value
Throws:
org.w3c.dom.DOMException - if an error occurs

createElementNS

public org.w3c.dom.Element createElementNS(java.lang.String namespaceURI,
                                           java.lang.String qualifiedName)
                                    throws org.w3c.dom.DOMException
The method createElementNS

Specified by:
createElementNS in interface org.w3c.dom.Document
Parameters:
namespaceURI - a String value
qualifiedName - a String value
Returns:
an Element value
Throws:
org.w3c.dom.DOMException - if an error occurs

createTextNode

public org.w3c.dom.Text createTextNode(java.lang.String data)
The method createTextNode

Specified by:
createTextNode in interface org.w3c.dom.Document
Parameters:
data - a String value
Returns:
a Text value

getDocumentElement

public org.w3c.dom.Element getDocumentElement()
The method getDocumentElement

Specified by:
getDocumentElement in interface org.w3c.dom.Document
Returns:
an Element value

getElementsByTagName

public org.w3c.dom.NodeList getElementsByTagName(java.lang.String tagname)
The method getElementsByTagName

Specified by:
getElementsByTagName in interface org.w3c.dom.Document
Parameters:
tagname - a String value
Returns:
a NodeList value

getElementsByTagNameNS

public org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI,
                                                   java.lang.String localName)
The method getElementsByTagNameNS

Specified by:
getElementsByTagNameNS in interface org.w3c.dom.Document
Parameters:
namespaceURI - a String value
localName - a String value
Returns:
a NodeList value

getParentNode

public org.w3c.dom.Node getParentNode()
Specified by:
getParentNode in interface org.w3c.dom.Node

getChildCount

public int getChildCount()
The method getChildCount

Overrides:
getChildCount in class NodeImpl
Returns:
an int value

setChildCount

public void setChildCount(int count)
The method setChildCount

Overrides:
setChildCount in class NodeImpl
Parameters:
count - an int value

getEncoding

public java.lang.String getEncoding()
The method getEncoding

Returns:
a String value

setEncoding

public void setEncoding(java.lang.String enc)
The method setEncoding

Parameters:
enc - a String value

getVersion

public java.lang.String getVersion()
The method getVersion

Returns:
a String value

setVersion

public void setVersion(java.lang.String version)
The method setVersion

Parameters:
version - a String value

getStandalone

public boolean getStandalone()
The method getStandalone

Returns:
a boolean value

setStandalone

public void setStandalone(boolean alone)
The method setStandalone

Parameters:
alone - a boolean value

createCDATASection

public org.w3c.dom.CDATASection createCDATASection(java.lang.String data)
                                            throws org.w3c.dom.DOMException
The method createCDATASection

Specified by:
createCDATASection in interface org.w3c.dom.Document
Parameters:
data - a String value
Returns:
a CDATASection value
Throws:
org.w3c.dom.DOMException - if an error occurs

createComment

public org.w3c.dom.Comment createComment(java.lang.String data)
The method createComment

Specified by:
createComment in interface org.w3c.dom.Document
Parameters:
data - a String value
Returns:
a Comment value

createDocumentFragment

public org.w3c.dom.DocumentFragment createDocumentFragment()
                                                    throws org.w3c.dom.DOMException
The method createDocumentFragment

Specified by:
createDocumentFragment in interface org.w3c.dom.Document
Returns:
a DocumentFragment value
Throws:
org.w3c.dom.DOMException - if an error occurs

createEntityReference

public org.w3c.dom.EntityReference createEntityReference(java.lang.String name)
                                                  throws org.w3c.dom.DOMException
The method createEntityReference

Specified by:
createEntityReference in interface org.w3c.dom.Document
Parameters:
name - a String value
Returns:
an EntityReference value
Throws:
org.w3c.dom.DOMException - if an error occurs

createProcessingInstruction

public org.w3c.dom.ProcessingInstruction createProcessingInstruction(java.lang.String target,
                                                                     java.lang.String data)
                                                              throws org.w3c.dom.DOMException
The method createProcessingInstruction

Specified by:
createProcessingInstruction in interface org.w3c.dom.Document
Parameters:
target - a String value
data - a String value
Returns:
a ProcessingInstruction value
Throws:
org.w3c.dom.DOMException - if an error occurs

getElementById

public org.w3c.dom.Element getElementById(java.lang.String elementId)
The method getElementById

Specified by:
getElementById in interface org.w3c.dom.Document
Parameters:
elementId - a String value
Returns:
an Element value

getImplementation

public org.w3c.dom.DOMImplementation getImplementation()
The method getImplementation

Specified by:
getImplementation in interface org.w3c.dom.Document
Returns:
an org.w3c.dom.DOMImplementation value

getStrictErrorChecking

public boolean getStrictErrorChecking()
The method getStrictErrorChecking

Specified by:
getStrictErrorChecking in interface org.w3c.dom.Document
Returns:
a boolean value

adoptNode

public org.w3c.dom.Node adoptNode(org.w3c.dom.Node node)
                           throws org.w3c.dom.DOMException
The method adoptNode

Specified by:
adoptNode in interface org.w3c.dom.Document
Parameters:
node - a Node value
Returns:
a Node value
Throws:
org.w3c.dom.DOMException - if an error occurs

importNode

public org.w3c.dom.Node importNode(org.w3c.dom.Node importedNode,
                                   boolean deep)
                            throws org.w3c.dom.DOMException
The method importNode

Specified by:
importNode in interface org.w3c.dom.Document
Parameters:
importedNode - a Node value
deep - a boolean value
Returns:
a Node value
Throws:
org.w3c.dom.DOMException - if an error occurs

isSupported

public boolean isSupported(java.lang.String type,
                           java.lang.String value)
The method isSupported

Specified by:
isSupported in interface org.w3c.dom.Node
Overrides:
isSupported in class NodeImpl
Parameters:
type - a String value
value - a String value
Returns:
a boolean value
See Also:
Node.isSupported(java.lang.String, java.lang.String)

setStrictErrorChecking

public void setStrictErrorChecking(boolean strict)
The method setStrictErrorChecking

Specified by:
setStrictErrorChecking in interface org.w3c.dom.Document
Parameters:
strict - a boolean value

getInputEncoding

public java.lang.String getInputEncoding()
? @see org.w3c.dom.Document#getInputEncoding()

Specified by:
getInputEncoding in interface org.w3c.dom.Document

getXmlEncoding

public java.lang.String getXmlEncoding()
? @see org.w3c.dom.Document#getXmlEncoding()

Specified by:
getXmlEncoding in interface org.w3c.dom.Document

getXmlStandalone

public boolean getXmlStandalone()
? @see org.w3c.dom.Document#getXmlStandalone()

Specified by:
getXmlStandalone in interface org.w3c.dom.Document

setXmlStandalone

public void setXmlStandalone(boolean xmlStandalone)
                      throws org.w3c.dom.DOMException
? @see org.w3c.dom.Document#setXmlStandalone(boolean)

Specified by:
setXmlStandalone in interface org.w3c.dom.Document
Throws:
org.w3c.dom.DOMException

getXmlVersion

public java.lang.String getXmlVersion()
? @see org.w3c.dom.Document#getXmlVersion()

Specified by:
getXmlVersion in interface org.w3c.dom.Document

setXmlVersion

public void setXmlVersion(java.lang.String xmlVersion)
                   throws org.w3c.dom.DOMException
? @see org.w3c.dom.Document#setXmlVersion(java.lang.String)

Specified by:
setXmlVersion in interface org.w3c.dom.Document
Throws:
org.w3c.dom.DOMException

getDocumentURI

public java.lang.String getDocumentURI()
? @see org.w3c.dom.Document#getDocumentURI()

Specified by:
getDocumentURI in interface org.w3c.dom.Document

setDocumentURI

public void setDocumentURI(java.lang.String documentURI)
? @see org.w3c.dom.Document#setDocumentURI(java.lang.String)

Specified by:
setDocumentURI in interface org.w3c.dom.Document

getDomConfig

public org.w3c.dom.DOMConfiguration getDomConfig()
? @see org.w3c.dom.Document#getDomConfig()

Specified by:
getDomConfig in interface org.w3c.dom.Document

normalizeDocument

public void normalizeDocument()
? @see org.w3c.dom.Document#normalizeDocument()

Specified by:
normalizeDocument in interface org.w3c.dom.Document

renameNode

public org.w3c.dom.Node renameNode(org.w3c.dom.Node n,
                                   java.lang.String namespaceURI,
                                   java.lang.String qualifiedName)
                            throws org.w3c.dom.DOMException
? @see org.w3c.dom.Document#renameNode(org.w3c.dom.Node, java.lang.String, java.lang.String)

Specified by:
renameNode in interface org.w3c.dom.Document
Throws:
org.w3c.dom.DOMException

getBaseURI

public java.lang.String getBaseURI()
? @see org.w3c.dom.Node#getBaseURI()

Specified by:
getBaseURI in interface org.w3c.dom.Node
Overrides:
getBaseURI in class NodeImpl

compareDocumentPosition

public short compareDocumentPosition(org.w3c.dom.Node other)
                              throws org.w3c.dom.DOMException
? @see org.w3c.dom.Node#compareDocumentPosition(org.w3c.dom.Node)

Specified by:
compareDocumentPosition in interface org.w3c.dom.Node
Overrides:
compareDocumentPosition in class NodeImpl
Throws:
org.w3c.dom.DOMException

getTextContent

public java.lang.String getTextContent()
                                throws org.w3c.dom.DOMException
? @see org.w3c.dom.Node#getTextContent()

Specified by:
getTextContent in interface org.w3c.dom.Node
Overrides:
getTextContent in class NodeImpl
Throws:
org.w3c.dom.DOMException

setTextContent

public void setTextContent(java.lang.String textContent)
                    throws org.w3c.dom.DOMException
? @see org.w3c.dom.Node#setTextContent(java.lang.String)

Specified by:
setTextContent in interface org.w3c.dom.Node
Overrides:
setTextContent in class NodeImpl
Throws:
org.w3c.dom.DOMException

isSameNode

public boolean isSameNode(org.w3c.dom.Node other)
? @see org.w3c.dom.Node#isSameNode(org.w3c.dom.Node)

Specified by:
isSameNode in interface org.w3c.dom.Node
Overrides:
isSameNode in class NodeImpl

lookupPrefix

public java.lang.String lookupPrefix(java.lang.String namespaceURI)
? @see org.w3c.dom.Node#lookupPrefix(java.lang.String)

Specified by:
lookupPrefix in interface org.w3c.dom.Node
Overrides:
lookupPrefix in class NodeImpl

isDefaultNamespace

public boolean isDefaultNamespace(java.lang.String namespaceURI)
? @see org.w3c.dom.Node#isDefaultNamespace(java.lang.String)

Specified by:
isDefaultNamespace in interface org.w3c.dom.Node
Overrides:
isDefaultNamespace in class NodeImpl

lookupNamespaceURI

public java.lang.String lookupNamespaceURI(java.lang.String prefix)
? @see org.w3c.dom.Node#lookupNamespaceURI(java.lang.String)

Specified by:
lookupNamespaceURI in interface org.w3c.dom.Node
Overrides:
lookupNamespaceURI in class NodeImpl

isEqualNode

public boolean isEqualNode(org.w3c.dom.Node arg)
? @see org.w3c.dom.Node#isEqualNode(org.w3c.dom.Node)

Specified by:
isEqualNode in interface org.w3c.dom.Node
Overrides:
isEqualNode in class NodeImpl

getFeature

public java.lang.Object getFeature(java.lang.String feature,
                                   java.lang.String version)
? @see org.w3c.dom.Node#getFeature(java.lang.String, java.lang.String)

Specified by:
getFeature in interface org.w3c.dom.Node
Overrides:
getFeature in class NodeImpl

setUserData

public java.lang.Object setUserData(java.lang.String key,
                                    java.lang.Object data,
                                    org.w3c.dom.UserDataHandler handler)
? @see org.w3c.dom.Node#setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler)

Specified by:
setUserData in interface org.w3c.dom.Node
Overrides:
setUserData in class NodeImpl

getUserData

public java.lang.Object getUserData(java.lang.String key)
? @see org.w3c.dom.Node#getUserData(java.lang.String)

Specified by:
getUserData in interface org.w3c.dom.Node
Overrides:
getUserData in class NodeImpl

toString

public java.lang.String toString()
The method toString

Overrides:
toString in class java.lang.Object
Returns:
a String value

iterator

public java.util.Iterator<NodeImpl> iterator()
Specified by:
iterator in interface java.lang.Iterable<NodeImpl>

getDocumentAtExist

public DocumentAtExist getDocumentAtExist()
Specified by:
getDocumentAtExist in interface NodeAtExist

getNodeNumber

public int getNodeNumber()
Specified by:
getNodeNumber in interface NodeAtExist

getNodeId

public NodeId getNodeId()
Specified by:
getNodeId in interface NodeAtExist

getFirstChildFor

public int getFirstChildFor(int nodeNumber)
Specified by:
getFirstChildFor in interface DocumentAtExist

getNode

public NodeAtExist getNode(int nodeNr)
                    throws org.w3c.dom.DOMException
Specified by:
getNode in interface DocumentAtExist
Throws:
org.w3c.dom.DOMException

getNextNodeNumber

public int getNextNodeNumber(int nodeNr)
                      throws org.w3c.dom.DOMException
Specified by:
getNextNodeNumber in interface DocumentAtExist
Throws:
org.w3c.dom.DOMException

hasReferenceNodes

public boolean hasReferenceNodes()
Specified by:
hasReferenceNodes in interface DocumentAtExist