|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.crimson.tree.NodeBase org.apache.crimson.tree.ParentNode org.apache.crimson.tree.NamespacedNode org.apache.crimson.tree.AttributeNode
Node representing an XML attribute. Many views of attributes can be useful, but only the first of these is explicitly supported:
Nested Class Summary |
Nested classes inherited from class org.apache.crimson.tree.NamespacedNode |
ParentNode.TagList, ParentNode.TagListNS |
Field Summary | |
private String |
defaultValue
|
private org.w3c.dom.Element |
ownerElement
At construction time ownerElement is null, it gets set whenever an attribute is set on an Element |
private boolean |
specified
|
private String |
value
|
Fields inherited from class org.apache.crimson.tree.NamespacedNode |
namespaceURI, ownerDocument, qName, readonly |
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 | |
AttributeNode(String namespaceURI,
String qName,
String value,
boolean specified,
String defaultValue)
Constructs an attribute node. |
Method Summary | |
(package private) static void |
checkArguments(String namespaceURI,
String qualifiedName)
Package private method to check arguments for constructor |
(package private) void |
checkChildType(int type)
|
(package private) AttributeNode |
cloneAttributeNode(boolean deep)
Clone this AttributeNode and possibly its children (which cannot be AttributeNodes themselves). |
org.w3c.dom.Node |
cloneNode(boolean deep)
DOM: returns a copy of this node which is not owned by an Element |
(package private) String |
getDefaultValue()
|
String |
getName()
DOM: Returns the attribute name |
org.w3c.dom.Node |
getNextSibling()
DOM: Returns null |
short |
getNodeType()
DOM: Returns the ATTRIBUTE_NODE node type constant. |
String |
getNodeValue()
DOM: Returns the attribute value. |
org.w3c.dom.Element |
getOwnerElement()
DOM2: |
org.w3c.dom.Node |
getParentNode()
DOM: Returns null |
org.w3c.dom.Node |
getPreviousSibling()
DOM: Returns null |
boolean |
getSpecified()
DOM: Returns true if the source text specified the attribute. |
String |
getValue()
DOM: Returns the attribute value. |
(package private) AttributeNode |
makeClone()
Make a clone of this node and return it. |
void |
setNodeValue(String value)
DOM: Assigns the value of this attribute. |
(package private) void |
setOwnerElement(org.w3c.dom.Element element)
|
(package private) void |
setSpecified(boolean specified)
Flags whether the source text specified the attribute. |
void |
setValue(String value)
DOM: Assigns the value of this attribute. |
void |
writeChildrenXml(XmlWriteContext context)
Writes the attribute's value. |
void |
writeXml(XmlWriteContext context)
Writes the attribute out, as if it were assigned within an element's starting tag (name="value"). |
Methods inherited from class org.apache.crimson.tree.NamespacedNode |
appendChild, getAttributes, getChildNodes, getElementsByTagName, getElementsByTagNameNS, getFirstChild, getIndexOf, getInheritedAttribute, getLanguage, getLastChild, getLength, getLocalName, getMessage, getMessage, getNamespaceURI, getNodeName, getOwnerDocument, getParentImpl, getPrefix, hasAttributes, hasChildNodes, insertBefore, isReadonly, isSupported, item, normalize, reduceWaste, removeChild, removeWhiteSpaces, replaceChild, setOwnerDocument, setParentNode, setPrefix, setReadonly, trimToSize |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
appendChild, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNodeName, getOwnerDocument, getPrefix, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setPrefix |
Field Detail |
private String value
private boolean specified
private String defaultValue
private org.w3c.dom.Element ownerElement
Constructor Detail |
public AttributeNode(String namespaceURI, String qName, String value, boolean specified, String defaultValue) throws org.w3c.dom.DOMException
Method Detail |
AttributeNode makeClone()
static void checkArguments(String namespaceURI, String qualifiedName) throws DomEx
DomEx
String getDefaultValue()
public org.w3c.dom.Element getOwnerElement()
getOwnerElement
in interface org.w3c.dom.Attr
void setOwnerElement(org.w3c.dom.Element element)
public short getNodeType()
getNodeType
in interface org.w3c.dom.Node
public String getName()
getName
in interface org.w3c.dom.Attr
public String getValue()
getValue
in interface org.w3c.dom.Attr
public void setValue(String value)
setValue
in interface org.w3c.dom.Attr
public String getNodeValue()
getNodeValue
in interface org.w3c.dom.Node
getNodeValue
in class NodeBase
public boolean getSpecified()
getSpecified
in interface org.w3c.dom.Attr
public void setNodeValue(String value)
setNodeValue
in interface org.w3c.dom.Node
setNodeValue
in class NodeBase
void setSpecified(boolean specified)
public org.w3c.dom.Node getParentNode()
getParentNode
in interface org.w3c.dom.Node
getParentNode
in class NodeBase
public org.w3c.dom.Node getNextSibling()
getNextSibling
in interface org.w3c.dom.Node
getNextSibling
in class NodeBase
public org.w3c.dom.Node getPreviousSibling()
getPreviousSibling
in interface org.w3c.dom.Node
getPreviousSibling
in class NodeBase
public void writeXml(XmlWriteContext context) throws IOException
writeXml
in interface XmlWritable
IOException
public void writeChildrenXml(XmlWriteContext context) throws IOException
writeChildrenXml
in interface XmlWritable
writeChildrenXml
in class ParentNode
context
- describes how the children should be printed
IOException
public org.w3c.dom.Node cloneNode(boolean deep)
cloneNode
in interface org.w3c.dom.Node
AttributeNode cloneAttributeNode(boolean deep)
void checkChildType(int type) throws org.w3c.dom.DOMException
checkChildType
in class ParentNode
org.w3c.dom.DOMException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |