Package org.apache.axiom.om.impl.llom
Class OMAttributeImpl
java.lang.Object
org.apache.axiom.om.impl.llom.OMAttributeImpl
- All Implemented Interfaces:
org.apache.axiom.om.OMAttribute
Class OMAttributeImpl
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOMAttributeImpl(String localName, org.apache.axiom.om.OMNamespace ns, String value, org.apache.axiom.om.OMFactory factory) Constructor OMAttributeImpl. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks for the equality of twoOMAttributeinstances.Method getAttributeType.Method getAttributeValue.Method getLocalName.org.apache.axiom.om.OMNamespaceMethod getNamespace.org.apache.axiom.om.OMFactoryorg.apache.axiom.om.OMElementgetOwner()Returns the owner element of this attributegetQName()inthashCode()voidsetAttributeType(String type) Method setAttributeType.voidsetAttributeValue(String value) Method setAttributeValue.voidsetLocalName(String localName) Method setLocalName.voidsetOMNamespace(org.apache.axiom.om.OMNamespace omNamespace) Method setOMNamespace.
-
Field Details
-
owner
protected org.apache.axiom.om.OMElement owner
-
-
Constructor Details
-
Method Details
-
getQName
- Specified by:
getQNamein interfaceorg.apache.axiom.om.OMAttribute- Returns:
- Returns QName.
-
getLocalName
Method getLocalName.- Specified by:
getLocalNamein interfaceorg.apache.axiom.om.OMAttribute- Returns:
- Returns local name.
-
setLocalName
Method setLocalName.- Specified by:
setLocalNamein interfaceorg.apache.axiom.om.OMAttribute- Parameters:
localName-
-
getAttributeValue
Method getAttributeValue.- Specified by:
getAttributeValuein interfaceorg.apache.axiom.om.OMAttribute- Returns:
- Returns value.
-
setAttributeValue
Method setAttributeValue.- Specified by:
setAttributeValuein interfaceorg.apache.axiom.om.OMAttribute- Parameters:
value-
-
getAttributeType
Method getAttributeType.- Specified by:
getAttributeTypein interfaceorg.apache.axiom.om.OMAttribute- Returns:
- Returns type.
-
setAttributeType
Method setAttributeType.- Specified by:
setAttributeTypein interfaceorg.apache.axiom.om.OMAttribute- Parameters:
type-
-
setOMNamespace
public void setOMNamespace(org.apache.axiom.om.OMNamespace omNamespace) Method setOMNamespace.- Specified by:
setOMNamespacein interfaceorg.apache.axiom.om.OMAttribute- Parameters:
omNamespace-
-
getNamespace
public org.apache.axiom.om.OMNamespace getNamespace()Method getNamespace.- Specified by:
getNamespacein interfaceorg.apache.axiom.om.OMAttribute- Returns:
- Returns namespace.
-
getOMFactory
public org.apache.axiom.om.OMFactory getOMFactory()- Specified by:
getOMFactoryin interfaceorg.apache.axiom.om.OMAttribute
-
getOwner
public org.apache.axiom.om.OMElement getOwner()Returns the owner element of this attribute- Specified by:
getOwnerin interfaceorg.apache.axiom.om.OMAttribute- Returns:
- OMElement - the owner element
-
equals
Checks for the equality of twoOMAttributeinstances. Thus the object to compare this with may be an instance ofOMAttributeImpl(an instance of this class) or an instance ofAttrImpl. The method returns false for any object of type other thanOMAttribute.We check for the equality of namespaces first (note that if the namespace of this instance is null then for the
objto 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. -
hashCode
public int hashCode()
-