|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.batik.dom.NodeWrapper | +--org.apache.batik.dom.ElementWrapper
This class implements a wrapper for an Element. All the methods of the underlying document are called in a single thread.
Fields inherited from class org.apache.batik.dom.NodeWrapper |
bubblingListeners, capturingListeners, documentWrapper, node |
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Constructor Summary | |
ElementWrapper(DocumentWrapper dw,
Element e)
Creates a new ElementWrapper object. |
Method Summary | |
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) . |
NodeList |
getElementsByTagName(java.lang.String name)
DOM: Implements Element.getElementsByTagName(String) . |
NodeList |
getElementsByTagNameNS(java.lang.String namespaceURI,
java.lang.String localName)
DOM: Implements Element.getElementsByTagNameNS(String,String) . |
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) . |
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) . |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
Constructor Detail |
public ElementWrapper(DocumentWrapper dw, Element e)
Method Detail |
public java.lang.String getTagName()
Element.getTagName()
.getTagName
in interface Element
public boolean hasAttribute(java.lang.String name)
Element.hasAttribute(String)
.hasAttribute
in interface Element
org.w3c.dom.Element
nameThe
- name of the attribute to look for.true
if an attribute with the given name is
specified on this element or has a default value, false
otherwise.public java.lang.String getAttribute(java.lang.String name)
Element.getAttribute(String)
.getAttribute
in interface Element
org.w3c.dom.Element
nameThe
- name of the attribute to retrieve.Attr
value as a string, or the empty string
if that attribute does not have a specified or default value.public void setAttribute(java.lang.String name, java.lang.String value) throws DOMException
Element.setAttribute(String,String)
.setAttribute
in interface Element
org.w3c.dom.Element
nameThe
- name of the attribute to create or alter.valueValue
- to set in string form.DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an
illegal character.
public void removeAttribute(java.lang.String name) throws DOMException
Element.removeAttribute(String)
.removeAttribute
in interface Element
org.w3c.dom.Element
nameThe
- name of the attribute to remove.DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.public Attr getAttributeNode(java.lang.String name)
Element.getAttributeNode(String)
.getAttributeNode
in interface Element
org.w3c.dom.Element
nameThe
- name (nodeName
) of the attribute to
retrieve.Attr
node with the specified name (
nodeName
) or null
if there is no such
attribute.public Attr setAttributeNode(Attr newAttr) throws DOMException
Element.setAttributeNode(Attr)
.setAttributeNode
in interface Element
org.w3c.dom.Element
newAttrThe
- Attr
node to add to the attribute list.newAttr
attribute replaces an existing
attribute, the replaced Attr
node is returned,
otherwise null
is returned.DOMException
- WRONG_DOCUMENT_ERR: Raised if newAttr
was created from a
different document than the one that created the element.
newAttr
is already an
attribute of another Element
object. The DOM user must
explicitly clone Attr
nodes to re-use them in other
elements.public Attr removeAttributeNode(Attr oldAttr) throws DOMException
Element.removeAttributeNode(Attr)
.removeAttributeNode
in interface Element
org.w3c.dom.Element
oldAttrThe
- Attr
node to remove from the attribute
list.Attr
node that was removed.DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
oldAttr
is not an attribute
of the element.public NodeList getElementsByTagName(java.lang.String name)
Element.getElementsByTagName(String)
.getElementsByTagName
in interface Element
org.w3c.dom.Element
nameThe
- name of the tag to match on. The special value "*"
matches all tags.Element
nodes.public boolean hasAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
Element.hasAttributeNS(String,String)
.hasAttributeNS
in interface Element
org.w3c.dom.Element
namespaceURIThe
- namespace URI of the attribute to look for.localNameThe
- local name of the attribute to look for.true
if an attribute with the given local name
and namespace URI is specified or has a default value on this
element, false
otherwise.public java.lang.String getAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
Element.getAttributeNS(String,String)
.getAttributeNS
in interface Element
org.w3c.dom.Element
namespaceURIThe
- namespace URI of the attribute to retrieve.localNameThe
- local name of the attribute to retrieve.Attr
value as a string, or the empty string
if that attribute does not have a specified or default value.public void setAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName, java.lang.String value) throws DOMException
Element.setAttributeNS(String,String,String)
.setAttributeNS
in interface Element
org.w3c.dom.Element
namespaceURIThe
- namespace URI of the attribute to create or
alter.qualifiedNameThe
- qualified name of the attribute to create or
alter.valueThe
- value to set in string form.DOMException
- INVALID_CHARACTER_ERR: Raised if the specified qualified name
contains an illegal character.
qualifiedName
is
malformed, if the qualifiedName
has a prefix and the
namespaceURI
is null
, if the
qualifiedName
has a prefix that is "xml" and the
namespaceURI
is different from "
http://www.w3.org/XML/1998/namespace", or if the
qualifiedName
is "xmlns" and the
namespaceURI
is different from "
http://www.w3.org/2000/xmlns/".public void removeAttributeNS(java.lang.String namespaceURI, java.lang.String localName) throws DOMException
Element.removeAttributeNS(String,String)
.removeAttributeNS
in interface Element
org.w3c.dom.Element
namespaceURIThe
- namespace URI of the attribute to remove.localNameThe
- local name of the attribute to remove.DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.public Attr getAttributeNodeNS(java.lang.String namespaceURI, java.lang.String localName)
Element.getAttributeNodeNS(String,String)
.getAttributeNodeNS
in interface Element
org.w3c.dom.Element
namespaceURIThe
- namespace URI of the attribute to retrieve.localNameThe
- local name of the attribute to retrieve.Attr
node with the specified attribute local
name and namespace URI or null
if there is no such
attribute.public Attr setAttributeNodeNS(Attr newAttr) throws DOMException
Element.setAttributeNodeNS(Attr)
.setAttributeNodeNS
in interface Element
org.w3c.dom.Element
newAttrThe
- Attr
node to add to the attribute list.newAttr
attribute replaces an existing
attribute with the same local name and namespace URI, the replaced
Attr
node is returned, otherwise null
is
returned.DOMException
- WRONG_DOCUMENT_ERR: Raised if newAttr
was created from a
different document than the one that created the element.
newAttr
is already an
attribute of another Element
object. The DOM user must
explicitly clone Attr
nodes to re-use them in other
elements.public NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
Element.getElementsByTagNameNS(String,String)
.getElementsByTagNameNS
in interface Element
org.w3c.dom.Element
namespaceURIThe
- namespace URI of the elements to match on. The
special value "*" matches all namespaces.localNameThe
- local name of the elements to match on. The
special value "*" matches all local names.NodeList
object containing all the matched
Elements
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |