public abstract class AbstractElement extends AbstractParentChildNode implements Element, ElementTraversal
Element interface.| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractElement.ElementTypeInfo
Inner class to hold type information about this element.
|
protected static class |
AbstractElement.Entry
To manage collisions in the attributes map.
|
class |
AbstractElement.NamedNodeHashMap
An implementation of the
NamedNodeMap. |
AbstractParentNode.ChildNodes, AbstractParentNode.ElementsByTagName, AbstractParentNode.ElementsByTagNameNS| Modifier and Type | Field and Description |
|---|---|
protected NamedNodeMap |
attributes
The attributes of this element.
|
protected TypeInfo |
typeInfo
The element type information.
|
nextSibling, parentNode, previousSiblingchildNodesDOCUMENT_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, userDataHandlersATTRIBUTE_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| Modifier | Constructor and Description |
|---|---|
protected |
AbstractElement()
Creates a new AbstractElement object.
|
protected |
AbstractElement(java.lang.String name,
AbstractDocument owner)
Creates a new AbstractElement object.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
attrAdded(Attr node,
java.lang.String newv)
Called when an attribute has been added.
|
protected void |
attrModified(Attr node,
java.lang.String oldv,
java.lang.String newv)
Called when an attribute has been modified.
|
protected void |
attrRemoved(Attr node,
java.lang.String oldv)
Called when an attribute has been removed.
|
protected void |
checkChildType(Node n,
boolean replace)
Checks the validity of a node to be inserted.
|
protected Node |
copyInto(Node n)
Copy the fields of the current node into the given node.
|
protected NamedNodeMap |
createAttributes()
Creates the attribute list.
|
protected Node |
deepCopyInto(Node n)
Deeply copy the fields of the current node into the given node.
|
protected Node |
deepExport(Node n,
AbstractDocument d)
Deeply exports this node to the given document.
|
protected Node |
export(Node n,
AbstractDocument d)
Exports this node to the given document.
|
void |
fireDOMAttrModifiedEvent(java.lang.String name,
Attr node,
java.lang.String oldv,
java.lang.String newv,
short change)
Fires a DOMAttrModified event.
|
java.lang.String |
getAttribute(java.lang.String name)
DOM: Implements
Element.getAttribute(String). |
Attr |
getAttributeNode(java.lang.String name)
DOM: Implements
Element.getAttributeNode(String). |
Attr |
getAttributeNodeNS(java.lang.String namespaceURI,
java.lang.String localName)
DOM: Implements
Element.getAttributeNodeNS(String,String). |
java.lang.String |
getAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
DOM: Implements
Element.getAttributeNS(String,String). |
NamedNodeMap |
getAttributes()
DOM: Implements
Node.getAttributes(). |
int |
getChildElementCount()
DOM: Implements
ElementTraversal.getChildElementCount(). |
Element |
getFirstElementChild()
DOM: Implements
ElementTraversal.getFirstElementChild(). |
protected java.lang.String |
getId()
Get the ID of this element.
|
protected Attr |
getIdAttribute()
Get an ID attribute.
|
Element |
getLastElementChild()
DOM: Implements
ElementTraversal.getLastElementChild(). |
Element |
getNextElementSibling()
DOM: Implements
ElementTraversal.getNextElementSibling(). |
short |
getNodeType()
DOM: Implements
Node.getNodeType(). |
Element |
getPreviousElementSibling()
DOM: Implements
ElementTraversal.getPreviousElementSibling(). |
TypeInfo |
getSchemaTypeInfo()
DOM: Implements
Element.getSchemaTypeInfo(). |
java.lang.String |
getTagName()
DOM: Implements
Element.getTagName(). |
boolean |
hasAttribute(java.lang.String name)
DOM: Implements
Element.hasAttribute(String). |
boolean |
hasAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
DOM: Implements
Element.hasAttributeNS(String,String). |
boolean |
hasAttributes()
DOM: Implements
Node.hasAttributes(). |
protected void |
nodeAdded(Node node)
Called when a child node has been added.
|
protected void |
nodeToBeRemoved(Node node)
Called when a child node is going to be removed.
|
void |
normalize()
DOM: Implements
Node.normalize(). |
void |
removeAttribute(java.lang.String name)
DOM: Implements
Element.removeAttribute(String). |
Attr |
removeAttributeNode(Attr oldAttr)
DOM: Implements
Element.removeAttributeNode(Attr). |
void |
removeAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
DOM: Implements
Element.removeAttributeNS(String,String). |
void |
setAttribute(java.lang.String name,
java.lang.String value)
DOM: Implements
Element.setAttribute(String,String). |
Attr |
setAttributeNode(Attr newAttr)
DOM: Implements
Element.setAttributeNode(Attr). |
Attr |
setAttributeNodeNS(Attr newAttr)
DOM: Implements
Element.setAttributeNodeNS(Attr). |
void |
setAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName,
java.lang.String value)
DOM: Implements
Element.setAttributeNS(String,String,String). |
void |
setIdAttribute(java.lang.String name,
boolean isId)
DOM: Implements
Element.setIdAttribute(String,boolean). |
void |
setIdAttributeNode(Attr attr,
boolean isId)
DOM: Implements
Element.setIdAttributeNode(Attr,boolean). |
void |
setIdAttributeNS(java.lang.String ns,
java.lang.String ln,
boolean isId)
DOM: Implements
Element.setIdAttributeNS(String,String,boolean). |
getNextSibling, getParentNode, getPreviousSibling, setNextSibling, setParentNode, setPreviousSiblingappendChild, checkAndRemove, fireDOMNodeInsertedEvent, fireDOMNodeInsertedIntoDocumentEvent, fireDOMNodeRemovedEvent, fireDOMNodeRemovedFromDocumentEvent, fireDOMSubtreeModifiedEvent, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getLastChild, getTextContent, hasChildNodes, insertBefore, removeChild, replaceChildaddEventListener, 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, willTriggerNSclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetElementsByTagName, getElementsByTagNameNSappendChild, 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, setUserDataisReadonly, setReadonlyprotected NamedNodeMap attributes
protected TypeInfo typeInfo
protected AbstractElement()
protected AbstractElement(java.lang.String name,
AbstractDocument owner)
name - The element name for validation purposes.owner - The owner document.DOMException - INVALID_CHARACTER_ERR: if name contains invalid characters,public short getNodeType()
Node.getNodeType().getNodeType in interface NodeNode.ELEMENT_NODEpublic boolean hasAttributes()
Node.hasAttributes().hasAttributes in interface NodehasAttributes in class AbstractNodepublic NamedNodeMap getAttributes()
Node.getAttributes().getAttributes in interface NodegetAttributes in class AbstractNodepublic java.lang.String getTagName()
Element.getTagName().getTagName in interface ElementNode.getNodeName().public boolean hasAttribute(java.lang.String name)
Element.hasAttribute(String).hasAttribute in interface Elementpublic java.lang.String getAttribute(java.lang.String name)
Element.getAttribute(String).getAttribute in interface Elementpublic void setAttribute(java.lang.String name,
java.lang.String value)
throws DOMException
Element.setAttribute(String,String).setAttribute in interface ElementDOMExceptionpublic void removeAttribute(java.lang.String name)
throws DOMException
Element.removeAttribute(String).removeAttribute in interface ElementDOMExceptionpublic Attr getAttributeNode(java.lang.String name)
Element.getAttributeNode(String).getAttributeNode in interface Elementpublic Attr setAttributeNode(Attr newAttr) throws DOMException
Element.setAttributeNode(Attr).setAttributeNode in interface ElementDOMExceptionpublic Attr removeAttributeNode(Attr oldAttr) throws DOMException
Element.removeAttributeNode(Attr).removeAttributeNode in interface ElementDOMExceptionpublic void normalize()
Node.normalize().normalize in interface Nodenormalize in class AbstractParentNodepublic boolean hasAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
Element.hasAttributeNS(String,String).hasAttributeNS in interface Elementpublic java.lang.String getAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
Element.getAttributeNS(String,String).getAttributeNS in interface Elementpublic void setAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName,
java.lang.String value)
throws DOMException
Element.setAttributeNS(String,String,String).setAttributeNS in interface ElementDOMExceptionpublic void removeAttributeNS(java.lang.String namespaceURI,
java.lang.String localName)
throws DOMException
Element.removeAttributeNS(String,String).removeAttributeNS in interface ElementDOMExceptionpublic Attr getAttributeNodeNS(java.lang.String namespaceURI, java.lang.String localName)
Element.getAttributeNodeNS(String,String).getAttributeNodeNS in interface Elementpublic Attr setAttributeNodeNS(Attr newAttr) throws DOMException
Element.setAttributeNodeNS(Attr).setAttributeNodeNS in interface ElementDOMExceptionpublic TypeInfo getSchemaTypeInfo()
Element.getSchemaTypeInfo().getSchemaTypeInfo in interface Elementpublic void setIdAttribute(java.lang.String name,
boolean isId)
throws DOMException
Element.setIdAttribute(String,boolean).setIdAttribute in interface ElementDOMExceptionpublic void setIdAttributeNS(java.lang.String ns,
java.lang.String ln,
boolean isId)
throws DOMException
Element.setIdAttributeNS(String,String,boolean).setIdAttributeNS in interface ElementDOMExceptionpublic void setIdAttributeNode(Attr attr, boolean isId) throws DOMException
Element.setIdAttributeNode(Attr,boolean).setIdAttributeNode in interface ElementDOMExceptionprotected Attr getIdAttribute()
protected java.lang.String getId()
protected void nodeAdded(Node node)
nodeAdded in class AbstractParentNodeprotected void nodeToBeRemoved(Node node)
nodeToBeRemoved in class AbstractParentNodeprotected NamedNodeMap createAttributes()
protected Node export(Node n, AbstractDocument d)
export in class AbstractNoden - The clone node.d - The destination document.protected Node deepExport(Node n, AbstractDocument d)
deepExport in class AbstractParentNoden - The clone node.d - The destination document.protected Node copyInto(Node n)
copyInto in class AbstractNoden - a node of the type of this.protected Node deepCopyInto(Node n)
deepCopyInto in class AbstractParentNoden - a node of the type of this.protected void checkChildType(Node n, boolean replace)
checkChildType in class AbstractNoden - The node to be inserted.public void fireDOMAttrModifiedEvent(java.lang.String name,
Attr node,
java.lang.String oldv,
java.lang.String newv,
short change)
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.protected void attrAdded(Attr node, java.lang.String newv)
protected void attrModified(Attr node, java.lang.String oldv, java.lang.String newv)
protected void attrRemoved(Attr node, java.lang.String oldv)
public Element getFirstElementChild()
ElementTraversal.getFirstElementChild().getFirstElementChild in interface ElementTraversalpublic Element getLastElementChild()
ElementTraversal.getLastElementChild().getLastElementChild in interface ElementTraversalpublic Element getNextElementSibling()
ElementTraversal.getNextElementSibling().getNextElementSibling in interface ElementTraversalpublic Element getPreviousElementSibling()
ElementTraversal.getPreviousElementSibling().getPreviousElementSibling in interface ElementTraversalpublic int getChildElementCount()
ElementTraversal.getChildElementCount().getChildElementCount in interface ElementTraversalCopyright © 2022 Apache Software Foundation. All Rights Reserved.