gov.nih.nci.system.client.util.xml
Class XMLUtility

java.lang.Object
  extended by gov.nih.nci.system.client.util.xml.XMLUtility

public class XMLUtility
extends java.lang.Object

Class used to convert domain objects to and from XML.


Constructor Summary
XMLUtility(Marshaller marshaller, Unmarshaller unmarshaller)
           
 
Method Summary
 java.lang.Object fromXML(java.io.File xmlFile)
          Instantiates an object from an XML File that contains the serialized output of that object.
 java.lang.Object fromXML(java.io.Reader input)
          Instantiates an object from xml input that contains the serialized output of that object.
 java.lang.String toXML(java.lang.Object beanObject)
          Serializes an object into xml
 void toXML(java.lang.Object beanObject, java.io.Writer stream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLUtility

public XMLUtility(Marshaller marshaller,
                  Unmarshaller unmarshaller)
Method Detail

toXML

public java.lang.String toXML(java.lang.Object beanObject)
                       throws XMLUtilityException
Serializes an object into xml

Parameters:
beanObject - The caCORE object to serialize into xml
Throws:
XMLUtilityException

toXML

public void toXML(java.lang.Object beanObject,
                  java.io.Writer stream)
           throws XMLUtilityException
Throws:
XMLUtilityException

fromXML

public java.lang.Object fromXML(java.io.File xmlFile)
                         throws XMLUtilityException
Instantiates an object from an XML File that contains the serialized output of that object.

Parameters:
xmlFile -
Returns:
Throws:
XMLUtilityException

fromXML

public java.lang.Object fromXML(java.io.Reader input)
                         throws XMLUtilityException
Instantiates an object from xml input that contains the serialized output of that object.

Parameters:
input - Reader type
Returns:
Instantiated object
Throws:
XMLUtilityException