|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectorg.exist.dom.NodeImpl
org.exist.dom.DocumentImpl
public class DocumentImpl
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
|
static int |
UNKNOWN_DOCUMENT_ID
|
static byte |
XML_FILE
|
| 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 | |
|---|---|
Node |
adoptNode(Node node)
The method adoptNode |
void |
appendChild(StoredNode child)
The method appendChild |
short |
compareDocumentPosition(Node other)
? @see org.w3c.dom.Node#compareDocumentPosition(org.w3c.dom.Node) |
int |
compareTo(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. |
Attr |
createAttribute(String name)
The method createAttribute |
Attr |
createAttributeNS(String namespaceURI,
String qualifiedName)
The method createAttributeNS |
CDATASection |
createCDATASection(String data)
The method createCDATASection |
Comment |
createComment(String data)
The method createComment |
DocumentFragment |
createDocumentFragment()
The method createDocumentFragment |
Element |
createElement(String tagName)
The method createElement |
Element |
createElementNS(String namespaceURI,
String qualifiedName)
The method createElementNS |
EntityReference |
createEntityReference(String name)
The method createEntityReference |
ProcessingInstruction |
createProcessingInstruction(String target,
String data)
The method createProcessingInstruction |
Text |
createTextNode(String data)
The method createTextNode |
String |
getBaseURI()
? @see org.w3c.dom.Node#getBaseURI() |
BrokerPool |
getBrokerPool()
|
int |
getChildCount()
The method getChildCount |
NodeList |
getChildNodes()
The method getChildNodes |
Collection |
getCollection()
The method getCollection |
int |
getContentLength()
Returns the estimated size of the data in this document. |
int |
getDocId()
The method getDocId |
DocumentType |
getDoctype()
The method getDoctype |
Element |
getDocumentElement()
The method getDocumentElement |
String |
getDocumentURI()
? @see org.w3c.dom.Document#getDocumentURI() |
DOMConfiguration |
getDomConfig()
? @see org.w3c.dom.Document#getDomConfig() |
Element |
getElementById(String elementId)
The method getElementById |
NodeList |
getElementsByTagName(String tagname)
The method getElementsByTagName |
NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName)
The method getElementsByTagNameNS |
String |
getEncoding()
The method getEncoding |
Object |
getFeature(String feature,
String version)
? @see org.w3c.dom.Node#getFeature(java.lang.String, java.lang.String) |
XmldbURI |
getFileURI()
The method getFileURI |
Node |
getFirstChild()
|
long |
getFirstChildAddress()
The method getFirstChildAddress |
NodeProxy |
getFirstChildProxy()
|
DOMImplementation |
getImplementation()
The method getImplementation |
String |
getInputEncoding()
? @see org.w3c.dom.Document#getInputEncoding() |
String |
getLocalName()
The method getLocalName |
DocumentMetadata |
getMetadata()
The method getMetadata |
String |
getNamespaceURI()
The method getNamespaceURI |
Node |
getNextSibling()
The method getNextSibling |
Node |
getNode(NodeId nodeId)
The method getNode |
Node |
getNode(NodeProxy p)
The method getNode |
short |
getNodeType()
The method getNodeType |
Document |
getOwnerDocument()
The method getOwnerDocument |
Node |
getParentNode()
|
Permission |
getPermissions()
The method getPermissions |
Node |
getPreviousSibling()
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 |
String |
getTextContent()
? @see org.w3c.dom.Node#getTextContent() |
Lock |
getUpdateLock()
Returns the update lock associated with this resource. |
XmldbURI |
getURI()
The method getURI |
Object |
getUserData(String key)
? @see org.w3c.dom.Node#getUserData(java.lang.String) |
User |
getUserLock()
The method getUserLock |
String |
getVersion()
The method getVersion |
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 importedNode,
boolean deep)
The method importNode |
void |
insertAfter(NodeList nodes,
Node refChild)
|
void |
insertBefore(NodeList nodes,
Node refChild)
|
boolean |
isDefaultNamespace(String namespaceURI)
? @see org.w3c.dom.Node#isDefaultNamespace(java.lang.String) |
boolean |
isEqualNode(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(Node other)
? @see org.w3c.dom.Node#isSameNode(org.w3c.dom.Node) |
boolean |
isSupported(String type,
String value)
The method isSupported |
String |
lookupNamespaceURI(String prefix)
? @see org.w3c.dom.Node#lookupNamespaceURI(java.lang.String) |
String |
lookupPrefix(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 |
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 |
setChildCount(int count)
The method setChildCount |
void |
setCollection(Collection parent)
The method setCollection |
void |
setDocId(int docId)
The method setDocId |
void |
setDocumentType(DocumentType docType)
The method setDocumentType |
void |
setDocumentURI(String documentURI)
? @see org.w3c.dom.Document#setDocumentURI(java.lang.String) |
void |
setEncoding(String enc)
The method setEncoding |
void |
setFileURI(XmldbURI fileURI)
The method setFileURI |
void |
setMetadata(DocumentMetadata meta)
The method setMetadata |
void |
setOwnerDocument(Document doc)
The method setOwnerDocument |
void |
setPermissions(int mode)
The method setPermissions |
void |
setPermissions(Permission perm)
The method setPermissions |
void |
setPermissions(String mode)
The method setPermissions |
void |
setStandalone(boolean alone)
The method setStandalone |
void |
setStrictErrorChecking(boolean strict)
The method setStrictErrorChecking |
void |
setTextContent(String textContent)
? @see org.w3c.dom.Node#setTextContent(java.lang.String) |
Object |
setUserData(String key,
Object data,
UserDataHandler handler)
? @see org.w3c.dom.Node#setUserData(java.lang.String, java.lang.Object, org.w3c.dom.UserDataHandler) |
void |
setUserLock(User user)
The method setUserLock |
void |
setVersion(String version)
The method setVersion |
void |
setXmlStandalone(boolean xmlStandalone)
? @see org.w3c.dom.Document#setXmlStandalone(boolean) |
void |
setXmlVersion(String xmlVersion)
? @see org.w3c.dom.Document#setXmlVersion(java.lang.String) |
String |
toString()
The method toString |
void |
triggerDefrag()
The method triggerDefrag |
StoredNode |
updateChild(Txn transaction,
Node oldChild,
Node newChild)
Update a child node. |
void |
write(VariableByteOutputStream ostream)
The method write |
| Methods inherited from class org.exist.dom.NodeImpl |
|---|
appendChild, appendChildren, 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 |
|---|
equals, 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 |
|---|
public static final int UNKNOWN_DOCUMENT_ID
public static final byte XML_FILE
public static final byte BINARY_FILE
public static int LENGTH_DOCUMENT_ID
public static int LENGTH_DOCUMENT_TYPE
| Constructor Detail |
|---|
public DocumentImpl(BrokerPool pool)
DocumentImpl instance.
pool - a BrokerPool instance representing the db
public DocumentImpl(BrokerPool pool,
Collection collection)
DocumentImpl instance.
pool - a BrokerPool instance representing the dbcollection - a Collection value
public DocumentImpl(BrokerPool pool,
XmldbURI fileURI)
DocumentImpl instance.
pool - a BrokerPool instance representing the dbfileURI - a XmldbURI value
public DocumentImpl(BrokerPool pool,
Collection collection,
XmldbURI fileURI)
DocumentImpl instance.
pool - a BrokerPool instance representing the dbcollection - a Collection valuefileURI - a XmldbURI value| Method Detail |
|---|
public BrokerPool getBrokerPool()
public String getLocalName()
getLocalName
getLocalName in interface NodegetLocalName in class NodeImplString valueNode.getLocalName()public String getNamespaceURI()
getNamespaceURI
getNamespaceURI in interface NodegetNamespaceURI in class NodeImplString valueNode.getNamespaceURI()public Collection getCollection()
getCollection
Collection valuepublic void setCollection(Collection parent)
setCollection
parent - a Collection valuepublic int getDocId()
getDocId
int valuepublic void setDocId(int docId)
setDocId
docId - an int valuepublic byte getResourceType()
XML_FILE or
BINARY_FILE.
public XmldbURI getFileURI()
getFileURI
XmldbURI valuepublic void setFileURI(XmldbURI fileURI)
setFileURI
fileURI - a XmldbURI valuepublic XmldbURI getURI()
getURI
XmldbURI valuepublic Permission getPermissions()
getPermissions
Permission valuepublic void setPermissions(int mode)
setPermissions
mode - an int value
public void setPermissions(String mode)
throws SyntaxException
setPermissions
mode - a String value
SyntaxException - if an error occurspublic void setPermissions(Permission perm)
setPermissions
perm - a Permission valuepublic void setMetadata(DocumentMetadata meta)
setMetadata
meta - a DocumentMetadata valuepublic DocumentMetadata getMetadata()
getMetadata
DocumentMetadata valuepublic void copyOf(DocumentImpl other)
Collection when replacing a document.
other - a DocumentImpl valuepublic void copyChildren(DocumentImpl other)
copyChildren
other - a DocumentImpl valuepublic boolean isLockedForWrite()
public final Lock getUpdateLock()
public void setUserLock(User user)
setUserLock
user - an User valuepublic User getUserLock()
getUserLock
User valuepublic int getContentLength()
public void triggerDefrag()
triggerDefrag
public Node getNode(NodeId nodeId)
getNode
nodeId - a NodeId value
Node valuepublic Node getNode(NodeProxy p)
getNode
p - a NodeProxy value
Node value
public void appendChild(StoredNode child)
throws DOMException
appendChild
child - a StoredNode value
DOMException - if an error occurs
public void write(VariableByteOutputStream ostream)
throws IOException
write
ostream - a VariableByteOutputStream value
IOException - if an error occurs
public void read(VariableByteInput istream)
throws IOException,
EOFException
read
istream - a VariableByteInput value
IOException - if an error occurs
EOFException - if an error occurspublic void readDocumentMeta(VariableByteInput istream)
readDocumentMeta
istream - a VariableByteInput valuepublic final int compareTo(Object other)
compareTo
compareTo in interface Comparableother - an Object value
int value
public StoredNode updateChild(Txn transaction,
Node oldChild,
Node newChild)
throws DOMException
NodeImpl
updateChild in class NodeImplDOMException
public void insertBefore(NodeList nodes,
Node refChild)
throws DOMException
DOMException
public void insertAfter(NodeList nodes,
Node refChild)
throws DOMException
DOMExceptionpublic Node getFirstChild()
getFirstChild in interface NodegetFirstChild in class NodeImplNode.getFirstChild()public NodeProxy getFirstChildProxy()
public long getFirstChildAddress()
getFirstChildAddress
long valuepublic NodeList getChildNodes()
getChildNodes
getChildNodes in interface NodegetChildNodes in class NodeImplNodeList valuepublic DocumentType getDoctype()
getDoctype
getDoctype in interface DocumentDocumentType valuepublic void setDocumentType(DocumentType docType)
setDocumentType
docType - a DocumentType valuepublic Document getOwnerDocument()
getOwnerDocument
getOwnerDocument in interface NodeDocument valuepublic void setOwnerDocument(Document doc)
setOwnerDocument
doc - a Document valuepublic QName getQName()
getQName
getQName in interface QNameableQName valuepublic short getNodeType()
getNodeType
getNodeType in interface Nodeshort valuepublic Node getPreviousSibling()
getPreviousSibling
getPreviousSibling in interface NodeNode valuepublic Node getNextSibling()
getNextSibling
getNextSibling in interface NodeNode value
public Attr createAttribute(String name)
throws DOMException
createAttribute
createAttribute in interface Documentname - a String value
Attr value
DOMException - if an error occurs
public Attr createAttributeNS(String namespaceURI,
String qualifiedName)
throws DOMException
createAttributeNS
createAttributeNS in interface DocumentnamespaceURI - a String valuequalifiedName - a String value
Attr value
DOMException - if an error occurs
public Element createElement(String tagName)
throws DOMException
createElement
createElement in interface DocumenttagName - a String value
Element value
DOMException - if an error occurs
public Element createElementNS(String namespaceURI,
String qualifiedName)
throws DOMException
createElementNS
createElementNS in interface DocumentnamespaceURI - a String valuequalifiedName - a String value
Element value
DOMException - if an error occurspublic Text createTextNode(String data)
createTextNode
createTextNode in interface Documentdata - a String value
Text valuepublic Element getDocumentElement()
getDocumentElement
getDocumentElement in interface DocumentElement valuepublic NodeList getElementsByTagName(String tagname)
getElementsByTagName
getElementsByTagName in interface Documenttagname - a String value
NodeList value
public NodeList getElementsByTagNameNS(String namespaceURI,
String localName)
getElementsByTagNameNS
getElementsByTagNameNS in interface DocumentnamespaceURI - a String valuelocalName - a String value
NodeList valuepublic Node getParentNode()
getParentNode in interface Nodepublic int getChildCount()
getChildCount
getChildCount in class NodeImplint valuepublic void setChildCount(int count)
setChildCount
count - an int valuepublic String getEncoding()
getEncoding
String valuepublic void setEncoding(String enc)
setEncoding
enc - a String valuepublic String getVersion()
getVersion
String valuepublic void setVersion(String version)
setVersion
version - a String valuepublic boolean getStandalone()
getStandalone
boolean valuepublic void setStandalone(boolean alone)
setStandalone
alone - a boolean value
public CDATASection createCDATASection(String data)
throws DOMException
createCDATASection
createCDATASection in interface Documentdata - a String value
CDATASection value
DOMException - if an error occurspublic Comment createComment(String data)
createComment
createComment in interface Documentdata - a String value
Comment value
public DocumentFragment createDocumentFragment()
throws DOMException
createDocumentFragment
createDocumentFragment in interface DocumentDocumentFragment value
DOMException - if an error occurs
public EntityReference createEntityReference(String name)
throws DOMException
createEntityReference
createEntityReference in interface Documentname - a String value
EntityReference value
DOMException - if an error occurs
public ProcessingInstruction createProcessingInstruction(String target,
String data)
throws DOMException
createProcessingInstruction
createProcessingInstruction in interface Documenttarget - a String valuedata - a String value
ProcessingInstruction value
DOMException - if an error occurspublic Element getElementById(String elementId)
getElementById
getElementById in interface DocumentelementId - a String value
Element valuepublic DOMImplementation getImplementation()
getImplementation
getImplementation in interface Documentorg.w3c.dom.DOMImplementation valuepublic boolean getStrictErrorChecking()
getStrictErrorChecking
getStrictErrorChecking in interface Documentboolean value
public Node adoptNode(Node node)
throws DOMException
adoptNode
adoptNode in interface Documentnode - a Node value
Node value
DOMException - if an error occurs
public Node importNode(Node importedNode,
boolean deep)
throws DOMException
importNode
importNode in interface DocumentimportedNode - a Node valuedeep - a boolean value
Node value
DOMException - if an error occurs
public boolean isSupported(String type,
String value)
isSupported
isSupported in interface NodeisSupported in class NodeImpltype - a String valuevalue - a String value
boolean valueNode.isSupported(java.lang.String, java.lang.String)public void setStrictErrorChecking(boolean strict)
setStrictErrorChecking
setStrictErrorChecking in interface Documentstrict - a boolean valuepublic 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 String getDocumentURI()
getDocumentURI in interface Documentpublic void setDocumentURI(String documentURI)
setDocumentURI in interface Documentpublic 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 String getBaseURI()
getBaseURI in interface NodegetBaseURI in class NodeImpl
public short compareDocumentPosition(Node other)
throws DOMException
compareDocumentPosition in interface NodecompareDocumentPosition in class NodeImplDOMException
public String getTextContent()
throws DOMException
getTextContent in interface NodegetTextContent in class NodeImplDOMException
public void setTextContent(String textContent)
throws DOMException
setTextContent in interface NodesetTextContent in class NodeImplDOMExceptionpublic boolean isSameNode(Node other)
isSameNode in interface NodeisSameNode in class NodeImplpublic String lookupPrefix(String namespaceURI)
lookupPrefix in interface NodelookupPrefix in class NodeImplpublic boolean isDefaultNamespace(String namespaceURI)
isDefaultNamespace in interface NodeisDefaultNamespace in class NodeImplpublic String lookupNamespaceURI(String prefix)
lookupNamespaceURI in interface NodelookupNamespaceURI in class NodeImplpublic boolean isEqualNode(Node arg)
isEqualNode in interface NodeisEqualNode in class NodeImpl
public Object getFeature(String feature,
String version)
getFeature in interface NodegetFeature in class NodeImpl
public Object setUserData(String key,
Object data,
UserDataHandler handler)
setUserData in interface NodesetUserData in class NodeImplpublic Object getUserData(String key)
getUserData in interface NodegetUserData in class NodeImplpublic String toString()
toString
toString in class ObjectString value
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||