public class IlvSettingsAttribute extends IlvSettingsNode implements Attr, Comparable<Object>
IlvSettings
ATTRIBUTE_NODE, ELEMENT_NODE, ROOT_ELEMENT_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
Modifier and Type | Method and Description |
---|---|
Node |
appendChild(Node newChild)
Adds the node
newChild to the end of the list of children of
this node. |
Node |
cloneNode(boolean deep)
Returns a duplicate of this node, i.e., serves as a generic copy
constructor for nodes.
|
short |
compareDocumentPosition(Node other) |
int |
compareTo(Object o)
Compares this object with the specified object for order.
|
NamedNodeMap |
getAttributes()
A
NamedNodeMap containing the attributes of this node. |
String |
getBaseURI() |
NodeList |
getChildNodes()
A
NodeList that contains all children of this node. |
Object |
getFeature(String feature,
String version) |
Node |
getFirstChild()
Returns the first child of this node.
|
Node |
getLastChild()
The last child of this node.
|
String |
getLocalName()
Returns the local part of the qualified name of this node.
|
String |
getName()
Returns the name of the attribute.
|
String |
getNamespaceURI()
The namespace URI of this node, or
null if it is
unspecified. |
Node |
getNextSibling()
The node immediately following this node.
|
String |
getNodeName()
The name of the attribute given by the method
getName() . |
short |
getNodeType()
Returns
IlvSettingsNode.ATTRIBUTE_NODE to specify that this node is an attribute node. |
String |
getNodeValue()
The value of this attribute.
|
Object |
getObjectValue()
Returns the object value of this attribute.
|
Document |
getOwnerDocument()
The
Document object associated with this node. |
Element |
getOwnerElement()
Returns the DOM element that contains this attribute.
|
String |
getPrefix()
The namespace prefix of this node, or
null if it is
unspecified. |
Node |
getPreviousSibling()
The node immediately preceding this node.
|
TypeInfo |
getSchemaTypeInfo() |
boolean |
getSpecified()
If this attribute was explicitly given a value in the original document,
this is
true ; otherwise, it is false . |
String |
getString()
Returns the string value of this settings attribute.
|
String |
getTextContent() |
Object |
getUserData(String key) |
String |
getValue()
On retrieval, the value of the attribute is returned as a string.
|
boolean |
hasAttributes()
Returns whether this node (if it is an element) has any attributes.
|
boolean |
hasChildNodes()
This is a convenience method to allow easy determination of whether a
node has any children.
|
Node |
insertBefore(Node newChild,
Node refChild)
Inserts the node
newChild before the existing child node
refChild . |
boolean |
isDefaultNamespace(String namespaceURI) |
boolean |
isEqualNode(Node arg) |
boolean |
isId() |
boolean |
isSameNode(Node other) |
boolean |
isSupported(String feature,
String version)
Tests whether the DOM implementation implements a specific feature and
that feature is supported by this node.
|
String |
lookupNamespaceURI(String prefix) |
String |
lookupPrefix(String namespaceURI) |
boolean |
matchType(String name)
Determines whether the name of the attribute matches the specified name.
|
void |
normalize()
The implementation of this method is empty as attributes do not have
child node.
|
Node |
removeChild(Node oldChild)
Removes the child node indicated by
oldChild from the list
of children, and returns it. |
Node |
replaceChild(Node newChild,
Node oldChild)
Replaces the child node
oldChild with newChild
in the list of children, and returns the oldChild node. |
void |
setNodeValue(String nodeValue)
Sets the value of this attribute to the specified
nodeValue . |
void |
setPrefix(String prefix)
Sets the prefix of the attribute.
|
void |
setString(String value)
Sets a string value to this settings attribute.
|
void |
setTextContent(String textContent) |
Object |
setUserData(String key,
Object data,
UserDataHandler handler) |
void |
setValue(Object value)
Sets the specified object value to this settings attribute.
|
void |
setValue(String value)
Sets the value of this attribute.
|
getParent, getParentNode, getSettings
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParentNode
public String getBaseURI()
getBaseURI
in interface Node
getBaseURI
in class IlvSettingsNode
public short compareDocumentPosition(Node other) throws DOMException
compareDocumentPosition
in interface Node
compareDocumentPosition
in class IlvSettingsNode
DOMException
public String getTextContent() throws DOMException
getTextContent
in interface Node
getTextContent
in class IlvSettingsNode
DOMException
public void setTextContent(String textContent) throws DOMException
setTextContent
in interface Node
setTextContent
in class IlvSettingsNode
DOMException
public boolean isSameNode(Node other)
isSameNode
in interface Node
isSameNode
in class IlvSettingsNode
public String lookupPrefix(String namespaceURI)
lookupPrefix
in interface Node
lookupPrefix
in class IlvSettingsNode
public boolean isDefaultNamespace(String namespaceURI)
isDefaultNamespace
in interface Node
isDefaultNamespace
in class IlvSettingsNode
public String lookupNamespaceURI(String prefix)
lookupNamespaceURI
in interface Node
lookupNamespaceURI
in class IlvSettingsNode
public boolean isEqualNode(Node arg)
isEqualNode
in interface Node
isEqualNode
in class IlvSettingsNode
public Object getFeature(String feature, String version)
getFeature
in interface Node
getFeature
in class IlvSettingsNode
public Object setUserData(String key, Object data, UserDataHandler handler)
setUserData
in interface Node
setUserData
in class IlvSettingsNode
public Object getUserData(String key)
getUserData
in interface Node
getUserData
in class IlvSettingsNode
public TypeInfo getSchemaTypeInfo()
getSchemaTypeInfo
in interface Attr
public short getNodeType()
IlvSettingsNode.ATTRIBUTE_NODE
to specify that this node is an attribute node.getNodeType
in interface Node
getNodeType
in class IlvSettingsNode
public String getName()
public void setString(String value)
value
- The new value of this attributegetString()
public String getString()
setString(java.lang.String)
public Object getObjectValue()
setValue(java.lang.Object)
public void setValue(Object value)
value
- The new value of this attribute.getValue()
public boolean matchType(String name)
matchType
in class IlvSettingsNode
name
- The name to compare.true
if names are equal or if the specified name
is equal to null
or "*"
; false
otherwise.public int compareTo(Object o)
compareTo
in interface Comparable<Object>
o
- The object to be compared.ClassCastException
- if the type of the specified object prevents it
from being compared with this Object.public String getNodeName()
getName()
.getNodeName
in interface Node
public String getNodeValue() throws DOMException
getNodeValue
in interface Node
DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.DOMException
- DOMSTRING_SIZE_ERR: Raised when it would return more characters than
fit in a DOMString
variable on the implementation
platform.setNodeValue(java.lang.String)
public void setNodeValue(String nodeValue) throws DOMException
nodeValue
.
This method has the same behavior than setString(java.lang.String)
.setNodeValue
in interface Node
nodeValue
- The new value of this attribute.DOMException
public NodeList getChildNodes()
NodeList
that contains all children of this node.
As attributes do not have child nodes, this method returns an
empty node list.getChildNodes
in interface Node
public Node getFirstChild()
getFirstChild
in interface Node
null
as attributes do not have child nodes.public Node getLastChild()
getLastChild
in interface Node
null
as attributes do not have child nodes.public Node getPreviousSibling()
null
.getPreviousSibling
in interface Node
public Node getNextSibling()
null
.getNextSibling
in interface Node
public NamedNodeMap getAttributes()
NamedNodeMap
containing the attributes of this node.getAttributes
in interface Node
null
as attributes do not have attributes.public Document getOwnerDocument()
Document
object associated with this node. This is also
the Document
object used to create new nodes.getOwnerDocument
in interface Node
public void normalize()
Node.normalize()
for more details on the
behavior of this method.public Node insertBefore(Node newChild, Node refChild) throws DOMException
newChild
before the existing child node
refChild
.insertBefore
in interface Node
newChild
- The node to insert.refChild
- The reference node, i.e., the node before which the new
node must be inserted.DOMException
- HIERARCHY_REQUEST_ERR: Always raised as attribute nodes
cannot be added child nodes.public Node replaceChild(Node newChild, Node oldChild) throws DOMException
oldChild
with newChild
in the list of children, and returns the oldChild
node. If
the newChild
is already in the tree, it is first removed.replaceChild
in interface Node
newChild
- The new node to put in the child list.oldChild
- The node being replaced in the list.DOMException
- HIERARCHY_REQUEST_ERR: Always raised as attribute nodes
cannot be added child nodes.public Node removeChild(Node oldChild) throws DOMException
oldChild
from the list
of children, and returns it.removeChild
in interface Node
oldChild
- The node being removed.DOMException
- HIERARCHY_REQUEST_ERR: Always raised as attribute nodes
cannot be added child nodes.public Node appendChild(Node newChild) throws DOMException
newChild
to the end of the list of children of
this node. If the newChild
is already in the tree, it is
first removed.appendChild
in interface Node
newChild
- The node to add.If it is a DocumentFragment
object, the entire contents of the document fragment are moved into
the child list of this nodeDOMException
- HIERARCHY_REQUEST_ERR: Always raised as attribute nodes
cannot be added child nodes.public boolean hasChildNodes()
hasChildNodes
in interface Node
false
as attributes cannot be added child nodes.public Node cloneNode(boolean deep)
parentNode
returns null
.).
Element
copies all attributes and their
values, including those generated by the XML processor to represent
defaulted attributes, but this method does not copy any text it contains
unless it is a deep clone, since the text is contained in a child
Text
node. Cloning any other type of node simply returns a
copy of this node.public boolean getSpecified()
true
; otherwise, it is false
.
Attr.getSpecified()
for more details on the
behavior of this method.getSpecified
in interface Attr
public String getValue()
Text
node with the unparsed
contents of the string.
The implementation of this method returns the value given by
the call to getString()
.getValue
in interface Attr
setValue(java.lang.Object)
public void setValue(String value)
setString(java.lang.String)
.setValue
in interface Attr
value
- The new value of the attribute.getValue()
public Element getOwnerElement()
getOwnerElement
in interface Attr
public boolean isSupported(String feature, String version)
isSupported
in interface Node
feature
- The name of the feature to test. This is the same name
which can be passed to the method hasFeature
on
DOMImplementation
.version
- This is the version number of the feature to test. In
Level 2, version 1, this is the string "2.0". If the version is not
specified, supporting any version of the feature will cause the
method to return true
.true
if the specified feature is
supported on this node, false
otherwise.public String getNamespaceURI()
null
if it is
unspecified.
Node.getNamespaceURI()
for more details on the
behavior of this method.getNamespaceURI
in interface Node
public String getPrefix()
null
if it is
unspecified.
Node.getPrefix()
for more details on the
behavior of this method.getPrefix
in interface Node
DOMException
- INVALID_CHARACTER_ERR: Raised if the specified prefix contains an
illegal character.
prefix
is
malformed, if the namespaceURI
of this node is
null
, if the specified prefix is "xml" and the
namespaceURI
of this node is different from "
http://www.w3.org/XML/1998/namespace", if this node is an attribute
and the specified prefix is "xmlns" and the
namespaceURI
of this node is different from "
http://www.w3.org/2000/xmlns/", or if this node is an attribute and
the qualifiedName
of this node is "xmlns" .setPrefix(java.lang.String)
public void setPrefix(String prefix) throws DOMException
setPrefix
in interface Node
prefix
- The prefix.DOMException
getPrefix()
public String getLocalName()
ELEMENT_NODE
and
ATTRIBUTE_NODE
and nodes created with a DOM Level 1
method, such as createElement
from the
Document
interface, this is always null
.getLocalName
in interface Node
public boolean hasAttributes()
hasAttributes
in interface Node
false
as attributes do not have attributes.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.