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.- Version:
- $Id$
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInner class to hold type information about this attribute.Nested classes/interfaces inherited from class AbstractParentNode
AbstractParentNode.ChildNodes, AbstractParentNode.ElementsByTagName, AbstractParentNode.ElementsByTagNameNS -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanWhether this attribute is an ID attributeprotected StringThe name of this node.protected AbstractElementThe owner element.protected TypeInfoThe attribute type information.protected booleanWhether this attribute was not specified in the original document.Fields 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 Attr object.protectedAbstractAttr(String name, AbstractDocument owner) Creates a new Attr object. -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 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.protected voidFires a DOMSubtreeModified event.getName()DOM: ImplementsAttr.getName().DOM: ImplementsNode.getNodeName().shortDOM: ImplementsNode.getNodeType().DOM: ImplementsNode.getNodeValue().DOM: ImplementsAttr.getOwnerElement().DOM: ImplementsAttr.getSchemaTypeInfo().booleanDOM: ImplementsAttr.getSpecified().getValue()DOM: ImplementsAttr.getValue().booleanisId()DOM: ImplementsAttr.isId().protected voidCalled when a child node has been added.protected voidCalled when a child node is going to be removed.voidsetIsId(boolean isId) Sets whether this attribute is an ID attribute.voidSets the node name.voidsetNodeValue(String nodeValue) DOM: ImplementsNode.setNodeValue(String).voidSets the owner element.voidsetSpecified(boolean v) Sets the specified attribute.voidDOM: ImplementsAttr.setValue(String).Methods inherited from class AbstractParentNode
appendChild, checkAndRemove, fireDOMNodeInsertedEvent, fireDOMNodeInsertedIntoDocumentEvent, fireDOMNodeRemovedEvent, fireDOMNodeRemovedFromDocumentEvent, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getLastChild, getTextContent, hasChildNodes, insertBefore, normalize, removeChild, replaceChildMethods inherited from class 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, willTriggerNSMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ExtendedNode
isReadonly, setReadonlyMethods inherited from interface 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:
setNodeNamein interfaceExtendedNode- Overrides:
setNodeNamein classAbstractNode
-
getNodeName
DOM: ImplementsNode.getNodeName().- Specified by:
getNodeNamein interfaceNode- Returns:
nodeName.
-
getNodeType
public short getNodeType()DOM: ImplementsNode.getNodeType().- Specified by:
getNodeTypein interfaceNode- Returns:
Node.ATTRIBUTE_NODE
-
getNodeValue
DOM: ImplementsNode.getNodeValue().- Specified by:
getNodeValuein interfaceNode- Overrides:
getNodeValuein classAbstractNode- Returns:
- The content of the attribute.
- Throws:
DOMException
-
setNodeValue
DOM: ImplementsNode.setNodeValue(String).- Specified by:
setNodeValuein interfaceNode- Overrides:
setNodeValuein classAbstractNode- Throws:
DOMException
-
getName
DOM: ImplementsAttr.getName().- Specified by:
getNamein interfaceAttr- Returns:
getNodeName().
-
getSpecified
public boolean getSpecified()DOM: ImplementsAttr.getSpecified().- Specified by:
getSpecifiedin interfaceAttr- Returns:
- !
unspecified.
-
setSpecified
public void setSpecified(boolean v) Sets the specified attribute.- Specified by:
setSpecifiedin interfaceExtendedNode- Overrides:
setSpecifiedin classAbstractNode
-
getValue
DOM: ImplementsAttr.getValue().- Specified by:
getValuein interfaceAttr- Returns:
getNodeValue().
-
setValue
DOM: ImplementsAttr.setValue(String).- Specified by:
setValuein interfaceAttr- Throws:
DOMException
-
setOwnerElement
Sets the owner element. -
getOwnerElement
DOM: ImplementsAttr.getOwnerElement().- Specified by:
getOwnerElementin interfaceAttr
-
getSchemaTypeInfo
DOM: ImplementsAttr.getSchemaTypeInfo().- Specified by:
getSchemaTypeInfoin interfaceAttr
-
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:
nodeAddedin classAbstractParentNode
-
nodeToBeRemoved
Called when a child node is going to be removed.- Overrides:
nodeToBeRemovedin classAbstractParentNode
-
export
Exports this node to the given document.- Overrides:
exportin classAbstractNode
-
deepExport
Deeply exports this node to the given document.- Overrides:
deepExportin classAbstractParentNode
-
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
-
fireDOMSubtreeModifiedEvent
protected void fireDOMSubtreeModifiedEvent()Fires a DOMSubtreeModified event.- Overrides:
fireDOMSubtreeModifiedEventin classAbstractParentNode
-