|
Xindice API version 1.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.apache.xindice.xml.dom.NodeImpl
|
+--org.apache.xindice.xml.dom.ContainerNodeImpl
|
+--org.apache.xindice.xml.dom.DocumentImpl
DocumentImpl
| Fields inherited from class org.apache.xindice.xml.dom.ContainerNodeImpl |
childNodes |
| Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
| Fields inherited from interface org.apache.xindice.xml.dom.DBDocument |
CACHE, CACHE_CONTROL, NOCACHE |
| Constructor Summary | |
DocumentImpl()
Create empty dirty document. |
|
DocumentImpl(byte[] data,
SymbolTable symbols)
Create document from the compressed data. |
|
DocumentImpl(byte[] data,
SymbolTable symbols,
NodeSource source)
Create document from the compressed data. |
|
DocumentImpl(org.w3c.dom.Document doc)
Create a compressed document out of another document. |
|
| Method Summary | |
org.w3c.dom.Node |
adoptNode(org.w3c.dom.Node src)
|
protected void |
checkLoaded()
|
org.w3c.dom.Attr |
createAttribute(String name)
Creates an Attr of the given name. |
org.w3c.dom.Attr |
createAttributeNS(String namespaceURI,
String qualifiedName)
|
org.w3c.dom.CDATASection |
createCDATASection(String data)
Creates a CDATASection node whose value is the specified
string. |
org.w3c.dom.Comment |
createComment(String data)
Creates a Comment node given the specified string. |
org.w3c.dom.DocumentFragment |
createDocumentFragment()
Creates an empty DocumentFragment object. |
org.w3c.dom.Element |
createElement(String tagName)
Creates an element of the type specified. |
org.w3c.dom.Element |
createElementNS(String namespaceURI,
String qualifiedName)
|
org.w3c.dom.EntityReference |
createEntityReference(String name)
Creates an EntityReference object. |
org.w3c.dom.traversal.NodeIterator |
createNodeIterator(org.w3c.dom.Node root,
int whatToShow,
org.w3c.dom.traversal.NodeFilter filter,
boolean entityReferenceExpansion)
|
org.w3c.dom.ProcessingInstruction |
createProcessingInstruction(String target,
String data)
Creates a ProcessingInstruction node given the specified
name and data strings. |
org.w3c.dom.Text |
createTextNode(String data)
Creates a Text node given the specified string. |
org.w3c.dom.traversal.TreeWalker |
createTreeWalker(org.w3c.dom.Node root,
int whatToShow,
org.w3c.dom.traversal.NodeFilter filter,
boolean entityReferenceExpansion)
|
void |
expandSource()
expandSource expands the source into the Node as a namespace and a set of attributes. |
org.w3c.dom.DocumentType |
getDoctype()
The Document Type Declaration (see DocumentType) associated
with this document. |
org.w3c.dom.Element |
getDocumentElement()
This is a convenience attribute that allows direct access to the child node that is the root element of the document. |
String |
getDocumentURI()
|
org.w3c.dom.DOMConfiguration |
getDomConfig()
|
org.w3c.dom.DOMImplementation |
getImplementation()
The DOMImplementation object that handles this document. |
String |
getInputEncoding()
|
org.w3c.dom.Node |
getNodeAtPos(int pos)
getNodeAtPos returns the Node that exists at the specified byte data position in the compressed stream. |
String |
getNodeName()
The name of this node, depending on its type; see the table above. |
short |
getNodeType()
A code representing the type of the underlying object, as defined above. |
boolean |
getStrictErrorChecking()
|
SymbolTable |
getSymbols()
getSymbols returns the Symbol table for this Document. |
String |
getTextContent()
This method returns the text content of this node and its descendants. |
String |
getXmlEncoding()
|
boolean |
getXmlStandalone()
|
String |
getXmlVersion()
|
org.w3c.dom.Node |
importNode(org.w3c.dom.Node importedNode,
boolean deep)
|
boolean |
isCaching()
getCaching returns whether or not this Document should be cached by some sort of caching mechanism. |
boolean |
isReadOnly()
|
void |
normalizeDocument()
|
org.w3c.dom.Node |
renameNode(org.w3c.dom.Node n,
String namespaceURI,
String qualifiedName)
Rename an existing node of type ELEMENT_NODE or ATTRIBUTE_NODE. |
void |
setCaching(boolean caching)
setCaching sets whether or not this Document should be cached by some sort of caching mechanism. |
void |
setDoctype(org.w3c.dom.DocumentType docType)
|
void |
setDocumentURI(String documentURI)
|
void |
setInputEncoding(String inputEncoding)
|
void |
setStrictErrorChecking(boolean strictErrorChecking)
|
void |
setSymbols(SymbolTable symbols)
setSymbols sets the Symbol table for this Document. |
void |
setXmlEncoding(String xmlEncoding)
|
void |
setXmlStandalone(boolean standalone)
|
void |
setXmlVersion(String version)
|
| Methods inherited from class org.apache.xindice.xml.dom.ContainerNodeImpl |
appendChild, getChildNodes, getElementById, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getLastChild, getNextSibling, getPreviousSibling, hasChildNodes, insertBefore, isEqualNode, isNodeTypeValid, loadChildren, normalize, removeChild, replaceChild |
| Methods inherited from class org.apache.xindice.xml.dom.NodeImpl |
checkReadOnly, cloneNode, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getDataBytes, getDataLen, getDataPos, getFeature, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getSource, getSymbolID, getUserData, hasAttributes, invokeHandlers, invokeHandlers, isDefaultNamespace, isDefined, isDirty, isLoaded, isSameNode, isSupported, load, lookupDefaultNamespaceURI, lookupNamespaceURI, lookupPrefix, setDataBytes, setDataBytes, setDataLen, setDataPos, setDirty, setNodeName, setNodeValue, setParentNode, setPrefix, setSource, setTextContent, setUserData, toString, unload |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.xindice.xml.dom.CompressedNode |
getDataBytes, getDataLen, getDataPos, getSymbolID, isDirty, isLoaded, load, setDataBytes, setDataBytes, setDataLen, setDataPos, unload |
| Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
| Methods inherited from interface org.w3c.dom.Document |
getElementById, getElementsByTagName, getElementsByTagNameNS |
| Methods inherited from interface org.apache.xindice.xml.dom.DBNode |
getSource, setSource |
| Constructor Detail |
public DocumentImpl()
public DocumentImpl(byte[] data,
SymbolTable symbols)
data - compressed document datasymbols - symbol table used to compress a document
public DocumentImpl(byte[] data,
SymbolTable symbols,
NodeSource source)
data - compressed document datasymbols - symbol table used to compress a documentsource - identifies document originpublic DocumentImpl(org.w3c.dom.Document doc)
doc - document to copy| Method Detail |
public boolean isReadOnly()
protected void checkLoaded()
checkLoaded in class ContainerNodeImplpublic boolean isCaching()
DBDocumentisCaching in interface DBDocumentorg.apache.xindice.xml.dom.DBDocumentpublic void setCaching(boolean caching)
DBDocumentsetCaching in interface DBDocumentorg.apache.xindice.xml.dom.DBDocumentcaching - Whether or not the Document can be cachedpublic SymbolTable getSymbols()
CompressedDocumentgetSymbols in interface CompressedDocumentorg.apache.xindice.xml.dom.CompressedDocumentpublic void setSymbols(SymbolTable symbols)
CompressedDocumentsetSymbols in interface CompressedDocumentorg.apache.xindice.xml.dom.CompressedDocumentsymbols - The Symbol tableorg.w3c.dom.DOMException - if an exception occurspublic void expandSource()
DBNodeexpandSource in interface DBNodeexpandSource in class NodeImplpublic org.w3c.dom.Node getNodeAtPos(int pos)
CompressedDocumentgetNodeAtPos in interface CompressedDocumentorg.apache.xindice.xml.dom.CompressedDocumentpos - The compressed stream positionpublic short getNodeType()
NodeImplgetNodeType in interface org.w3c.dom.NodegetNodeType in class NodeImplpublic String getNodeName()
NodeImplgetNodeName in interface org.w3c.dom.NodegetNodeName in class NodeImplpublic org.w3c.dom.DocumentType getDoctype()
DocumentType) associated
with this document. For HTML documents as well as XML documents without
a document type declaration this returns null. The DOM Level
1 does not support editing the Document Type Declaration, therefore
docType cannot be altered in any way.getDoctype in interface org.w3c.dom.Documentpublic void setDoctype(org.w3c.dom.DocumentType docType)
public org.w3c.dom.DOMImplementation getImplementation()
DOMImplementation object that handles this document. A
DOM application may use objects from multiple implementations.getImplementation in interface org.w3c.dom.Documentpublic org.w3c.dom.Text createTextNode(String data)
Text node given the specified string.createTextNode in interface org.w3c.dom.Documentdata - The data for the node.Text object.public org.w3c.dom.Element getDocumentElement()
getDocumentElement in interface org.w3c.dom.Document
public org.w3c.dom.CDATASection createCDATASection(String data)
throws org.w3c.dom.DOMException
CDATASection node whose value is the specified
string.createCDATASection in interface org.w3c.dom.Documentdata - The data for the CDATASection contents.CDATASection object.org.w3c.dom.DOMException - NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
public org.w3c.dom.Element createElement(String tagName)
throws org.w3c.dom.DOMException
createElement in interface org.w3c.dom.DocumenttagName - The name of the element type to instantiate. For XML, this
is case-sensitive. For HTML, the tagName parameter may
be provided in any case, but it must be mapped to the canonical
uppercase form by the DOM implementation.Element object.org.w3c.dom.DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an
invalid character.public org.w3c.dom.DocumentFragment createDocumentFragment()
DocumentFragment object.createDocumentFragment in interface org.w3c.dom.DocumentDocumentFragment.
public org.w3c.dom.Attr createAttribute(String name)
throws org.w3c.dom.DOMException
Attr of the given name. Note that the
Attr instance can then be set on an Element
using the setAttribute method.createAttribute in interface org.w3c.dom.Documentname - The name of the attribute.Attr object.org.w3c.dom.DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an
invalid character.public org.w3c.dom.Comment createComment(String data)
Comment node given the specified string.createComment in interface org.w3c.dom.Documentdata - The data for the node.Comment object.
public org.w3c.dom.ProcessingInstruction createProcessingInstruction(String target,
String data)
throws org.w3c.dom.DOMException
ProcessingInstruction node given the specified
name and data strings.createProcessingInstruction in interface org.w3c.dom.Documenttarget - The target part of the processing instruction.data - The data for the node.ProcessingInstruction object.org.w3c.dom.DOMException - INVALID_CHARACTER_ERR: Raised if an invalid character is specified.
public org.w3c.dom.EntityReference createEntityReference(String name)
throws org.w3c.dom.DOMException
createEntityReference in interface org.w3c.dom.Documentname - The name of the entity to reference.EntityReference object.org.w3c.dom.DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an
invalid character.
public org.w3c.dom.Node importNode(org.w3c.dom.Node importedNode,
boolean deep)
importNode in interface org.w3c.dom.Document
public org.w3c.dom.Element createElementNS(String namespaceURI,
String qualifiedName)
createElementNS in interface org.w3c.dom.Document
public org.w3c.dom.Attr createAttributeNS(String namespaceURI,
String qualifiedName)
createAttributeNS in interface org.w3c.dom.Document
public org.w3c.dom.traversal.NodeIterator createNodeIterator(org.w3c.dom.Node root,
int whatToShow,
org.w3c.dom.traversal.NodeFilter filter,
boolean entityReferenceExpansion)
throws org.w3c.dom.DOMException
createNodeIterator in interface org.w3c.dom.traversal.DocumentTraversal
public org.w3c.dom.traversal.TreeWalker createTreeWalker(org.w3c.dom.Node root,
int whatToShow,
org.w3c.dom.traversal.NodeFilter filter,
boolean entityReferenceExpansion)
throws org.w3c.dom.DOMException
createTreeWalker in interface org.w3c.dom.traversal.DocumentTraversalpublic org.w3c.dom.Node adoptNode(org.w3c.dom.Node src)
public boolean getStrictErrorChecking()
public void setStrictErrorChecking(boolean strictErrorChecking)
public String getDocumentURI()
public void setDocumentURI(String documentURI)
public String getInputEncoding()
public void setInputEncoding(String inputEncoding)
public String getXmlEncoding()
public void setXmlEncoding(String xmlEncoding)
public boolean getXmlStandalone()
public void setXmlStandalone(boolean standalone)
throws org.w3c.dom.DOMException
public String getXmlVersion()
public void setXmlVersion(String version)
throws org.w3c.dom.DOMException
public org.w3c.dom.DOMConfiguration getDomConfig()
public void normalizeDocument()
public org.w3c.dom.Node renameNode(org.w3c.dom.Node n,
String namespaceURI,
String qualifiedName)
throws org.w3c.dom.DOMException
n - The node to rename.namespaceURI - The new namespace URI.qualifiedName - The new qualified name.org.w3c.dom.DOMException - NOT_SUPPORTED_ERR: Raised when the type of the
specified node is neither ELEMENT_NODE nor ATTRIBUTE_NODE, or if the
implementation does not support the renaming of the document element.org.w3c.dom.DOMException - INVALID_CHARACTER_ERR: Raised if the new qualified
name is not an XML name according to the XML version in use specified
in the Document.xmlVersion attribute.org.w3c.dom.DOMException - WRONG_DOCUMENT_ERR: Raised when the specified node
was created from a different document than this document.org.w3c.dom.DOMException - NAMESPACE_ERR: Raised if the qualifiedName is a
malformed qualified name, if the qualifiedName has a prefix and the
namespaceURI is null, or if the qualifiedName has a prefix that is
"xml" and the namespaceURI is different from
"http://www.w3.org/XML/1998/namespace" [XML Namespaces]. Also raised,
when the node being renamed is an attribute, if the qualifiedName, or
its prefix, is "xmlns" and the namespaceURI is different from
"http://www.w3.org/2000/xmlns/".public String getTextContent()
NodeImpl| Node type | Content |
|---|---|
| ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, DOCUMENT_FRAGMENT_NODE | concatenation of the textContent attribute value of every child node, excluding COMMENT_NODE and PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the node has no children. |
| TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE | nodeValue |
| DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE | null |
getTextContent in class ContainerNodeImpl
|
Xindice API version 1.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||