org.apache.batik.dom
public abstract class AbstractDocument extends AbstractParentNode implements Document, DocumentEvent, DocumentTraversal, Localizable, XPathEvaluator
| Nested Class Summary | |
|---|---|
| protected class | AbstractDocument.DocumentConfiguration
DOMConfiguration for this document. |
| protected class | AbstractDocument.DocumentError
DOMError implementation. |
| protected class | AbstractDocument.IdSoftRef |
| protected class | AbstractDocument.XPathExpr
A compiled XPath expression. |
| protected class | AbstractDocument.XPathNodeNSResolver
An XPathNSResolver that uses Node.lookupNamespaceURI. |
| Field Summary | |
|---|---|
| protected DocumentEventSupport | documentEventSupport
The DocumentEventSupport. |
| protected String | documentURI
The document URI. |
| protected AbstractDocument.DocumentConfiguration | domConfig
The DOMConfiguration object for this document. |
| protected Map | elementsById
The elementsById lists.
|
| protected WeakHashMap | elementsByTagNames
The ElementsByTagName lists. |
| protected WeakHashMap | elementsByTagNamesNS
The ElementsByTagNameNS lists. |
| protected boolean | eventsEnabled
Whether the event dispatching must be done. |
| protected DOMImplementation | implementation
The DOM implementation. |
| protected String | inputEncoding
Input encoding of this document. |
| protected LocalizableSupport | localizableSupport
The localizable support for the error messages. |
| protected static String | RESOURCES
The error messages bundle class name. |
| protected boolean | strictErrorChecking
Whether strict error checking is in force. |
| protected TraversalSupport | traversalSupport
The traversal support. |
| protected XBLManager | xblManager
The XBL manager for this document. |
| protected String | xmlEncoding
XML encoding of this document. |
| protected boolean | xmlStandalone
Whether this document is standalone. |
| protected String | xmlVersion
XML version of this document. |
| Constructor Summary | |
|---|---|
| protected | AbstractDocument()
Creates a new document. |
| AbstractDocument(DocumentType dt, DOMImplementation impl)
Creates a new document. | |
| Method Summary | |
|---|---|
| void | addIdEntry(Element e, String id) |
| Node | adoptNode(Node n)
DOM: Implements {@link org.w3c.dom.Document#adoptNode(Node)}. |
| protected void | adoptNode1(AbstractNode n)
Helper function for {@link #adoptNode(Node)}. |
| boolean | canDispatch(String ns, String eventType)
DOM: Implements {@link
org.w3c.dom.events.DocumentEvent#canDispatch(String,String)}. |
| protected boolean | checkChars(String s)
Checks that the characters in the given string are all valid
content characters. |
| protected void | checkChildType(Node n, boolean replace)
Checks the validity of a node to be inserted. |
| protected boolean | checkName(String s)
Checks that the given string is a valid XML name. |
| Node | cloneNode(boolean deep)
DOM: Implements {@link org.w3c.dom.Node#cloneNode(boolean)}. |
| protected Node | copyInto(Node n)
Copy the fields of the current node into the given node. |
| protected DOMError | createDOMError(String type, short severity, String key, Object[] args, Node related, Exception e)
Creates a DOMError object with the given parameters. |
| Event | createEvent(String eventType)
DOM: Implements {@link
org.w3c.dom.events.DocumentEvent#createEvent(String)}. |
| XPathExpression | createExpression(String expression, XPathNSResolver resolver)
DOM: Implements
{@link org.w3c.dom.xpath.XPathEvaluator#createExpression(String,XPathNSResolver)}. |
| NodeIterator | createNodeIterator(Node root, int whatToShow, NodeFilter filter, boolean entityReferenceExpansion)
DOM: Implements {@link
DocumentTraversal#createNodeIterator(Node,int,NodeFilter,boolean)}. |
| XPathNSResolver | createNSResolver(Node n)
DOM: Implements
{@link org.w3c.dom.xpath.XPathEvaluator#createNSResolver(Node)}. |
| TreeWalker | createTreeWalker(Node root, int whatToShow, NodeFilter filter, boolean entityReferenceExpansion)
DOM: Implements {@link
DocumentTraversal#createTreeWalker(Node,int,NodeFilter,boolean)}. |
| XPathException | createXPathException(short type, String key, Object[] args)
Creates an exception with the appropriate error message. |
| protected Node | deepCopyInto(Node n)
Deeply copy the fields of the current node into the given node. |
| protected Node | deepExport(Node n, Document d)
Deeply exports this node to the given document. |
| void | detachNodeIterator(NodeIterator it)
Detaches the given node iterator from this document. |
| Object | evaluate(String expression, Node contextNode, XPathNSResolver resolver, short type, Object result)
DOM: Implements
{@link org.w3c.dom.xpath.XPathEvaluator#evaluate(String,Node,XPathNSResolver,short,Object)}. |
| protected Node | export(Node n, Document d)
Exports this node to the given document. |
| String | formatMessage(String key, Object[] args)
Implements {@link
org.apache.batik.i18n.Localizable#formatMessage(String,Object[])}. |
| Element | getChildElementById(Node requestor, String id)
Finds an element that is in the same document fragment as
'requestor' that has 'id'. |
| protected AbstractDocument | getCurrentDocument()
Returns the current document. |
| DocumentType | getDoctype()
DOM: Implements {@link org.w3c.dom.Document#getDoctype()}. |
| Element | getDocumentElement()
DOM: Implements {@link
org.w3c.dom.Document#getDocumentElement()}. |
| String | getDocumentURI()
DOM: Implements {@link org.w3c.dom.Document#getDocumentURI()}. |
| DOMConfiguration | getDomConfig()
DOM: Implements {@link org.w3c.dom.Document#getDomConfig()}. |
| Element | getElementById(String id)
DOM: Implements {@link
org.w3c.dom.Document#getElementById(String)}. |
| ElementsByTagName | getElementsByTagName(Node n, String ln)
Returns an ElementsByTagName object from the cache, if any. |
| ElementsByTagNameNS | getElementsByTagNameNS(Node n, String ns, String ln)
Returns an ElementsByTagNameNS object from the cache, if any. |
| boolean | getEventsEnabled()
Tests whether the event dispatching must be done. |
| DOMImplementation | getImplementation()
DOM: Implements {@link org.w3c.dom.Document#getImplementation()}. |
| String | getInputEncoding()
DOM: Implements {@link org.w3c.dom.Document#getInputEncoding()}. |
| Locale | getLocale()
Implements {@link org.apache.batik.i18n.Localizable#getLocale()}. |
| String | getNodeName()
DOM: Implements {@link org.w3c.dom.Node#getNodeName()}. |
| short | getNodeType()
DOM: Implements {@link org.w3c.dom.Node#getNodeType()}. |
| protected Node | getRoot(Node n) |
| boolean | getStrictErrorChecking()
DOM: Implements {@link org.w3c.dom.Document#getStrictErrorChecking()}. |
| Element | getXblBoundElement()
Get the bound element whose shadow tree this current node resides in. |
| NodeList | getXblChildNodes()
Get the list of child nodes of this node in the fully flattened tree. |
| NodeList | getXblDefinitions()
Get the xbl:definition elements currently binding this element. |
| Node | getXblFirstChild()
Get the first child node of this node in the fully flattened tree. |
| Element | getXblFirstElementChild()
Get the first element child of this node in the fully flattened tree. |
| Node | getXblLastChild()
Get the last child node of this node in the fully flattened tree. |
| Element | getXblLastElementChild()
Get the last element child of this node in the fully flattened tree. |
| Element | getXblNextElementSibling()
Get the first element that follows the current node in the
xblParentNode's xblChildNodes list. |
| Node | getXblNextSibling()
Get the node which directly follows the current node in the
xblParentNode's xblChildNodes list. |
| Node | getXblParentNode()
Get the parent of this node in the fully flattened tree. |
| Element | getXblPreviousElementSibling()
Get the first element that precedes the current node in the
xblParentNode's xblChildNodes list. |
| Node | getXblPreviousSibling()
Get the node which directly precedes the current node in the
xblParentNode's xblChildNodes list. |
| NodeList | getXblScopedChildNodes()
Get the list of child nodes of this node in the fully flattened tree
that are within the same shadow scope. |
| Element | getXblShadowTree()
Get the shadow tree of this node. |
| XBLManager | getXBLManager()
Returns the XBLManager used for this document. |
| String | getXmlEncoding()
DOM: Implements {@link org.w3c.dom.Document#getXmlEncoding()}. |
| boolean | getXmlStandalone()
DOM: Implements {@link org.w3c.dom.Document#getXmlStandalone()}. |
| String | getXmlVersion()
DOM: Implements {@link org.w3c.dom.Document#getXmlVersion()}. |
| Node | importNode(Node importedNode, boolean deep)
DOM: Implements {@link
org.w3c.dom.Document#importNode(Node,boolean)}. |
| Node | importNode(Node importedNode, boolean deep, boolean trimId)
Imports the given node 'importNode' to this document.
|
| abstract boolean | isId(Attr node)
Returns whether the given attribute node is an ID attribute. |
| void | nodeToBeRemoved(Node node)
Notifies this document that a node will be removed. |
| void | normalizeDocument()
DOM: Implements {@link org.w3c.dom.Document#normalizeDocument()}.
|
| protected boolean | normalizeDocument(Element e, boolean cdataSections, boolean comments, boolean elementContentWhitepace, boolean namespaceDeclarations, boolean namespaces, boolean splitCdataSections, DOMErrorHandler errorHandler)
Helper function for {@link #normalizeDocument()}. |
| void | putElementsByTagName(Node n, String ln, ElementsByTagName l)
Puts an ElementsByTagName object in the cache. |
| void | putElementsByTagNameNS(Node n, String ns, String ln, ElementsByTagNameNS l)
Puts an ElementsByTagNameNS object in the cache. |
| void | removeIdEntry(Element e, String id)
Remove the mapping for element to id |
| Node | renameNode(Node n, String ns, String qn)
DOM: Implements {@link org.w3c.dom.Document#renameNode(Node,String,String)}. |
| void | setDoctype(DocumentType dt)
Sets the document type node. |
| void | setDocumentInputEncoding(String ie)
Sets the input encoding that was used when the document was being
parsed. |
| void | setDocumentURI(String uri)
DOM: Implements {@link org.w3c.dom.Document#setDocumentURI(String)}. |
| void | setDocumentXmlEncoding(String xe)
Sets the XML encoding that was found in the XML prolog. |
| void | setEventsEnabled(boolean b)
Sets the eventsEnabled property. |
| void | setLocale(Locale l)
Implements {@link org.apache.batik.i18n.Localizable#setLocale(Locale)}. |
| void | setStrictErrorChecking(boolean b)
DOM: Implements {@link org.w3c.dom.Document#setStrictErrorChecking(boolean)}. |
| void | setTextContent(String s)
DOM: Implements {@link org.w3c.dom.Node#setTextContent(String)}. |
| void | setXBLManager(XBLManager m)
Sets the XBLManager used for this document. |
| void | setXmlStandalone(boolean b)
DOM: Implements {@link org.w3c.dom.Document#setXmlStandalone(boolean)}. |
| void | setXmlVersion(String v)
DOM: Implements {@link org.w3c.dom.Document#setXmlVersion(String)}. |
| protected boolean | splitCdata(Element e, Node n, DOMErrorHandler errorHandler)
Splits the given CDATA node if required. |
| void | updateIdEntry(Element e, String oldId, String newId) |
Parameters: n a node of the type of this.
Parameters: n a node of the type of this.
Parameters: n The clone node. d The destination document.
Parameters: n The clone node. d The destination document.
Returns: {@link #implementation}
Returns: "#document".
Returns: {@link org.w3c.dom.Node#DOCUMENT_NODE}