Package org.apache.batik.dom
Class AbstractAttr
java.lang.Object
org.apache.batik.dom.AbstractNode
org.apache.batik.dom.AbstractParentNode
org.apache.batik.dom.AbstractAttr
- All Implemented Interfaces:
Serializable
,NodeEventTarget
,ExtendedNode
,NodeXBL
,XBLManagerData
,Attr
,EventTarget
,Node
- Direct Known Subclasses:
AbstractAttrNS
,GenericAttr
This class implements the
Attr
interface.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Inner class to hold type information about this attribute.Nested classes/interfaces inherited from class org.apache.batik.dom.AbstractParentNode
AbstractParentNode.ChildNodes, AbstractParentNode.ElementsByTagName, AbstractParentNode.ElementsByTagNameNS
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
Whether this attribute is an ID attributeprotected String
The name of this node.protected AbstractElement
The owner element.protected TypeInfo
The attribute type information.protected boolean
Whether this attribute was not specified in the original 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
ConstructorsModifierConstructorDescriptionprotected
Creates a new Attr object.protected
AbstractAttr
(String name, AbstractDocument owner) Creates a new Attr object. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkChildType
(Node n, boolean replace) Checks the validity of a node to be inserted.protected Node
Copy the fields of the current node into the given node.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.protected void
Fires a DOMSubtreeModified event.getName()
DOM: ImplementsAttr.getName()
.DOM: ImplementsNode.getNodeName()
.short
DOM: ImplementsNode.getNodeType()
.DOM: ImplementsNode.getNodeValue()
.DOM: ImplementsAttr.getOwnerElement()
.DOM: ImplementsAttr.getSchemaTypeInfo()
.boolean
DOM: ImplementsAttr.getSpecified()
.getValue()
DOM: ImplementsAttr.getValue()
.boolean
isId()
DOM: ImplementsAttr.isId()
.protected void
Called when a child node has been added.protected void
Called when a child node is going to be removed.void
setIsId
(boolean isId) Sets whether this attribute is an ID attribute.void
Sets the node name.void
setNodeValue
(String nodeValue) DOM: ImplementsNode.setNodeValue(String)
.void
Sets the owner element.void
setSpecified
(boolean v) Sets the specified attribute.void
DOM: ImplementsAttr.setValue(String)
.Methods inherited from class org.apache.batik.dom.AbstractParentNode
appendChild, checkAndRemove, fireDOMNodeInsertedEvent, fireDOMNodeInsertedIntoDocumentEvent, fireDOMNodeRemovedEvent, fireDOMNodeRemovedFromDocumentEvent, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getLastChild, getTextContent, hasChildNodes, insertBefore, normalize, removeChild, replaceChild
Methods inherited from class org.apache.batik.dom.AbstractNode
addEventListener, addEventListenerNS, cloneNode, compareDocumentPosition, compareNamedNodeMaps, compareStrings, createDOMException, dispatchEvent, fireDOMCharacterDataModifiedEvent, fireUserDataHandlers, getAttributes, getBaseURI, getBaseURI, getCascadedXMLBase, getCurrentDocument, getEventSupport, getFeature, getLocalName, getManagerData, getNamespaceURI, getNextSibling, 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, setOwnerDocument, setParentNode, setPrefix, setPreviousSibling, 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
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setPrefix, setTextContent, setUserData
-
Field Details
-
nodeName
The name of this node. -
unspecified
protected boolean unspecifiedWhether this attribute was not specified in the original document. -
isIdAttr
protected boolean isIdAttrWhether this attribute is an ID attribute -
ownerElement
The owner element. -
typeInfo
The attribute type information.
-
-
Constructor Details
-
AbstractAttr
protected AbstractAttr()Creates a new Attr object. -
AbstractAttr
Creates a new Attr object.- Parameters:
name
- The attribute name for validation purposes.owner
- The owner document.- Throws:
DOMException
- INVALID_CHARACTER_ERR: if name contains invalid characters,
-
-
Method Details
-
setNodeName
Sets the node name.- Specified by:
setNodeName
in interfaceExtendedNode
- Overrides:
setNodeName
in classAbstractNode
-
getNodeName
DOM: ImplementsNode.getNodeName()
.- Specified by:
getNodeName
in interfaceNode
- Returns:
nodeName
.
-
getNodeType
public short getNodeType()DOM: ImplementsNode.getNodeType()
.- Specified by:
getNodeType
in interfaceNode
- Returns:
Node.ATTRIBUTE_NODE
-
getNodeValue
DOM: ImplementsNode.getNodeValue()
.- Specified by:
getNodeValue
in interfaceNode
- Overrides:
getNodeValue
in classAbstractNode
- Returns:
- The content of the attribute.
- Throws:
DOMException
-
setNodeValue
DOM: ImplementsNode.setNodeValue(String)
.- Specified by:
setNodeValue
in interfaceNode
- Overrides:
setNodeValue
in classAbstractNode
- Throws:
DOMException
-
getName
DOM: ImplementsAttr.getName()
.- Specified by:
getName
in interfaceAttr
- Returns:
getNodeName()
.
-
getSpecified
public boolean getSpecified()DOM: ImplementsAttr.getSpecified()
.- Specified by:
getSpecified
in interfaceAttr
- Returns:
- !
unspecified
.
-
setSpecified
public void setSpecified(boolean v) Sets the specified attribute.- Specified by:
setSpecified
in interfaceExtendedNode
- Overrides:
setSpecified
in classAbstractNode
-
getValue
DOM: ImplementsAttr.getValue()
.- Specified by:
getValue
in interfaceAttr
- Returns:
getNodeValue()
.
-
setValue
DOM: ImplementsAttr.setValue(String)
.- Specified by:
setValue
in interfaceAttr
- Throws:
DOMException
-
setOwnerElement
Sets the owner element. -
getOwnerElement
DOM: ImplementsAttr.getOwnerElement()
.- Specified by:
getOwnerElement
in interfaceAttr
-
getSchemaTypeInfo
DOM: ImplementsAttr.getSchemaTypeInfo()
.- Specified by:
getSchemaTypeInfo
in interfaceAttr
-
isId
public boolean isId()DOM: ImplementsAttr.isId()
. -
setIsId
public void setIsId(boolean isId) Sets whether this attribute is an ID attribute. -
nodeAdded
Called when a child node has been added.- Overrides:
nodeAdded
in classAbstractParentNode
-
nodeToBeRemoved
Called when a child node is going to be removed.- Overrides:
nodeToBeRemoved
in classAbstractParentNode
-
export
Exports this node to the given document.- Overrides:
export
in classAbstractNode
-
deepExport
Deeply exports this node to the given document.- Overrides:
deepExport
in classAbstractParentNode
-
copyInto
Copy the fields of the current node into the given node.- Overrides:
copyInto
in classAbstractNode
- Parameters:
n
- a node of the type of this.
-
deepCopyInto
Deeply copy the fields of the current node into the given node.- Overrides:
deepCopyInto
in classAbstractParentNode
- Parameters:
n
- a node of the type of this.
-
checkChildType
Checks the validity of a node to be inserted.- Overrides:
checkChildType
in classAbstractNode
-
fireDOMSubtreeModifiedEvent
protected void fireDOMSubtreeModifiedEvent()Fires a DOMSubtreeModified event.- Overrides:
fireDOMSubtreeModifiedEvent
in classAbstractParentNode
-