XFA4J

com.adobe.xfa
Class Attribute

java.lang.Object
  extended by com.adobe.xfa.Attribute
Direct Known Subclasses:
GenericAttribute, StringAttr

public abstract class Attribute
extends java.lang.Object

A common base class to represent XML attributes.


Constructor Summary
Attribute(java.lang.String qName, java.lang.String value)
          Instantiates an attribute, with the given attribute value.
Attribute(java.lang.String NS, java.lang.String localName, java.lang.String qName, java.lang.String value)
          Instantiates an attribute, with the given attribute parameters.
 
Method Summary
 java.lang.String getAttrValue()
          Gets this attribute's value.
 java.lang.String getLocalName()
          Gets this attribute's local name.
 java.lang.String getName()
          Gets this attribute's local name.
 java.lang.String getNS()
          Gets this attribute's namespace.
 java.lang.String getPrefix()
          Gets this attribute's namespace prefix.
 java.lang.String getQName()
          Gets this attribute's qualified name.
 boolean isEmpty()
          Determines if this attribute's value is empty (or null).
 boolean isNameSpaceAttr()
          Determines if this attribute is a name space attribute.
 java.lang.String toString()
          Generates this attribute's value as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Attribute

public Attribute(java.lang.String qName,
                 java.lang.String value)
Instantiates an attribute, with the given attribute value.

Parameters:
qName - the attribute name.
value - the attribute value.

Attribute

public Attribute(java.lang.String NS,
                 java.lang.String localName,
                 java.lang.String qName,
                 java.lang.String value)
Instantiates an attribute, with the given attribute parameters.

Parameters:
NS - the namespace of this attribute.
localName - the local name of this attribute.
qName - the qualified name of this attribute.
value - the value of this attribute.
Method Detail

getAttrValue

public final java.lang.String getAttrValue()
Gets this attribute's value.

Returns:
the attribute value.

getLocalName

public final java.lang.String getLocalName()
Gets this attribute's local name.

Returns:
The local part of the name (everything after the ":")

getName

public final java.lang.String getName()
Gets this attribute's local name.

Returns:
Returns the local name.

getNS

public java.lang.String getNS()
Gets this attribute's namespace.

Returns:
Returns the namespace.

getPrefix

public final java.lang.String getPrefix()
Gets this attribute's namespace prefix.

Returns:
the attribute namespace prefix.

getQName

public final java.lang.String getQName()
Gets this attribute's qualified name.

Returns:
the qualified name.

isEmpty

public final boolean isEmpty()
Determines if this attribute's value is empty (or null).

Returns:
true if this attribute's value is empty and false otherwise.

isNameSpaceAttr

public final boolean isNameSpaceAttr()
Determines if this attribute is a name space attribute.

Returns:
true if this is a name space attribute and false otherwise.

toString

public java.lang.String toString()
Generates this attribute's value as a string.

Overrides:
toString in class java.lang.Object
Returns:
the attribute value.
See Also:
Object.toString()

XFA4J

© 2005 Adobe Systems Incorporated. All Rights Reserved.