Package org.apache.batik.dom
Class AbstractParentNode
- java.lang.Object
-
- org.apache.batik.dom.AbstractNode
-
- org.apache.batik.dom.AbstractParentNode
-
- All Implemented Interfaces:
java.io.Serializable
,NodeEventTarget
,ExtendedNode
,NodeXBL
,XBLManagerData
,org.w3c.dom.events.EventTarget
,org.w3c.dom.Node
- Direct Known Subclasses:
AbstractAttr
,AbstractDocument
,AbstractDocumentFragment
,AbstractEntity
,AbstractParentChildNode
public abstract class AbstractParentNode extends AbstractNode
This class implements the Node interface with support for children.- Version:
- $Id: AbstractParentNode.java 1851346 2019-01-15 13:41:00Z ssteiner $
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AbstractParentNode.ChildNodes
To manage the children of this node.protected class
AbstractParentNode.ElementsByTagName
To manage a list of nodes.protected class
AbstractParentNode.ElementsByTagNameNS
To manage a list of nodes.
-
Field Summary
Fields Modifier and Type Field Description protected AbstractParentNode.ChildNodes
childNodes
The children.-
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
-
-
Constructor Summary
Constructors Constructor Description AbstractParentNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.w3c.dom.Node
appendChild(org.w3c.dom.Node newChild)
DOM: ImplementsNode.appendChild(Node)
.protected void
checkAndRemove(org.w3c.dom.Node n, boolean replace)
Checks the validity of a node to be inserted, and removes it from the document if needed.protected org.w3c.dom.Node
deepCopyInto(org.w3c.dom.Node n)
Deeply copy the fields of the current node into the given node.protected org.w3c.dom.Node
deepExport(org.w3c.dom.Node n, AbstractDocument d)
Deeply exports this node to the given document.protected void
fireDOMNodeInsertedEvent(org.w3c.dom.Node node)
Fires a DOMNodeInserted event.void
fireDOMNodeInsertedIntoDocumentEvent()
Recursively fires a DOMNodeInsertedIntoDocument event.protected void
fireDOMNodeRemovedEvent(org.w3c.dom.Node node)
Fires a DOMNodeRemoved event.void
fireDOMNodeRemovedFromDocumentEvent()
Recursively fires a DOMNodeRemovedFromDocument event.protected void
fireDOMSubtreeModifiedEvent()
Fires a DOMSubtreeModified event.org.w3c.dom.NodeList
getChildNodes()
DOM: ImplementsNode.getChildNodes()
.org.w3c.dom.NodeList
getElementsByTagName(java.lang.String name)
DOM: ImplementsElement.getElementsByTagName(String)
.org.w3c.dom.NodeList
getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
DOM: ImplementsElement.getElementsByTagNameNS(String,String)
.org.w3c.dom.Node
getFirstChild()
DOM: ImplementsNode.getFirstChild()
.org.w3c.dom.Node
getLastChild()
DOM: ImplementsNode.getLastChild()
.java.lang.String
getTextContent()
DOM: ImplementsNode.getTextContent()
.boolean
hasChildNodes()
DOM: ImplementsNode.hasChildNodes()
.org.w3c.dom.Node
insertBefore(org.w3c.dom.Node newChild, org.w3c.dom.Node refChild)
DOM: ImplementsNode.insertBefore(Node, Node)
.protected void
nodeAdded(org.w3c.dom.Node n)
Called when a child node has been added.protected void
nodeToBeRemoved(org.w3c.dom.Node n)
Called when a child node is going to be removed.void
normalize()
DOM: ImplementsNode.normalize()
.org.w3c.dom.Node
removeChild(org.w3c.dom.Node oldChild)
DOM: ImplementsNode.removeChild(Node)
.org.w3c.dom.Node
replaceChild(org.w3c.dom.Node newChild, org.w3c.dom.Node oldChild)
DOM: ImplementsNode.replaceChild(Node, Node)
.-
Methods inherited from class org.apache.batik.dom.AbstractNode
addEventListener, addEventListenerNS, checkChildType, cloneNode, compareDocumentPosition, compareNamedNodeMaps, compareStrings, copyInto, createDOMException, dispatchEvent, export, fireDOMCharacterDataModifiedEvent, fireUserDataHandlers, getAttributes, getBaseURI, getBaseURI, getCascadedXMLBase, getCurrentDocument, getEventSupport, getFeature, getLocalName, getManagerData, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getParentNodeEventTarget, getPrefix, getPreviousSibling, getUserData, getXblBoundElement, getXblChildNodes, getXblDefinitions, getXblFirstChild, getXblFirstElementChild, getXblLastChild, getXblLastElementChild, getXblNextElementSibling, getXblNextSibling, getXblParentNode, getXblPreviousElementSibling, getXblPreviousSibling, getXblScopedChildNodes, getXblShadowTree, hasAttributes, hasEventListenerNS, initializeEventSupport, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespacePrefix, lookupNamespaceURI, lookupPrefix, newNode, removeEventListener, removeEventListenerNS, setManagerData, setNextSibling, setNodeName, setNodeValue, setOwnerDocument, setParentNode, setPrefix, setPreviousSibling, setSpecified, setTextContent, 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.apache.batik.dom.ExtendedNode
isReadonly, setReadonly
-
-
-
-
Field Detail
-
childNodes
protected AbstractParentNode.ChildNodes childNodes
The children.
-
-
Method Detail
-
getChildNodes
public org.w3c.dom.NodeList getChildNodes()
DOM: ImplementsNode.getChildNodes()
.- Specified by:
getChildNodes
in interfaceorg.w3c.dom.Node
- Overrides:
getChildNodes
in classAbstractNode
- Returns:
childNodes
-
getFirstChild
public org.w3c.dom.Node getFirstChild()
DOM: ImplementsNode.getFirstChild()
.- Specified by:
getFirstChild
in interfaceorg.w3c.dom.Node
- Overrides:
getFirstChild
in classAbstractNode
- Returns:
childNodes
.firstChild
-
getLastChild
public org.w3c.dom.Node getLastChild()
DOM: ImplementsNode.getLastChild()
.- Specified by:
getLastChild
in interfaceorg.w3c.dom.Node
- Overrides:
getLastChild
in classAbstractNode
- Returns:
childNodes
.lastChild
-
insertBefore
public org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild, org.w3c.dom.Node refChild) throws org.w3c.dom.DOMException
DOM: ImplementsNode.insertBefore(Node, Node)
.- Specified by:
insertBefore
in interfaceorg.w3c.dom.Node
- Overrides:
insertBefore
in classAbstractNode
- Throws:
org.w3c.dom.DOMException
-
replaceChild
public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild, org.w3c.dom.Node oldChild) throws org.w3c.dom.DOMException
DOM: ImplementsNode.replaceChild(Node, Node)
.- Specified by:
replaceChild
in interfaceorg.w3c.dom.Node
- Overrides:
replaceChild
in classAbstractNode
- Throws:
org.w3c.dom.DOMException
-
removeChild
public org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild) throws org.w3c.dom.DOMException
DOM: ImplementsNode.removeChild(Node)
.- Specified by:
removeChild
in interfaceorg.w3c.dom.Node
- Overrides:
removeChild
in classAbstractNode
- Throws:
org.w3c.dom.DOMException
-
appendChild
public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild) throws org.w3c.dom.DOMException
DOM: ImplementsNode.appendChild(Node)
.- Specified by:
appendChild
in interfaceorg.w3c.dom.Node
- Overrides:
appendChild
in classAbstractNode
- Throws:
org.w3c.dom.DOMException
-
hasChildNodes
public boolean hasChildNodes()
DOM: ImplementsNode.hasChildNodes()
.- Specified by:
hasChildNodes
in interfaceorg.w3c.dom.Node
- Overrides:
hasChildNodes
in classAbstractNode
- Returns:
- true if this node has children, false otherwise.
-
normalize
public void normalize()
DOM: ImplementsNode.normalize()
.- Specified by:
normalize
in interfaceorg.w3c.dom.Node
- Overrides:
normalize
in classAbstractNode
-
getElementsByTagName
public org.w3c.dom.NodeList getElementsByTagName(java.lang.String name)
DOM: ImplementsElement.getElementsByTagName(String)
.
-
getElementsByTagNameNS
public org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
DOM: ImplementsElement.getElementsByTagNameNS(String,String)
.
-
getTextContent
public java.lang.String getTextContent()
DOM: ImplementsNode.getTextContent()
.- Specified by:
getTextContent
in interfaceorg.w3c.dom.Node
- Overrides:
getTextContent
in classAbstractNode
-
fireDOMNodeInsertedIntoDocumentEvent
public void fireDOMNodeInsertedIntoDocumentEvent()
Recursively fires a DOMNodeInsertedIntoDocument event.- Overrides:
fireDOMNodeInsertedIntoDocumentEvent
in classAbstractNode
-
fireDOMNodeRemovedFromDocumentEvent
public void fireDOMNodeRemovedFromDocumentEvent()
Recursively fires a DOMNodeRemovedFromDocument event.- Overrides:
fireDOMNodeRemovedFromDocumentEvent
in classAbstractNode
-
nodeAdded
protected void nodeAdded(org.w3c.dom.Node n)
Called when a child node has been added.
-
nodeToBeRemoved
protected void nodeToBeRemoved(org.w3c.dom.Node n)
Called when a child node is going to be removed.
-
deepExport
protected org.w3c.dom.Node deepExport(org.w3c.dom.Node n, AbstractDocument d)
Deeply exports this node to the given document.- Overrides:
deepExport
in classAbstractNode
-
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:
deepCopyInto
in classAbstractNode
- Parameters:
n
- a node of the type of this.
-
fireDOMSubtreeModifiedEvent
protected void fireDOMSubtreeModifiedEvent()
Fires a DOMSubtreeModified event.
-
fireDOMNodeInsertedEvent
protected void fireDOMNodeInsertedEvent(org.w3c.dom.Node node)
Fires a DOMNodeInserted event.
-
fireDOMNodeRemovedEvent
protected void fireDOMNodeRemovedEvent(org.w3c.dom.Node node)
Fires a DOMNodeRemoved event.
-
checkAndRemove
protected void checkAndRemove(org.w3c.dom.Node n, boolean replace)
Checks the validity of a node to be inserted, and removes it from the document if needed.
-
-