|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.axiom.om.impl.dom.NodeImpl
org.apache.axiom.om.impl.dom.AttrImpl
public class AttrImpl
Implementation of org.w3c.dom.Attr and org.apache.axiom.om.OMAttribute
| Field Summary | |
|---|---|
protected boolean |
isId
Flag used to mark an attribute as per the DOM Level 3 specification |
| Fields inherited from class org.apache.axiom.om.impl.dom.NodeImpl |
|---|
builder, done, factory, FIRSTCHILD, flags, HAS_PARENT, SPECIFIED |
| Fields inherited from interface org.w3c.dom.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 | |
|---|---|
protected |
AttrImpl(DocumentImpl ownerDocument,
OMFactory factory)
|
|
AttrImpl(DocumentImpl ownerDocument,
java.lang.String name,
OMFactory factory)
|
|
AttrImpl(DocumentImpl ownerDocument,
java.lang.String localName,
OMNamespace namespace,
OMFactory factory)
|
|
AttrImpl(DocumentImpl ownerDocument,
java.lang.String localName,
OMNamespace ns,
java.lang.String value,
OMFactory factory)
|
|
AttrImpl(DocumentImpl ownerDocument,
java.lang.String name,
java.lang.String value,
OMFactory factory)
|
| Method Summary | |
|---|---|
org.w3c.dom.Node |
cloneNode(boolean deep)
|
boolean |
equals(java.lang.Object obj)
An instance of AttrImpl can act as an OMAttribute and as well as an
org.w3c.dom.Attr. |
java.lang.String |
getAttributeType()
Returns the attribute value. |
java.lang.String |
getAttributeValue()
Returns the attribute value. |
java.lang.String |
getLocalName()
Returns the attribute name. |
java.lang.String |
getName()
|
OMNamespace |
getNamespace()
Returns the namespace of the attribute as an OMNamespace. |
java.lang.String |
getNamespaceURI()
Returns the namespace URI of this attr node. |
java.lang.String |
getNodeName()
Returns the name of this attribute. |
short |
getNodeType()
Returns the node type. |
java.lang.String |
getNodeValue()
Returns the value of this attribute. |
OMElement |
getOwner()
Returns the owner element of this attribute |
org.w3c.dom.Document |
getOwnerDocument()
|
org.w3c.dom.Element |
getOwnerElement()
Returns the owner element. |
org.w3c.dom.Node |
getParentNode()
|
java.lang.String |
getPrefix()
Returns the namespace prefix of this attr node. |
javax.xml.namespace.QName |
getQName()
Returns a qname representing the attribute. |
org.w3c.dom.TypeInfo |
getSchemaTypeInfo()
|
boolean |
getSpecified()
|
java.lang.String |
getValue()
Returns the value of this attribute. |
int |
hashCode()
|
void |
internalSetNamespace(OMNamespace namespace)
Set the namespace of the node without adding a corresponding namespace declaration. |
boolean |
isId()
|
protected boolean |
isUsed()
|
void |
setAttributeType(java.lang.String attrType)
Sets the attribute value. |
void |
setAttributeValue(java.lang.String value)
Sets the attribute value. |
void |
setLocalName(java.lang.String localName)
Sets the name of attribute. |
void |
setOMNamespace(OMNamespace omNamespace)
Sets the namespace of this attribute node. |
void |
setPrefix(java.lang.String prefix)
|
protected void |
setUsed(boolean used)
|
void |
setValue(java.lang.String value)
Sets the value of the attribute. |
java.lang.String |
toString()
|
| Methods inherited from class org.apache.axiom.om.impl.dom.NodeImpl |
|---|
appendChild, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLength, getNextSibling, getOMFactory, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setTextContent, setUserData |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.axiom.om.OMInformationItem |
|---|
getOMFactory |
| Methods inherited from interface org.w3c.dom.Node |
|---|
appendChild, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getNextSibling, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setTextContent, setUserData |
| Methods inherited from interface org.apache.axiom.om.OMInformationItem |
|---|
getOMFactory |
| Field Detail |
|---|
protected boolean isId
| Constructor Detail |
|---|
protected AttrImpl(DocumentImpl ownerDocument,
OMFactory factory)
public AttrImpl(DocumentImpl ownerDocument,
java.lang.String localName,
OMNamespace ns,
java.lang.String value,
OMFactory factory)
public AttrImpl(DocumentImpl ownerDocument,
java.lang.String name,
java.lang.String value,
OMFactory factory)
public AttrImpl(DocumentImpl ownerDocument,
java.lang.String name,
OMFactory factory)
public AttrImpl(DocumentImpl ownerDocument,
java.lang.String localName,
OMNamespace namespace,
OMFactory factory)
| Method Detail |
|---|
public java.lang.String getNodeName()
getNodeName in interface org.w3c.dom.Nodepublic short getNodeType()
getNodeType in interface org.w3c.dom.NodeNode.getNodeType()
public java.lang.String getNodeValue()
throws org.w3c.dom.DOMException
getNodeValue in interface org.w3c.dom.NodegetNodeValue in class NodeImplorg.w3c.dom.DOMExceptionNode.getNodeValue()public java.lang.String getValue()
getValue in interface org.w3c.dom.AttrAttr.getValue()public java.lang.String getName()
getName in interface org.w3c.dom.Attrpublic org.w3c.dom.Element getOwnerElement()
getOwnerElement in interface org.w3c.dom.AttrAttr.getOwnerElement()public boolean getSpecified()
getSpecified in interface org.w3c.dom.Attrpublic OMNamespace getNamespace()
OMNamespace.
getNamespace in interface OMNamedInformationItemOMNamedInformationItem.getNamespace()public javax.xml.namespace.QName getQName()
getQName in interface OMNamedInformationItemOMNamedInformationItem.getQName()public java.lang.String getAttributeValue()
getAttributeValue in interface OMAttributeOMAttribute.getAttributeValue()public java.lang.String getAttributeType()
getAttributeType in interface OMAttributeOMAttribute.getAttributeType()public void setLocalName(java.lang.String localName)
setLocalName in interface OMNamedInformationItemOMNamedInformationItem.setLocalName(String)public void internalSetNamespace(OMNamespace namespace)
public void setOMNamespace(OMNamespace omNamespace)
setOMNamespace in interface OMAttribute(org.apache.axiom.om.OMNamespace)public void setAttributeValue(java.lang.String value)
setAttributeValue in interface OMAttributeOMAttribute.setAttributeValue(String)public void setAttributeType(java.lang.String attrType)
setAttributeType in interface OMAttributeOMAttribute.setAttributeType(String)protected boolean isUsed()
protected void setUsed(boolean used)
used - The used to set.
public void setValue(java.lang.String value)
throws org.w3c.dom.DOMException
setValue in interface org.w3c.dom.Attrorg.w3c.dom.DOMExceptionAttr.setValue(String)public org.w3c.dom.Node getParentNode()
getParentNode in interface org.w3c.dom.Nodepublic java.lang.String getLocalName()
getLocalName in interface OMNamedInformationItemgetLocalName in interface org.w3c.dom.NodegetLocalName in class NodeImplNode.getLocalName()public java.lang.String getNamespaceURI()
getNamespaceURI in interface OMNamedInformationItemgetNamespaceURI in interface org.w3c.dom.NodegetNamespaceURI in class NodeImplNode.getNamespaceURI()public java.lang.String getPrefix()
getPrefix in interface OMNamedInformationItemgetPrefix in interface org.w3c.dom.NodegetPrefix in class NodeImplNode.getPrefix()
public void setPrefix(java.lang.String prefix)
throws org.w3c.dom.DOMException
setPrefix in interface org.w3c.dom.NodesetPrefix in class NodeImplorg.w3c.dom.DOMExceptionpublic org.w3c.dom.Node cloneNode(boolean deep)
cloneNode in interface org.w3c.dom.NodecloneNode in class NodeImplpublic org.w3c.dom.TypeInfo getSchemaTypeInfo()
getSchemaTypeInfo in interface org.w3c.dom.Attrpublic boolean isId()
isId in interface org.w3c.dom.Attrpublic java.lang.String toString()
toString in class java.lang.Objectpublic org.w3c.dom.Document getOwnerDocument()
getOwnerDocument in interface org.w3c.dom.Nodepublic OMElement getOwner()
getOwner in interface OMAttributepublic boolean equals(java.lang.Object obj)
AttrImpl can act as an OMAttribute and as well as an
org.w3c.dom.Attr. So we first check if the object to compare with (obj)
is of type OMAttribute (this includes instances of OMAttributeImpl or
AttrImpl (instances of this class)). If so we check for the equality
of namespaces first (note that if the namespace of this instance is null then for the obj
to be equal its namespace must also be null). This condition solely doesn't determine the equality.
So we check for the equality of names and values (note that the value can also be null in which case
the same argument holds as that for the namespace) of the two instances. If all three conditions are
met then we say the two instances are equal.
If obj is of type org.w3c.dom.Attr then we perform the same equality check
as before. Note that, however, the implementation of the test for equality in this case is little different
than before.
If obj is neither of type OMAttribute nor of type org.w3c.dom.Attr
then we return false.
equals in class java.lang.Objectobj - The object to compare with this instance
public int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||