Package org.apache.batik.dom
Class AbstractDocument
- java.lang.Object
-
- org.apache.batik.dom.AbstractNode
-
- org.apache.batik.dom.AbstractParentNode
-
- org.apache.batik.dom.AbstractDocument
-
- All Implemented Interfaces:
java.io.Serializable,NodeEventTarget,ExtendedNode,NodeXBL,XBLManagerData,Localizable,org.w3c.dom.Document,org.w3c.dom.events.DocumentEvent,org.w3c.dom.events.EventTarget,org.w3c.dom.Node,org.w3c.dom.traversal.DocumentTraversal,org.w3c.dom.xpath.XPathEvaluator
- Direct Known Subclasses:
AbstractStylableDocument,GenericDocument
public abstract class AbstractDocument extends AbstractParentNode implements org.w3c.dom.Document, org.w3c.dom.events.DocumentEvent, org.w3c.dom.traversal.DocumentTraversal, Localizable, org.w3c.dom.xpath.XPathEvaluator
This class implements theDocumentinterface.- Version:
- $Id: AbstractDocument.java 1851346 2019-01-15 13:41:00Z ssteiner $
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classAbstractDocument.DocumentConfigurationDOMConfiguration for this document.protected static classAbstractDocument.DocumentErrorDOMError implementation.protected classAbstractDocument.IdSoftRefprotected classAbstractDocument.XPathExprA compiled XPath expression.protected static classAbstractDocument.XPathNodeNSResolverAn XPathNSResolver that uses Node.lookupNamespaceURI.-
Nested classes/interfaces inherited from class org.apache.batik.dom.AbstractParentNode
AbstractParentNode.ChildNodes, AbstractParentNode.ElementsByTagName, AbstractParentNode.ElementsByTagNameNS
-
-
Field Summary
Fields Modifier and Type Field Description protected DocumentEventSupportdocumentEventSupportThe DocumentEventSupport.protected java.lang.StringdocumentURIThe document URI.protected AbstractDocument.DocumentConfigurationdomConfigThe DOMConfiguration object for this document.protected java.util.MapelementsByIdThe elementsById lists.protected java.util.WeakHashMapelementsByTagNamesThe ElementsByTagName lists.protected java.util.WeakHashMapelementsByTagNamesNSThe ElementsByTagNameNS lists.protected booleaneventsEnabledWhether the event dispatching must be done.protected org.w3c.dom.DOMImplementationimplementationThe DOM implementation.protected java.lang.StringinputEncodingInput encoding of this document.protected LocalizableSupportlocalizableSupportThe localizable support for the error messages.protected static java.lang.StringRESOURCESThe error messages bundle class name.protected booleanstrictErrorCheckingWhether strict error checking is in force.protected TraversalSupporttraversalSupportThe traversal support.protected XBLManagerxblManagerThe XBL manager for this document.protected java.lang.StringxmlEncodingXML encoding of this document.protected booleanxmlStandaloneWhether this document is standalone.protected java.lang.StringxmlVersionXML version of this document.-
Fields inherited from class org.apache.batik.dom.AbstractParentNode
childNodes
-
Fields inherited from class org.apache.batik.dom.AbstractNode
DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, EMPTY_NODE_LIST, eventSupport, managerData, ownerDocument, userData, userDataHandlers
-
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
Constructors Modifier Constructor Description protectedAbstractDocument()Creates a new document.AbstractDocument(org.w3c.dom.DocumentType dt, org.w3c.dom.DOMImplementation impl)Creates a new document.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddIdEntry(org.w3c.dom.Element e, java.lang.String id)org.w3c.dom.NodeadoptNode(org.w3c.dom.Node n)DOM: ImplementsDocument.adoptNode(Node).protected voidadoptNode1(AbstractNode n)Helper function foradoptNode(Node).booleancanDispatch(java.lang.String ns, java.lang.String eventType)DOM: Implements org.w3c.dom.events.DocumentEvent#canDispatch(String,String).protected booleancheckChars(java.lang.String s)Checks that the characters in the given string are all valid content characters.protected voidcheckChildType(org.w3c.dom.Node n, boolean replace)Checks the validity of a node to be inserted.protected booleancheckName(java.lang.String s)Checks that the given string is a valid XML name.org.w3c.dom.NodecloneNode(boolean deep)DOM: ImplementsNode.cloneNode(boolean).protected org.w3c.dom.NodecopyInto(org.w3c.dom.Node n)Copy the fields of the current node into the given node.protected org.w3c.dom.DOMErrorcreateDOMError(java.lang.String type, short severity, java.lang.String key, java.lang.Object[] args, org.w3c.dom.Node related, java.lang.Exception e)Creates a DOMError object with the given parameters.org.w3c.dom.events.EventcreateEvent(java.lang.String eventType)DOM: ImplementsDocumentEvent.createEvent(String).org.w3c.dom.xpath.XPathExpressioncreateExpression(java.lang.String expression, org.w3c.dom.xpath.XPathNSResolver resolver)DOM: ImplementsXPathEvaluator.createExpression(String,XPathNSResolver).org.w3c.dom.traversal.NodeIteratorcreateNodeIterator(org.w3c.dom.Node root, int whatToShow, org.w3c.dom.traversal.NodeFilter filter, boolean entityReferenceExpansion)DOM: ImplementsDocumentTraversal.createNodeIterator(Node,int,NodeFilter,boolean).org.w3c.dom.xpath.XPathNSResolvercreateNSResolver(org.w3c.dom.Node n)DOM: ImplementsXPathEvaluator.createNSResolver(Node).org.w3c.dom.traversal.TreeWalkercreateTreeWalker(org.w3c.dom.Node root, int whatToShow, org.w3c.dom.traversal.NodeFilter filter, boolean entityReferenceExpansion)DOM: ImplementsDocumentTraversal.createTreeWalker(Node,int,NodeFilter,boolean).org.w3c.dom.xpath.XPathExceptioncreateXPathException(short type, java.lang.String key, java.lang.Object[] args)Creates an exception with the appropriate error message.protected org.w3c.dom.NodedeepCopyInto(org.w3c.dom.Node n)Deeply copy the fields of the current node into the given node.protected org.w3c.dom.NodedeepExport(org.w3c.dom.Node n, org.w3c.dom.Document d)Deeply exports this node to the given document.voiddetachNodeIterator(org.w3c.dom.traversal.NodeIterator it)Detaches the given node iterator from this document.java.lang.Objectevaluate(java.lang.String expression, org.w3c.dom.Node contextNode, org.w3c.dom.xpath.XPathNSResolver resolver, short type, java.lang.Object result)DOM: ImplementsXPathEvaluator.evaluate(String,Node,XPathNSResolver,short,Object).protected org.w3c.dom.Nodeexport(org.w3c.dom.Node n, org.w3c.dom.Document d)Exports this node to the given document.java.lang.StringformatMessage(java.lang.String key, java.lang.Object[] args)ImplementsLocalizable.formatMessage(String,Object[]).org.w3c.dom.ElementgetChildElementById(org.w3c.dom.Node requestor, java.lang.String id)Finds an element that is in the same document fragment as 'requestor' that has 'id'.protected AbstractDocumentgetCurrentDocument()Returns the current document.org.w3c.dom.DocumentTypegetDoctype()DOM: ImplementsDocument.getDoctype().org.w3c.dom.ElementgetDocumentElement()DOM: ImplementsDocument.getDocumentElement().java.lang.StringgetDocumentURI()DOM: ImplementsDocument.getDocumentURI().org.w3c.dom.DOMConfigurationgetDomConfig()DOM: ImplementsDocument.getDomConfig().org.w3c.dom.ElementgetElementById(java.lang.String id)DOM: ImplementsDocument.getElementById(String).AbstractParentNode.ElementsByTagNamegetElementsByTagName(org.w3c.dom.Node n, java.lang.String ln)Returns an ElementsByTagName object from the cache, if any.AbstractParentNode.ElementsByTagNameNSgetElementsByTagNameNS(org.w3c.dom.Node n, java.lang.String ns, java.lang.String ln)Returns an ElementsByTagNameNS object from the cache, if any.booleangetEventsEnabled()Tests whether the event dispatching must be done.org.w3c.dom.DOMImplementationgetImplementation()DOM: ImplementsDocument.getImplementation().java.lang.StringgetInputEncoding()DOM: ImplementsDocument.getInputEncoding().java.util.LocalegetLocale()ImplementsLocalizable.getLocale().java.lang.StringgetNodeName()DOM: ImplementsNode.getNodeName().shortgetNodeType()DOM: ImplementsNode.getNodeType().protected org.w3c.dom.NodegetRoot(org.w3c.dom.Node n)booleangetStrictErrorChecking()DOM: ImplementsDocument.getStrictErrorChecking().org.w3c.dom.ElementgetXblBoundElement()Get the bound element whose shadow tree this current node resides in.org.w3c.dom.NodeListgetXblChildNodes()Get the list of child nodes of this node in the fully flattened tree.org.w3c.dom.NodeListgetXblDefinitions()Get the xbl:definition elements currently binding this element.org.w3c.dom.NodegetXblFirstChild()Get the first child node of this node in the fully flattened tree.org.w3c.dom.ElementgetXblFirstElementChild()Get the first element child of this node in the fully flattened tree.org.w3c.dom.NodegetXblLastChild()Get the last child node of this node in the fully flattened tree.org.w3c.dom.ElementgetXblLastElementChild()Get the last element child of this node in the fully flattened tree.XBLManagergetXBLManager()Returns the XBLManager used for this document.org.w3c.dom.ElementgetXblNextElementSibling()Get the first element that follows the current node in the xblParentNode's xblChildNodes list.org.w3c.dom.NodegetXblNextSibling()Get the node which directly follows the current node in the xblParentNode's xblChildNodes list.org.w3c.dom.NodegetXblParentNode()Get the parent of this node in the fully flattened tree.org.w3c.dom.ElementgetXblPreviousElementSibling()Get the first element that precedes the current node in the xblParentNode's xblChildNodes list.org.w3c.dom.NodegetXblPreviousSibling()Get the node which directly precedes the current node in the xblParentNode's xblChildNodes list.org.w3c.dom.NodeListgetXblScopedChildNodes()Get the list of child nodes of this node in the fully flattened tree that are within the same shadow scope.org.w3c.dom.ElementgetXblShadowTree()Get the shadow tree of this node.java.lang.StringgetXmlEncoding()DOM: ImplementsDocument.getXmlEncoding().booleangetXmlStandalone()DOM: ImplementsDocument.getXmlStandalone().java.lang.StringgetXmlVersion()DOM: ImplementsDocument.getXmlVersion().org.w3c.dom.NodeimportNode(org.w3c.dom.Node importedNode, boolean deep)DOM: ImplementsDocument.importNode(Node,boolean).org.w3c.dom.NodeimportNode(org.w3c.dom.Node importedNode, boolean deep, boolean trimId)Imports the given node into this document.abstract booleanisId(org.w3c.dom.Attr node)Returns whether the given attribute node is an ID attribute.voidnodeToBeRemoved(org.w3c.dom.Node node)Notifies this document that a node will be removed.voidnormalizeDocument()DOM: ImplementsDocument.normalizeDocument().protected booleannormalizeDocument(org.w3c.dom.Element e, boolean cdataSections, boolean comments, boolean elementContentWhitepace, boolean namespaceDeclarations, boolean namespaces, boolean splitCdataSections, org.w3c.dom.DOMErrorHandler errorHandler)Helper function fornormalizeDocument().voidputElementsByTagName(org.w3c.dom.Node n, java.lang.String ln, AbstractParentNode.ElementsByTagName l)Puts an ElementsByTagName object in the cache.voidputElementsByTagNameNS(org.w3c.dom.Node n, java.lang.String ns, java.lang.String ln, AbstractParentNode.ElementsByTagNameNS l)Puts an ElementsByTagNameNS object in the cache.private voidreadObject(java.io.ObjectInputStream s)voidremoveIdEntry(org.w3c.dom.Element e, java.lang.String id)Remove the mapping forelementtoidorg.w3c.dom.NoderenameNode(org.w3c.dom.Node n, java.lang.String ns, java.lang.String qn)DOM: ImplementsDocument.renameNode(Node,String,String).voidsetDoctype(org.w3c.dom.DocumentType dt)Sets the document type node.voidsetDocumentInputEncoding(java.lang.String ie)Sets the input encoding that was used when the document was being parsed.voidsetDocumentURI(java.lang.String uri)DOM: ImplementsDocument.setDocumentURI(String).voidsetDocumentXmlEncoding(java.lang.String xe)Sets the XML encoding that was found in the XML prolog.voidsetEventsEnabled(boolean b)Sets the eventsEnabled property.voidsetLocale(java.util.Locale l)ImplementsLocalizable.setLocale(Locale).voidsetStrictErrorChecking(boolean b)DOM: ImplementsDocument.setStrictErrorChecking(boolean).voidsetTextContent(java.lang.String s)DOM: ImplementsNode.setTextContent(String).voidsetXBLManager(XBLManager m)Sets the XBLManager used for this document.voidsetXmlStandalone(boolean b)DOM: ImplementsDocument.setXmlStandalone(boolean).voidsetXmlVersion(java.lang.String v)DOM: ImplementsDocument.setXmlVersion(String).protected booleansplitCdata(org.w3c.dom.Element e, org.w3c.dom.Node n, org.w3c.dom.DOMErrorHandler errorHandler)Splits the given CDATA node if required.voidupdateIdEntry(org.w3c.dom.Element e, java.lang.String oldId, java.lang.String newId)private voidwriteObject(java.io.ObjectOutputStream s)-
Methods inherited from class org.apache.batik.dom.AbstractParentNode
appendChild, checkAndRemove, deepExport, fireDOMNodeInsertedEvent, fireDOMNodeInsertedIntoDocumentEvent, fireDOMNodeRemovedEvent, fireDOMNodeRemovedFromDocumentEvent, fireDOMSubtreeModifiedEvent, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getLastChild, getTextContent, hasChildNodes, insertBefore, nodeAdded, normalize, removeChild, replaceChild
-
Methods inherited from class org.apache.batik.dom.AbstractNode
addEventListener, addEventListenerNS, compareDocumentPosition, compareNamedNodeMaps, compareStrings, createDOMException, dispatchEvent, export, fireDOMCharacterDataModifiedEvent, fireUserDataHandlers, getAttributes, getBaseURI, getBaseURI, getCascadedXMLBase, getEventSupport, getFeature, getLocalName, getManagerData, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getParentNodeEventTarget, getPrefix, getPreviousSibling, getUserData, hasAttributes, hasEventListenerNS, initializeEventSupport, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespacePrefix, lookupNamespaceURI, lookupPrefix, newNode, removeEventListener, removeEventListenerNS, setManagerData, setNextSibling, setNodeName, setNodeValue, setOwnerDocument, setParentNode, setPrefix, setPreviousSibling, setSpecified, setUserData, willTriggerNS
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.w3c.dom.Document
createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, getElementsByTagName, getElementsByTagNameNS
-
Methods inherited from interface org.apache.batik.dom.ExtendedNode
isReadonly, setReadonly
-
Methods inherited from interface org.w3c.dom.Node
appendChild, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setUserData
-
-
-
-
Field Detail
-
RESOURCES
protected static final java.lang.String RESOURCES
The error messages bundle class name.- See Also:
- Constant Field Values
-
localizableSupport
protected transient LocalizableSupport localizableSupport
The localizable support for the error messages.
-
implementation
protected transient org.w3c.dom.DOMImplementation implementation
The DOM implementation.
-
traversalSupport
protected transient TraversalSupport traversalSupport
The traversal support.
-
documentEventSupport
protected transient DocumentEventSupport documentEventSupport
The DocumentEventSupport.
-
eventsEnabled
protected transient boolean eventsEnabled
Whether the event dispatching must be done.
-
elementsByTagNames
protected transient java.util.WeakHashMap elementsByTagNames
The ElementsByTagName lists.
-
elementsByTagNamesNS
protected transient java.util.WeakHashMap elementsByTagNamesNS
The ElementsByTagNameNS lists.
-
inputEncoding
protected java.lang.String inputEncoding
Input encoding of this document.
-
xmlEncoding
protected java.lang.String xmlEncoding
XML encoding of this document.
-
xmlVersion
protected java.lang.String xmlVersion
XML version of this document.
-
xmlStandalone
protected boolean xmlStandalone
Whether this document is standalone.
-
documentURI
protected java.lang.String documentURI
The document URI.
-
strictErrorChecking
protected boolean strictErrorChecking
Whether strict error checking is in force.
-
domConfig
protected AbstractDocument.DocumentConfiguration domConfig
The DOMConfiguration object for this document.
-
xblManager
protected transient XBLManager xblManager
The XBL manager for this document.
-
elementsById
protected transient java.util.Map elementsById
The elementsById lists. This is keyed on 'id'. the entry is either a IdSoftReference to the element or a List of IdSoftReferences (if there is more than one element owned by this document with a particular 'id').
-
-
Method Detail
-
setDocumentInputEncoding
public void setDocumentInputEncoding(java.lang.String ie)
Sets the input encoding that was used when the document was being parsed.
-
setDocumentXmlEncoding
public void setDocumentXmlEncoding(java.lang.String xe)
Sets the XML encoding that was found in the XML prolog.
-
setLocale
public void setLocale(java.util.Locale l)
ImplementsLocalizable.setLocale(Locale).- Specified by:
setLocalein interfaceLocalizable- Parameters:
l- The locale to set.
-
getLocale
public java.util.Locale getLocale()
ImplementsLocalizable.getLocale().- Specified by:
getLocalein interfaceLocalizable
-
formatMessage
public java.lang.String formatMessage(java.lang.String key, java.lang.Object[] args) throws java.util.MissingResourceExceptionImplementsLocalizable.formatMessage(String,Object[]).- Specified by:
formatMessagein interfaceLocalizable- Parameters:
key- The key used to retreive the message from the resource bundle.args- The objects that compose the message.- Throws:
java.util.MissingResourceException- if the key is not in the bundle.
-
getEventsEnabled
public boolean getEventsEnabled()
Tests whether the event dispatching must be done.
-
setEventsEnabled
public void setEventsEnabled(boolean b)
Sets the eventsEnabled property.
-
getNodeName
public java.lang.String getNodeName()
DOM: ImplementsNode.getNodeName().- Specified by:
getNodeNamein interfaceorg.w3c.dom.Node- Returns:
- "#document".
-
getNodeType
public short getNodeType()
DOM: ImplementsNode.getNodeType().- Specified by:
getNodeTypein interfaceorg.w3c.dom.Node- Returns:
Node.DOCUMENT_NODE
-
getDoctype
public org.w3c.dom.DocumentType getDoctype()
DOM: ImplementsDocument.getDoctype().- Specified by:
getDoctypein interfaceorg.w3c.dom.Document
-
setDoctype
public void setDoctype(org.w3c.dom.DocumentType dt)
Sets the document type node.
-
getImplementation
public org.w3c.dom.DOMImplementation getImplementation()
DOM: ImplementsDocument.getImplementation().- Specified by:
getImplementationin interfaceorg.w3c.dom.Document- Returns:
implementation
-
getDocumentElement
public org.w3c.dom.Element getDocumentElement()
DOM: ImplementsDocument.getDocumentElement().- Specified by:
getDocumentElementin interfaceorg.w3c.dom.Document
-
importNode
public org.w3c.dom.Node importNode(org.w3c.dom.Node importedNode, boolean deep) throws org.w3c.dom.DOMExceptionDOM: ImplementsDocument.importNode(Node,boolean).- Specified by:
importNodein interfaceorg.w3c.dom.Document- Throws:
org.w3c.dom.DOMException
-
importNode
public org.w3c.dom.Node importNode(org.w3c.dom.Node importedNode, boolean deep, boolean trimId)Imports the given node into this document. It does so deeply ifdeepis set to true. It will not mark ID attributes as IDs iftrimIdis set to true. This is used primarily for the shadow trees of the 'use' elements so they don't clutter the hash table.- Parameters:
importedNode- The node to import into this document.deep- Whether to perform a deep importation.trimId- Whether to make all cloned attributes not be ID attributes.
-
cloneNode
public org.w3c.dom.Node cloneNode(boolean deep)
DOM: ImplementsNode.cloneNode(boolean).- Specified by:
cloneNodein interfaceorg.w3c.dom.Node- Overrides:
cloneNodein classAbstractNode
-
isId
public abstract boolean isId(org.w3c.dom.Attr node)
Returns whether the given attribute node is an ID attribute.
-
getElementById
public org.w3c.dom.Element getElementById(java.lang.String id)
DOM: ImplementsDocument.getElementById(String).- Specified by:
getElementByIdin interfaceorg.w3c.dom.Document
-
getChildElementById
public org.w3c.dom.Element getChildElementById(org.w3c.dom.Node requestor, java.lang.String id)Finds an element that is in the same document fragment as 'requestor' that has 'id'.
-
getRoot
protected org.w3c.dom.Node getRoot(org.w3c.dom.Node n)
-
removeIdEntry
public void removeIdEntry(org.w3c.dom.Element e, java.lang.String id)Remove the mapping forelementtoid
-
addIdEntry
public void addIdEntry(org.w3c.dom.Element e, java.lang.String id)
-
updateIdEntry
public void updateIdEntry(org.w3c.dom.Element e, java.lang.String oldId, java.lang.String newId)
-
getElementsByTagName
public AbstractParentNode.ElementsByTagName getElementsByTagName(org.w3c.dom.Node n, java.lang.String ln)
Returns an ElementsByTagName object from the cache, if any.
-
putElementsByTagName
public void putElementsByTagName(org.w3c.dom.Node n, java.lang.String ln, AbstractParentNode.ElementsByTagName l)Puts an ElementsByTagName object in the cache.
-
getElementsByTagNameNS
public AbstractParentNode.ElementsByTagNameNS getElementsByTagNameNS(org.w3c.dom.Node n, java.lang.String ns, java.lang.String ln)
Returns an ElementsByTagNameNS object from the cache, if any.
-
putElementsByTagNameNS
public void putElementsByTagNameNS(org.w3c.dom.Node n, java.lang.String ns, java.lang.String ln, AbstractParentNode.ElementsByTagNameNS l)Puts an ElementsByTagNameNS object in the cache.
-
createEvent
public org.w3c.dom.events.Event createEvent(java.lang.String eventType) throws org.w3c.dom.DOMExceptionDOM: ImplementsDocumentEvent.createEvent(String).- Specified by:
createEventin interfaceorg.w3c.dom.events.DocumentEvent- Throws:
org.w3c.dom.DOMException
-
canDispatch
public boolean canDispatch(java.lang.String ns, java.lang.String eventType)DOM: Implements org.w3c.dom.events.DocumentEvent#canDispatch(String,String).
-
createNodeIterator
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.DOMExceptionDOM: ImplementsDocumentTraversal.createNodeIterator(Node,int,NodeFilter,boolean).- Specified by:
createNodeIteratorin interfaceorg.w3c.dom.traversal.DocumentTraversal- Throws:
org.w3c.dom.DOMException
-
createTreeWalker
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.DOMExceptionDOM: ImplementsDocumentTraversal.createTreeWalker(Node,int,NodeFilter,boolean).- Specified by:
createTreeWalkerin interfaceorg.w3c.dom.traversal.DocumentTraversal- Throws:
org.w3c.dom.DOMException
-
detachNodeIterator
public void detachNodeIterator(org.w3c.dom.traversal.NodeIterator it)
Detaches the given node iterator from this document.
-
nodeToBeRemoved
public void nodeToBeRemoved(org.w3c.dom.Node node)
Notifies this document that a node will be removed.- Overrides:
nodeToBeRemovedin classAbstractParentNode
-
getCurrentDocument
protected AbstractDocument getCurrentDocument()
Returns the current document.- Overrides:
getCurrentDocumentin classAbstractNode
-
export
protected org.w3c.dom.Node export(org.w3c.dom.Node n, org.w3c.dom.Document d)Exports this node to the given document.- Parameters:
n- The clone node.d- The destination document.
-
deepExport
protected org.w3c.dom.Node deepExport(org.w3c.dom.Node n, org.w3c.dom.Document d)Deeply exports this node to the given document.- Parameters:
n- The clone node.d- The destination document.
-
copyInto
protected org.w3c.dom.Node copyInto(org.w3c.dom.Node n)
Copy the fields of the current node into the given node.- Overrides:
copyIntoin classAbstractNode- Parameters:
n- a node of the type of this.
-
deepCopyInto
protected org.w3c.dom.Node deepCopyInto(org.w3c.dom.Node n)
Deeply copy the fields of the current node into the given node.- Overrides:
deepCopyIntoin classAbstractParentNode- Parameters:
n- a node of the type of this.
-
checkChildType
protected void checkChildType(org.w3c.dom.Node n, boolean replace)Checks the validity of a node to be inserted.- Overrides:
checkChildTypein classAbstractNode
-
getInputEncoding
public java.lang.String getInputEncoding()
DOM: ImplementsDocument.getInputEncoding().- Specified by:
getInputEncodingin interfaceorg.w3c.dom.Document
-
getXmlEncoding
public java.lang.String getXmlEncoding()
DOM: ImplementsDocument.getXmlEncoding().- Specified by:
getXmlEncodingin interfaceorg.w3c.dom.Document
-
getXmlStandalone
public boolean getXmlStandalone()
DOM: ImplementsDocument.getXmlStandalone().- Specified by:
getXmlStandalonein interfaceorg.w3c.dom.Document
-
setXmlStandalone
public void setXmlStandalone(boolean b) throws org.w3c.dom.DOMExceptionDOM: ImplementsDocument.setXmlStandalone(boolean).- Specified by:
setXmlStandalonein interfaceorg.w3c.dom.Document- Throws:
org.w3c.dom.DOMException
-
getXmlVersion
public java.lang.String getXmlVersion()
DOM: ImplementsDocument.getXmlVersion().- Specified by:
getXmlVersionin interfaceorg.w3c.dom.Document
-
setXmlVersion
public void setXmlVersion(java.lang.String v) throws org.w3c.dom.DOMExceptionDOM: ImplementsDocument.setXmlVersion(String).- Specified by:
setXmlVersionin interfaceorg.w3c.dom.Document- Throws:
org.w3c.dom.DOMException
-
getStrictErrorChecking
public boolean getStrictErrorChecking()
DOM: ImplementsDocument.getStrictErrorChecking().- Specified by:
getStrictErrorCheckingin interfaceorg.w3c.dom.Document
-
setStrictErrorChecking
public void setStrictErrorChecking(boolean b)
DOM: ImplementsDocument.setStrictErrorChecking(boolean).- Specified by:
setStrictErrorCheckingin interfaceorg.w3c.dom.Document
-
getDocumentURI
public java.lang.String getDocumentURI()
DOM: ImplementsDocument.getDocumentURI().- Specified by:
getDocumentURIin interfaceorg.w3c.dom.Document
-
setDocumentURI
public void setDocumentURI(java.lang.String uri)
DOM: ImplementsDocument.setDocumentURI(String).- Specified by:
setDocumentURIin interfaceorg.w3c.dom.Document
-
getDomConfig
public org.w3c.dom.DOMConfiguration getDomConfig()
DOM: ImplementsDocument.getDomConfig().- Specified by:
getDomConfigin interfaceorg.w3c.dom.Document
-
adoptNode
public org.w3c.dom.Node adoptNode(org.w3c.dom.Node n) throws org.w3c.dom.DOMExceptionDOM: ImplementsDocument.adoptNode(Node).- Specified by:
adoptNodein interfaceorg.w3c.dom.Document- Throws:
org.w3c.dom.DOMException
-
adoptNode1
protected void adoptNode1(AbstractNode n)
Helper function foradoptNode(Node).
-
renameNode
public org.w3c.dom.Node renameNode(org.w3c.dom.Node n, java.lang.String ns, java.lang.String qn)DOM: ImplementsDocument.renameNode(Node,String,String).- Specified by:
renameNodein interfaceorg.w3c.dom.Document
-
normalizeDocument
public void normalizeDocument()
DOM: ImplementsDocument.normalizeDocument(). XXX Does not handle the 'entities' parameter yet.- Specified by:
normalizeDocumentin interfaceorg.w3c.dom.Document
-
normalizeDocument
protected boolean normalizeDocument(org.w3c.dom.Element e, boolean cdataSections, boolean comments, boolean elementContentWhitepace, boolean namespaceDeclarations, boolean namespaces, boolean splitCdataSections, org.w3c.dom.DOMErrorHandler errorHandler)Helper function fornormalizeDocument().
-
splitCdata
protected boolean splitCdata(org.w3c.dom.Element e, org.w3c.dom.Node n, org.w3c.dom.DOMErrorHandler errorHandler)Splits the given CDATA node if required.
-
checkChars
protected boolean checkChars(java.lang.String s)
Checks that the characters in the given string are all valid content characters.
-
checkName
protected boolean checkName(java.lang.String s)
Checks that the given string is a valid XML name.
-
createDOMError
protected org.w3c.dom.DOMError createDOMError(java.lang.String type, short severity, java.lang.String key, java.lang.Object[] args, org.w3c.dom.Node related, java.lang.Exception e)Creates a DOMError object with the given parameters.
-
setTextContent
public void setTextContent(java.lang.String s) throws org.w3c.dom.DOMExceptionDOM: ImplementsNode.setTextContent(String).- Specified by:
setTextContentin interfaceorg.w3c.dom.Node- Overrides:
setTextContentin classAbstractNode- Throws:
org.w3c.dom.DOMException
-
setXBLManager
public void setXBLManager(XBLManager m)
Sets the XBLManager used for this document.
-
getXBLManager
public XBLManager getXBLManager()
Returns the XBLManager used for this document.
-
createExpression
public org.w3c.dom.xpath.XPathExpression createExpression(java.lang.String expression, org.w3c.dom.xpath.XPathNSResolver resolver) throws org.w3c.dom.DOMException, org.w3c.dom.xpath.XPathExceptionDOM: ImplementsXPathEvaluator.createExpression(String,XPathNSResolver).- Specified by:
createExpressionin interfaceorg.w3c.dom.xpath.XPathEvaluator- Throws:
org.w3c.dom.DOMExceptionorg.w3c.dom.xpath.XPathException
-
createNSResolver
public org.w3c.dom.xpath.XPathNSResolver createNSResolver(org.w3c.dom.Node n)
DOM: ImplementsXPathEvaluator.createNSResolver(Node).- Specified by:
createNSResolverin interfaceorg.w3c.dom.xpath.XPathEvaluator
-
evaluate
public java.lang.Object evaluate(java.lang.String expression, org.w3c.dom.Node contextNode, org.w3c.dom.xpath.XPathNSResolver resolver, short type, java.lang.Object result) throws org.w3c.dom.xpath.XPathException, org.w3c.dom.DOMExceptionDOM: ImplementsXPathEvaluator.evaluate(String,Node,XPathNSResolver,short,Object).- Specified by:
evaluatein interfaceorg.w3c.dom.xpath.XPathEvaluator- Throws:
org.w3c.dom.xpath.XPathExceptionorg.w3c.dom.DOMException
-
createXPathException
public org.w3c.dom.xpath.XPathException createXPathException(short type, java.lang.String key, java.lang.Object[] args)Creates an exception with the appropriate error message.
-
getXblParentNode
public org.w3c.dom.Node getXblParentNode()
Get the parent of this node in the fully flattened tree.- Specified by:
getXblParentNodein interfaceNodeXBL- Overrides:
getXblParentNodein classAbstractNode
-
getXblChildNodes
public org.w3c.dom.NodeList getXblChildNodes()
Get the list of child nodes of this node in the fully flattened tree.- Specified by:
getXblChildNodesin interfaceNodeXBL- Overrides:
getXblChildNodesin classAbstractNode
-
getXblScopedChildNodes
public org.w3c.dom.NodeList getXblScopedChildNodes()
Get the list of child nodes of this node in the fully flattened tree that are within the same shadow scope.- Specified by:
getXblScopedChildNodesin interfaceNodeXBL- Overrides:
getXblScopedChildNodesin classAbstractNode
-
getXblFirstChild
public org.w3c.dom.Node getXblFirstChild()
Get the first child node of this node in the fully flattened tree.- Specified by:
getXblFirstChildin interfaceNodeXBL- Overrides:
getXblFirstChildin classAbstractNode
-
getXblLastChild
public org.w3c.dom.Node getXblLastChild()
Get the last child node of this node in the fully flattened tree.- Specified by:
getXblLastChildin interfaceNodeXBL- Overrides:
getXblLastChildin classAbstractNode
-
getXblPreviousSibling
public org.w3c.dom.Node getXblPreviousSibling()
Get the node which directly precedes the current node in the xblParentNode's xblChildNodes list.- Specified by:
getXblPreviousSiblingin interfaceNodeXBL- Overrides:
getXblPreviousSiblingin classAbstractNode
-
getXblNextSibling
public org.w3c.dom.Node getXblNextSibling()
Get the node which directly follows the current node in the xblParentNode's xblChildNodes list.- Specified by:
getXblNextSiblingin interfaceNodeXBL- Overrides:
getXblNextSiblingin classAbstractNode
-
getXblFirstElementChild
public org.w3c.dom.Element getXblFirstElementChild()
Get the first element child of this node in the fully flattened tree.- Specified by:
getXblFirstElementChildin interfaceNodeXBL- Overrides:
getXblFirstElementChildin classAbstractNode
-
getXblLastElementChild
public org.w3c.dom.Element getXblLastElementChild()
Get the last element child of this node in the fully flattened tree.- Specified by:
getXblLastElementChildin interfaceNodeXBL- Overrides:
getXblLastElementChildin classAbstractNode
-
getXblPreviousElementSibling
public org.w3c.dom.Element getXblPreviousElementSibling()
Get the first element that precedes the current node in the xblParentNode's xblChildNodes list.- Specified by:
getXblPreviousElementSiblingin interfaceNodeXBL- Overrides:
getXblPreviousElementSiblingin classAbstractNode
-
getXblNextElementSibling
public org.w3c.dom.Element getXblNextElementSibling()
Get the first element that follows the current node in the xblParentNode's xblChildNodes list.- Specified by:
getXblNextElementSiblingin interfaceNodeXBL- Overrides:
getXblNextElementSiblingin classAbstractNode
-
getXblBoundElement
public org.w3c.dom.Element getXblBoundElement()
Get the bound element whose shadow tree this current node resides in.- Specified by:
getXblBoundElementin interfaceNodeXBL- Overrides:
getXblBoundElementin classAbstractNode
-
getXblShadowTree
public org.w3c.dom.Element getXblShadowTree()
Get the shadow tree of this node.- Specified by:
getXblShadowTreein interfaceNodeXBL- Overrides:
getXblShadowTreein classAbstractNode
-
getXblDefinitions
public org.w3c.dom.NodeList getXblDefinitions()
Get the xbl:definition elements currently binding this element.- Specified by:
getXblDefinitionsin interfaceNodeXBL- Overrides:
getXblDefinitionsin classAbstractNode
-
writeObject
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException- Throws:
java.io.IOException
-
readObject
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, java.lang.ClassNotFoundException- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
-