|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.xml.dom.NodeImpl com.novell.xml.dom.AttrImpl
Implementation of DOM level 1 Attr
interface.
Field Summary |
Fields inherited from class com.novell.xml.dom.NodeImpl |
allowedChildren, baseURI, changeCount, document, documentOrderVal, expandedName, firstChild, lastChild, localName, namespaceURI, nextOrderVal, nextSibling, nodeName, nodeValue, parentNode, prefix, previousSibling, toStringSerializes, xmlnsPrefix, xmlPrefix, xpathBehavior |
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 | |
protected |
AttrImpl(DocumentImpl owner,
String name)
|
protected |
AttrImpl(DocumentImpl owner,
String namespaceURI,
String qualifiedName)
|
Method Summary | |
String |
getBaseURI()
Return the base URI string for this node. |
String |
getName()
Returns the name of this attribute. |
short |
getNodeType()
A code representing the type of the underlying object, as defined above. |
String |
getNodeValue()
The value of this node, depending on its type; see the table above. |
Element |
getOwnerElement()
The Element node this attribute is attached to or
null if this attribute is not in use. |
Node |
getParentNode()
The parent of this node. |
boolean |
getSpecified()
If this attribute was explicitly given a value in the original document, this is true ; otherwise, it is false . |
String |
getValue()
On retrieval, the value of the attribute is returned as a string. |
protected void |
incChangeCount()
Increment the change count so that NodeList implementations can know when things change Note that only structural changes need to inc the change count This overrides NodeImpl |
boolean |
isId()
Return true if this attribute represents an id attribute Non-DOM |
protected boolean |
isInUse()
Return true if this attribute is currently owned by an Element |
void |
setIdType(boolean idType)
Set whether this attribute is an id type or not |
void |
setNodeValue(String nodeValue)
|
protected void |
setOwningElement(Element owningElement)
Set the owning element of this attribute node. |
protected void |
setSpecified(boolean specified)
|
void |
setValue(String value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getOwnerDocument, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setPrefix |
Constructor Detail |
protected AttrImpl(DocumentImpl owner, String name)
protected AttrImpl(DocumentImpl owner, String namespaceURI, String qualifiedName)
Method Detail |
public short getNodeType()
getNodeType
in interface Node
getNodeType
in class NodeImpl
public String getNodeValue() throws DOMException
getNodeValue
in interface Node
getNodeValue
in class NodeImpl
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.public void setNodeValue(String nodeValue) throws DOMException
setNodeValue
in interface Node
setNodeValue
in class NodeImpl
DOMException
public Node getParentNode()
Document
,
DocumentFragment
, and Attr
may have a parent.
However, if a node has just been created and not yet added to the tree,
or if it has been removed from the tree, this is null
.
Note: this implementation may return the owning element as the parent
node if setXpathBehavior(true)
has been called.
getParentNode
in interface Node
getParentNode
in class NodeImpl
public String getName()
getName
in interface Attr
public boolean getSpecified()
true
; otherwise, it is false
. Note
that the implementation is in charge of this attribute, not the user. If
the user changes the value of the attribute (even if it ends up having
the same value as the default value) then the specified
flag is automatically flipped to true
. To re-specify the
attribute as the default value from the DTD, the user must delete the
attribute. The implementation will then make a new attribute available
with specified
set to false
and the default
value (if one exists).
specified
is true
, and the value is the
assigned value. If the attribute has no assigned value in the document
and has a default value in the DTD, then specified
is
false
, and the value is the default value in the DTD. If
the attribute has no assigned value in the document and has a value of
#IMPLIED in the DTD, then the attribute does not appear in the
structure model of the document.
getSpecified
in interface Attr
public String getValue()
Text
node with the unparsed
contents of the string.
getValue
in interface Attr
public void setValue(String value)
setValue
in interface Attr
public Element getOwnerElement()
Element
node this attribute is attached to or
null
if this attribute is not in use.
getOwnerElement
in interface Attr
public boolean isId()
public void setIdType(boolean idType)
idType
- True if this attribute is an id typepublic String getBaseURI()
null
if the base URI
has not been set for any node in this nodes chain of ancestors.
getBaseURI
in class NodeImpl
null
if no base URI
has been set for this node or one of its ancestors.NodeImpl.setBaseURI(java.lang.String)
protected void incChangeCount()
incChangeCount
in class NodeImpl
protected void setOwningElement(Element owningElement)
owningElement
- The element that owns this attributeprotected boolean isInUse()
true
if this attribute is currently owned by an Element
true
if this attribute is owned by an Elementprotected void setSpecified(boolean specified)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |