Agent System POND 1.2 (28.2.2002)

FIM.Util.XML
Interface XMLEncodeable

All Known Subinterfaces:
Invoice, Payment
All Known Implementing Classes:
Currency, InvoiceItem, Price, XMLString, XMLByteArray

public interface XMLEncodeable

Represents a data element, which can be both serialized and retrieved encoded as an XML-element. Deserialization is always possible, but for the XML-encoded form a special method has to be implemented, which recreates the data from en XML-element.

Version:
1.0
Author:
Michael Sonntag

Method Summary
 void decodeXMLElement(Element elem)
          Parse back the data from an XML element.
 Serializable getAsSerializable()
          Retrieve the data as a serializable.
 Element getAsXMLElement(Document doc)
          Retrieve the data as an XML element.
 String toString()
          Retrieve a string representation of the object.
 

Method Detail

getAsSerializable

public Serializable getAsSerializable()
Retrieve the data as a serializable.
Returns:
the data as a serializable

getAsXMLElement

public Element getAsXMLElement(Document doc)
Retrieve the data as an XML element.
Parameters:
doc - the document within which to create the element
Returns:
the data as an element

decodeXMLElement

public void decodeXMLElement(Element elem)
                      throws IllegalArgumentException
Parse back the data from an XML element.
Parameters:
elem - the element containing the data to parse back
Throws:
IllegalArgumentException - if the element is incorrect (e. g. wrong tag name)

toString

public String toString()
Retrieve a string representation of the object.
Overrides:
toString in class Object
Returns:
a string representation of the data

Agent System POND 1.2 (28.2.2002)

Submit a bug

Copyright 2001,2002 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.