|
|||||||
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 dbpublic DocumentImpl(BrokerPool pool, Collection collection)
DocumentImpl
instance.
pool
- a BrokerPool
instance representing the dbcollection
- a Collection
valuepublic DocumentImpl(BrokerPool pool, XmldbURI fileURI)
DocumentImpl
instance.
pool
- a BrokerPool
instance representing the dbfileURI
- a XmldbURI
valuepublic DocumentImpl(BrokerPool pool, Collection collection, XmldbURI fileURI)
DocumentImpl
instance.
pool
- a BrokerPool
instance representing the dbcollection
- a Collection
valuefileURI
- a XmldbURI
valueMethod Detail |
---|
public BrokerPool getBrokerPool()
public String getLocalName()
getLocalName
getLocalName
in interface Node
getLocalName
in class NodeImpl
String
valueNode.getLocalName()
public String getNamespaceURI()
getNamespaceURI
getNamespaceURI
in interface Node
getNamespaceURI
in class NodeImpl
String
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
valuepublic 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
valuepublic void appendChild(StoredNode child) throws DOMException
appendChild
child
- a StoredNode
value
DOMException
- if an error occurspublic void write(VariableByteOutputStream ostream) throws IOException
write
ostream
- a VariableByteOutputStream
value
IOException
- if an error occurspublic 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 Comparable
other
- an Object
value
int
valuepublic StoredNode updateChild(Txn transaction, Node oldChild, Node newChild) throws DOMException
NodeImpl
updateChild
in class NodeImpl
DOMException
public void insertBefore(NodeList nodes, Node refChild) throws DOMException
DOMException
public void insertAfter(NodeList nodes, Node refChild) throws DOMException
DOMException
public Node getFirstChild()
getFirstChild
in interface Node
getFirstChild
in class NodeImpl
Node.getFirstChild()
public NodeProxy getFirstChildProxy()
public long getFirstChildAddress()
getFirstChildAddress
long
valuepublic NodeList getChildNodes()
getChildNodes
getChildNodes
in interface Node
getChildNodes
in class NodeImpl
NodeList
valuepublic DocumentType getDoctype()
getDoctype
getDoctype
in interface Document
DocumentType
valuepublic void setDocumentType(DocumentType docType)
setDocumentType
docType
- a DocumentType
valuepublic Document getOwnerDocument()
getOwnerDocument
getOwnerDocument
in interface Node
Document
valuepublic void setOwnerDocument(Document doc)
setOwnerDocument
doc
- a Document
valuepublic QName getQName()
getQName
getQName
in interface QNameable
QName
valuepublic short getNodeType()
getNodeType
getNodeType
in interface Node
short
valuepublic Node getPreviousSibling()
getPreviousSibling
getPreviousSibling
in interface Node
Node
valuepublic Node getNextSibling()
getNextSibling
getNextSibling
in interface Node
Node
valuepublic Attr createAttribute(String name) throws DOMException
createAttribute
createAttribute
in interface Document
name
- a String
value
Attr
value
DOMException
- if an error occurspublic Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException
createAttributeNS
createAttributeNS
in interface Document
namespaceURI
- a String
valuequalifiedName
- a String
value
Attr
value
DOMException
- if an error occurspublic Element createElement(String tagName) throws DOMException
createElement
createElement
in interface Document
tagName
- a String
value
Element
value
DOMException
- if an error occurspublic Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException
createElementNS
createElementNS
in interface Document
namespaceURI
- a String
valuequalifiedName
- a String
value
Element
value
DOMException
- if an error occurspublic Text createTextNode(String data)
createTextNode
createTextNode
in interface Document
data
- a String
value
Text
valuepublic Element getDocumentElement()
getDocumentElement
getDocumentElement
in interface Document
Element
valuepublic NodeList getElementsByTagName(String tagname)
getElementsByTagName
getElementsByTagName
in interface Document
tagname
- a String
value
NodeList
valuepublic NodeList getElementsByTagNameNS(String namespaceURI, String localName)
getElementsByTagNameNS
getElementsByTagNameNS
in interface Document
namespaceURI
- a String
valuelocalName
- a String
value
NodeList
valuepublic Node getParentNode()
getParentNode
in interface Node
public int getChildCount()
getChildCount
getChildCount
in class NodeImpl
int
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
valuepublic CDATASection createCDATASection(String data) throws DOMException
createCDATASection
createCDATASection
in interface Document
data
- a String
value
CDATASection
value
DOMException
- if an error occurspublic Comment createComment(String data)
createComment
createComment
in interface Document
data
- a String
value
Comment
valuepublic DocumentFragment createDocumentFragment() throws DOMException
createDocumentFragment
createDocumentFragment
in interface Document
DocumentFragment
value
DOMException
- if an error occurspublic EntityReference createEntityReference(String name) throws DOMException
createEntityReference
createEntityReference
in interface Document
name
- a String
value
EntityReference
value
DOMException
- if an error occurspublic ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException
createProcessingInstruction
createProcessingInstruction
in interface Document
target
- a String
valuedata
- a String
value
ProcessingInstruction
value
DOMException
- if an error occurspublic Element getElementById(String elementId)
getElementById
getElementById
in interface Document
elementId
- a String
value
Element
valuepublic DOMImplementation getImplementation()
getImplementation
getImplementation
in interface Document
org.w3c.dom.DOMImplementation
valuepublic boolean getStrictErrorChecking()
getStrictErrorChecking
getStrictErrorChecking
in interface Document
boolean
valuepublic Node adoptNode(Node node) throws DOMException
adoptNode
adoptNode
in interface Document
node
- a Node
value
Node
value
DOMException
- if an error occurspublic Node importNode(Node importedNode, boolean deep) throws DOMException
importNode
importNode
in interface Document
importedNode
- a Node
valuedeep
- a boolean
value
Node
value
DOMException
- if an error occurspublic boolean isSupported(String type, String value)
isSupported
isSupported
in interface Node
isSupported
in class NodeImpl
type
- a String
valuevalue
- a String
value
boolean
valueNode.isSupported(java.lang.String, java.lang.String)
public void setStrictErrorChecking(boolean strict)
setStrictErrorChecking
setStrictErrorChecking
in interface Document
strict
- a boolean
valuepublic 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 String getDocumentURI()
getDocumentURI
in interface Document
public void setDocumentURI(String documentURI)
setDocumentURI
in interface Document
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 String getBaseURI()
getBaseURI
in interface Node
getBaseURI
in class NodeImpl
public short compareDocumentPosition(Node other) throws DOMException
compareDocumentPosition
in interface Node
compareDocumentPosition
in class NodeImpl
DOMException
public String getTextContent() throws DOMException
getTextContent
in interface Node
getTextContent
in class NodeImpl
DOMException
public void setTextContent(String textContent) throws DOMException
setTextContent
in interface Node
setTextContent
in class NodeImpl
DOMException
public boolean isSameNode(Node other)
isSameNode
in interface Node
isSameNode
in class NodeImpl
public String lookupPrefix(String namespaceURI)
lookupPrefix
in interface Node
lookupPrefix
in class NodeImpl
public boolean isDefaultNamespace(String namespaceURI)
isDefaultNamespace
in interface Node
isDefaultNamespace
in class NodeImpl
public String lookupNamespaceURI(String prefix)
lookupNamespaceURI
in interface Node
lookupNamespaceURI
in class NodeImpl
public boolean isEqualNode(Node arg)
isEqualNode
in interface Node
isEqualNode
in class NodeImpl
public Object getFeature(String feature, String version)
getFeature
in interface Node
getFeature
in class NodeImpl
public Object setUserData(String key, Object data, UserDataHandler handler)
setUserData
in interface Node
setUserData
in class NodeImpl
public Object getUserData(String key)
getUserData
in interface Node
getUserData
in class NodeImpl
public String toString()
toString
toString
in class Object
String
value
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |