Class AbstractElement
java.lang.Object
org.apache.batik.dom.AbstractNode
org.apache.batik.dom.AbstractParentNode
org.apache.batik.dom.AbstractParentChildNode
org.apache.batik.dom.AbstractElement
- All Implemented Interfaces:
Serializable, NodeEventTarget, ExtendedNode, NodeXBL, XBLManagerData, ElementTraversal, Element, EventTarget, Node
- Direct Known Subclasses:
AbstractElement, AbstractElementNS, GenericElement
public abstract class AbstractElement
extends AbstractParentChildNode
implements Element, ElementTraversal
This class implements the
Element interface.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInner class to hold type information about this element.protected static classTo manage collisions in the attributes map.classAn implementation of theNamedNodeMap.Nested classes/interfaces inherited from class AbstractParentNode
AbstractParentNode.ChildNodes, AbstractParentNode.ElementsByTagName, AbstractParentNode.ElementsByTagNameNS -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected NamedNodeMapThe attributes of this element.protected TypeInfoThe element type information.Fields inherited from class AbstractParentChildNode
nextSibling, parentNode, previousSiblingFields inherited from class AbstractParentNode
childNodesFields inherited from class 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, userDataHandlersFields inherited from interface 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
ConstructorsModifierConstructorDescriptionprotectedCreates a new AbstractElement object.protectedAbstractElement(String name, AbstractDocument owner) Creates a new AbstractElement object. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCalled when an attribute has been added.protected voidattrModified(Attr node, String oldv, String newv) Called when an attribute has been modified.protected voidattrRemoved(Attr node, String oldv) Called when an attribute has been removed.protected voidcheckChildType(Node n, boolean replace) Checks the validity of a node to be inserted.protected NodeCopy the fields of the current node into the given node.protected NamedNodeMapCreates the attribute list.protected NodedeepCopyInto(Node n) Deeply copy the fields of the current node into the given node.protected NodedeepExport(Node n, AbstractDocument d) Deeply exports this node to the given document.protected Nodeexport(Node n, AbstractDocument d) Exports this node to the given document.voidfireDOMAttrModifiedEvent(String name, Attr node, String oldv, String newv, short change) Fires a DOMAttrModified event.getAttribute(String name) DOM: ImplementsElement.getAttribute(String).getAttributeNode(String name) DOM: ImplementsElement.getAttributeNode(String).getAttributeNodeNS(String namespaceURI, String localName) DOM: ImplementsElement.getAttributeNodeNS(String,String).getAttributeNS(String namespaceURI, String localName) DOM: ImplementsElement.getAttributeNS(String,String).DOM: ImplementsNode.getAttributes().intDOM: ImplementsElementTraversal.getChildElementCount().DOM: ImplementsElementTraversal.getFirstElementChild().protected StringgetId()Get the ID of this element.protected AttrGet an ID attribute.DOM: ImplementsElementTraversal.getLastElementChild().DOM: ImplementsElementTraversal.getNextElementSibling().shortDOM: ImplementsNode.getNodeType().DOM: ImplementsElementTraversal.getPreviousElementSibling().DOM: ImplementsElement.getSchemaTypeInfo().DOM: ImplementsElement.getTagName().booleanhasAttribute(String name) DOM: ImplementsElement.hasAttribute(String).booleanhasAttributeNS(String namespaceURI, String localName) DOM: ImplementsElement.hasAttributeNS(String,String).booleanDOM: ImplementsNode.hasAttributes().protected voidCalled when a child node has been added.protected voidnodeToBeRemoved(Node node) Called when a child node is going to be removed.voidDOM: ImplementsNode.normalize().voidremoveAttribute(String name) DOM: ImplementsElement.removeAttribute(String).removeAttributeNode(Attr oldAttr) DOM: ImplementsElement.removeAttributeNode(Attr).voidremoveAttributeNS(String namespaceURI, String localName) DOM: ImplementsElement.removeAttributeNS(String,String).voidsetAttribute(String name, String value) DOM: ImplementsElement.setAttribute(String,String).setAttributeNode(Attr newAttr) DOM: ImplementsElement.setAttributeNode(Attr).setAttributeNodeNS(Attr newAttr) DOM: ImplementsElement.setAttributeNodeNS(Attr).voidsetAttributeNS(String namespaceURI, String qualifiedName, String value) DOM: ImplementsElement.setAttributeNS(String,String,String).voidsetIdAttribute(String name, boolean isId) DOM: ImplementsElement.setIdAttribute(String,boolean).voidsetIdAttributeNode(Attr attr, boolean isId) DOM: ImplementsElement.setIdAttributeNode(Attr,boolean).voidsetIdAttributeNS(String ns, String ln, boolean isId) DOM: ImplementsElement.setIdAttributeNS(String,String,boolean).Methods inherited from class AbstractParentChildNode
getNextSibling, getParentNode, getPreviousSibling, setNextSibling, setParentNode, setPreviousSiblingMethods inherited from class AbstractParentNode
appendChild, checkAndRemove, fireDOMNodeInsertedEvent, fireDOMNodeInsertedIntoDocumentEvent, fireDOMNodeRemovedEvent, fireDOMNodeRemovedFromDocumentEvent, fireDOMSubtreeModifiedEvent, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getLastChild, getTextContent, hasChildNodes, insertBefore, removeChild, replaceChildMethods inherited from class AbstractNode
addEventListener, addEventListenerNS, cloneNode, compareDocumentPosition, compareNamedNodeMaps, compareStrings, createDOMException, dispatchEvent, fireDOMCharacterDataModifiedEvent, fireUserDataHandlers, getBaseURI, getBaseURI, getCascadedXMLBase, getCurrentDocument, getEventSupport, getFeature, getLocalName, getManagerData, getNamespaceURI, getNodeValue, getOwnerDocument, getParentNodeEventTarget, getPrefix, getUserData, getXblBoundElement, getXblChildNodes, getXblDefinitions, getXblFirstChild, getXblFirstElementChild, getXblLastChild, getXblLastElementChild, getXblNextElementSibling, getXblNextSibling, getXblParentNode, getXblPreviousElementSibling, getXblPreviousSibling, getXblScopedChildNodes, getXblShadowTree, hasEventListenerNS, initializeEventSupport, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespacePrefix, lookupNamespaceURI, lookupPrefix, newNode, removeEventListener, removeEventListenerNS, setManagerData, setNodeName, setNodeValue, setOwnerDocument, setPrefix, setSpecified, setTextContent, setUserData, willTriggerNSMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Element
getElementsByTagName, getElementsByTagNameNSMethods inherited from interface ExtendedNode
isReadonly, setReadonlyMethods inherited from interface Node
appendChild, cloneNode, compareDocumentPosition, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
-
Field Details
-
attributes
The attributes of this element. -
typeInfo
The element type information.
-
-
Constructor Details
-
AbstractElement
protected AbstractElement()Creates a new AbstractElement object. -
AbstractElement
Creates a new AbstractElement object.- Parameters:
name- The element name for validation purposes.owner- The owner document.- Throws:
DOMException- INVALID_CHARACTER_ERR: if name contains invalid characters,
-
-
Method Details
-
getNodeType
public short getNodeType()DOM: ImplementsNode.getNodeType().- Specified by:
getNodeTypein interfaceNode- Returns:
Node.ELEMENT_NODE
-
hasAttributes
public boolean hasAttributes()DOM: ImplementsNode.hasAttributes().- Specified by:
hasAttributesin interfaceNode- Overrides:
hasAttributesin classAbstractNode- Returns:
- false.
-
getAttributes
DOM: ImplementsNode.getAttributes().- Specified by:
getAttributesin interfaceNode- Overrides:
getAttributesin classAbstractNode- Returns:
- null.
-
getTagName
DOM: ImplementsElement.getTagName().- Specified by:
getTagNamein interfaceElement- Returns:
Node.getNodeName().
-
hasAttribute
DOM: ImplementsElement.hasAttribute(String).- Specified by:
hasAttributein interfaceElement
-
getAttribute
DOM: ImplementsElement.getAttribute(String).- Specified by:
getAttributein interfaceElement
-
setAttribute
DOM: ImplementsElement.setAttribute(String,String).- Specified by:
setAttributein interfaceElement- Throws:
DOMException
-
removeAttribute
DOM: ImplementsElement.removeAttribute(String).- Specified by:
removeAttributein interfaceElement- Throws:
DOMException
-
getAttributeNode
DOM: ImplementsElement.getAttributeNode(String).- Specified by:
getAttributeNodein interfaceElement
-
setAttributeNode
DOM: ImplementsElement.setAttributeNode(Attr).- Specified by:
setAttributeNodein interfaceElement- Throws:
DOMException
-
removeAttributeNode
DOM: ImplementsElement.removeAttributeNode(Attr).- Specified by:
removeAttributeNodein interfaceElement- Throws:
DOMException
-
normalize
public void normalize()DOM: ImplementsNode.normalize().- Specified by:
normalizein interfaceNode- Overrides:
normalizein classAbstractParentNode
-
hasAttributeNS
DOM: ImplementsElement.hasAttributeNS(String,String).- Specified by:
hasAttributeNSin interfaceElement
-
getAttributeNS
DOM: ImplementsElement.getAttributeNS(String,String).- Specified by:
getAttributeNSin interfaceElement
-
setAttributeNS
public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException DOM: ImplementsElement.setAttributeNS(String,String,String).- Specified by:
setAttributeNSin interfaceElement- Throws:
DOMException
-
removeAttributeNS
DOM: ImplementsElement.removeAttributeNS(String,String).- Specified by:
removeAttributeNSin interfaceElement- Throws:
DOMException
-
getAttributeNodeNS
DOM: ImplementsElement.getAttributeNodeNS(String,String).- Specified by:
getAttributeNodeNSin interfaceElement
-
setAttributeNodeNS
DOM: ImplementsElement.setAttributeNodeNS(Attr).- Specified by:
setAttributeNodeNSin interfaceElement- Throws:
DOMException
-
getSchemaTypeInfo
DOM: ImplementsElement.getSchemaTypeInfo().- Specified by:
getSchemaTypeInfoin interfaceElement
-
setIdAttribute
DOM: ImplementsElement.setIdAttribute(String,boolean).- Specified by:
setIdAttributein interfaceElement- Throws:
DOMException
-
setIdAttributeNS
DOM: ImplementsElement.setIdAttributeNS(String,String,boolean).- Specified by:
setIdAttributeNSin interfaceElement- Throws:
DOMException
-
setIdAttributeNode
DOM: ImplementsElement.setIdAttributeNode(Attr,boolean).- Specified by:
setIdAttributeNodein interfaceElement- Throws:
DOMException
-
getIdAttribute
Get an ID attribute. -
getId
Get the ID of this element. -
nodeAdded
Called when a child node has been added.- Overrides:
nodeAddedin classAbstractParentNode
-
nodeToBeRemoved
Called when a child node is going to be removed.- Overrides:
nodeToBeRemovedin classAbstractParentNode
-
createAttributes
Creates the attribute list. -
export
Exports this node to the given document.- Overrides:
exportin classAbstractNode- Parameters:
n- The clone node.d- The destination document.
-
deepExport
Deeply exports this node to the given document.- Overrides:
deepExportin classAbstractParentNode- Parameters:
n- The clone node.d- The destination document.
-
copyInto
Copy the fields of the current node into the given node.- Overrides:
copyIntoin classAbstractNode- Parameters:
n- a node of the type of this.
-
deepCopyInto
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
Checks the validity of a node to be inserted.- Overrides:
checkChildTypein classAbstractNode- Parameters:
n- The node to be inserted.
-
fireDOMAttrModifiedEvent
public void fireDOMAttrModifiedEvent(String name, Attr node, String oldv, String newv, short change) Fires a DOMAttrModified event. WARNING: public accessor because of compilation problems on Solaris. Do not change.- Parameters:
name- The attribute's name.node- The attribute's node.oldv- The old value of the attribute.newv- The new value of the attribute.change- The modification type.
-
attrAdded
-
attrModified
-
attrRemoved
-
getFirstElementChild
DOM: ImplementsElementTraversal.getFirstElementChild().- Specified by:
getFirstElementChildin interfaceElementTraversal
-
getLastElementChild
DOM: ImplementsElementTraversal.getLastElementChild().- Specified by:
getLastElementChildin interfaceElementTraversal
-
getNextElementSibling
DOM: ImplementsElementTraversal.getNextElementSibling().- Specified by:
getNextElementSiblingin interfaceElementTraversal
-
getPreviousElementSibling
DOM: ImplementsElementTraversal.getPreviousElementSibling().- Specified by:
getPreviousElementSiblingin interfaceElementTraversal
-
getChildElementCount
public int getChildElementCount()DOM: ImplementsElementTraversal.getChildElementCount().- Specified by:
getChildElementCountin interfaceElementTraversal
-