org.ws4d.java.types
Interface CustomAttributeValue

All Known Implementing Classes:
QNameAttributeValue, StringAttributeValue

public interface CustomAttributeValue

A generic container for the value of a custom attribute. Allows custom serialization of the attribute value. Also, provides namespaces which should be declared in the scope surrounding this attribute 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.
 

Method Detail

getNamespaces

HashMap getNamespaces()
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).

Returns:
the namespaces used within this attribute

getValue

java.lang.Object getValue()
Returns the value of the attribute.

Returns:
this attribute's value

serialize

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

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