org.ws4d.java.types
Class StringAttributeValue

java.lang.Object
  extended by org.ws4d.java.types.StringAttributeValue
All Implemented Interfaces:
CustomAttributeValue

public class StringAttributeValue
extends java.lang.Object
implements CustomAttributeValue

Custom attribute value representation as a plain string.


Constructor Summary
StringAttributeValue(java.lang.String value)
           
 
Method Summary
 HashMap getNamespaces()
          Returns the namespaces used within this attribute value.
 java.lang.Object getValue()
          Returns the value of the attribute.
 void serialize(org.xmlpull.v1.XmlSerializer serializer, QName attributeName)
          Serializes this attribute value using the provided XmlSerializer.
 void setValue(java.lang.String value)
          Sets the value.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringAttributeValue

public StringAttributeValue(java.lang.String value)
Parameters:
value -
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getNamespaces

public HashMap getNamespaces()
Description copied from interface: CustomAttributeValue
Returns the namespaces used within this attribute value. These namespaces should be declared appropriately on an enclosing element. Each namespace is stored as String key within the hash map. The corresponding value is a recommended prefix (as String) for this namespace. It will be declared for use with that namespace, if it is available within the scope of this attribute (i.e. not associated with a different namespace).

Specified by:
getNamespaces in interface CustomAttributeValue
Returns:
the namespaces used within this attribute

getValue

public java.lang.Object getValue()
Description copied from interface: CustomAttributeValue
Returns the value of the attribute.

Specified by:
getValue in interface CustomAttributeValue
Returns:
this attribute's value

setValue

public void setValue(java.lang.String value)
Sets the value.

Parameters:
value - the new value

serialize

public void serialize(org.xmlpull.v1.XmlSerializer serializer,
                      QName attributeName)
               throws java.io.IOException
Description copied from interface: CustomAttributeValue
Serializes this attribute value using the provided XmlSerializer. The value is assigned to an attribute with the specified qualified name attributeName.

Specified by:
serialize in interface CustomAttributeValue
Parameters:
serializer - the serializer to write the attribute value to
attributeName - the name of the attribute to assign this attribute value to
Throws:
java.io.IOException - if an error occurs during writing to the serializer