fipaos.util
Class XMLDataBinding


public class XMLDataBinding


Method Summary
 static Stringmarshall(Object obj)
          Marshalls a Data-Binding compatible object into an XML instance document
 static voidmarshallFile(Object obj, String filename)
          Marshalls a Data-Binding compatible object into an XML instance document and saves the document into a file
 static voidmarshallFile(Object obj, File file)
          Marshalls a Data-Binding compatible object into an XML instance document and saves the document into a file
 static Objectunmarshall(String xml)
          Unmarshalls a string back into a Data-Binding object
 static ObjectunmarshallFile(String filename)
          Unmarshalls an XML document in a file back into a Data-Binding object
 static ObjectunmarshallFile(File file)
          Unmarshalls a file back into a Data-Binding object

Method Detail

marshall

public static String marshall(Object obj)
throws java.io.IOException
Marshalls a Data-Binding compatible object into an XML instance document
Parameters:
obj - The Object to be marshalled
Returns: A String containing the XML instance document

marshallFile

public static void marshallFile(Object obj, String filename)
throws java.io.IOException
Marshalls a Data-Binding compatible object into an XML instance document and saves the document into a file
Parameters:
obj - The Object to be marshalled
filename - The file to save into

marshallFile

public static void marshallFile(Object obj, File file)
throws java.io.IOException
Marshalls a Data-Binding compatible object into an XML instance document and saves the document into a file
Parameters:
obj - The Object to be marshalled
file - The file to save into

unmarshall

public static Object unmarshall(String xml)
throws java.io.IOException,
org.jdom.JDOMException
Unmarshalls a string back into a Data-Binding object
Parameters:
xml - The String to be unmarshalled
Returns: The reconstructed object

unmarshallFile

public static Object unmarshallFile(String filename)
throws java.io.IOException,
org.jdom.JDOMException
Unmarshalls an XML document in a file back into a Data-Binding object
Parameters:
filename - The File to be unmarshalled
Returns: The reconstructed object

unmarshallFile

public static Object unmarshallFile(File file)
throws java.io.IOException,
org.jdom.JDOMException
Unmarshalls a file back into a Data-Binding object
Parameters:
file - The String to be unmarshalled
Returns: The reconstructed object