public class OMAttributeImpl extends Object implements OMAttribute
| Constructor and Description |
|---|
OMAttributeImpl(String localName,
OMNamespace ns,
String value,
OMFactory factory)
Constructor OMAttributeImpl.
|
| Modifier and Type | Method and Description |
|---|---|
OMInformationItem |
clone(OMCloneOptions options)
Clone this information item.
|
boolean |
equals(Object obj)
Checks for the equality of two
OMAttribute instances. |
String |
getAttributeType()
Get the attribute type.
|
String |
getAttributeValue()
Get the attribute value.
|
String |
getLocalName()
Method getLocalName.
|
OMNamespace |
getNamespace()
Method getNamespace.
|
String |
getNamespaceURI()
Get the namespace URI of this information item.
|
OMFactory |
getOMFactory()
Get the
OMFactory that created this information item. |
OMElement |
getOwner()
Returns the owner element of this attribute
|
String |
getPrefix()
Get the prefix of this information item.
|
QName |
getQName()
Get the QName of this information item.
|
int |
hashCode() |
void |
setAttributeType(String type)
Method setAttributeType.
|
void |
setAttributeValue(String value)
Method setAttributeValue.
|
void |
setLocalName(String localName)
Method setLocalName.
|
void |
setOMNamespace(OMNamespace omNamespace)
Method setOMNamespace.
|
protected OMElement owner
public OMAttributeImpl(String localName, OMNamespace ns, String value, OMFactory factory)
localName - ns - value - public QName getQName()
OMNamedInformationItemgetQName in interface OMNamedInformationItempublic String getLocalName()
getLocalName in interface OMNamedInformationItempublic void setLocalName(String localName)
setLocalName in interface OMNamedInformationItemlocalName - public String getAttributeValue()
OMAttributegetAttributeValue in interface OMAttributenull
public void setAttributeValue(String value)
setAttributeValue in interface OMAttributevalue - public String getAttributeType()
OMAttributeCDATA.getAttributeType in interface OMAttributepublic void setAttributeType(String type)
setAttributeType in interface OMAttributetype - public void setOMNamespace(OMNamespace omNamespace)
setOMNamespace in interface OMAttributeomNamespace - public OMNamespace getNamespace()
getNamespace in interface OMNamedInformationItempublic String getPrefix()
OMNamedInformationItemNode.getPrefix() (when called on an Element
or Attr).getPrefix in interface OMNamedInformationItemnull if the information item has
no prefixpublic String getNamespaceURI()
OMNamedInformationItemNode.getNamespaceURI() (when called on an
Element or Attr).getNamespaceURI in interface OMNamedInformationItemnull if the information
item has no namespacepublic OMFactory getOMFactory()
OMInformationItemOMFactory that created this information item.getOMFactory in interface OMInformationItempublic OMElement getOwner()
OMAttributegetOwner in interface OMAttributepublic boolean equals(Object obj)
OMAttribute instances. Thus the object to compare
this with may be an instance of OMAttributeImpl (an instance of this class) or
an instance of AttrImpl. The method returns false for any object of type other
than OMAttribute.
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.
Note: We ignore the owner when checking for the equality. This is simply because the owner is
introduced just to keep things simple for the programmer and not as part of an attribute itself.
public OMInformationItem clone(OMCloneOptions options)
OMInformationItemclone in interface OMInformationItemoptions - the options to use when cloning this element and its descendants; for object
models with domain specific extensions (such as SOAP), this may be a subclass of
OMCloneOptionsCopyright © 2004–2024 The Apache Software Foundation. All rights reserved.