gov.nih.nci.cagrid.fqp.common
Class SerializationUtils

java.lang.Object
  extended by gov.nih.nci.cagrid.fqp.common.SerializationUtils

public class SerializationUtils
extends java.lang.Object

Author:
oster

Constructor Summary
SerializationUtils()
           
 
Method Summary
static CQLQuery deserializeCQLQuery(java.io.InputStream xmlStream)
          Create an instance of CQLQuery from the specified inputstream.
static DCQLQuery deserializeDCQLQuery(java.io.InputStream xmlStream)
          Create an instance of DCQLQuery from the specified inputstream.
static void serializeCQLQuery(CQLQuery cqlQuery, java.io.Writer writer)
          Write the XML representation of the specified metadata to the specified writer.
static void serializeDCQLQuery(DCQLQuery dcqlQuery, java.io.Writer writer)
          Write the XML representation of the specified metadata to the specified writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializationUtils

public SerializationUtils()
Method Detail

serializeCQLQuery

public static void serializeCQLQuery(CQLQuery cqlQuery,
                                     java.io.Writer writer)
                              throws java.lang.Exception
Write the XML representation of the specified metadata to the specified writer. If either are null, an IllegalArgumentException will be thown.

Parameters:
cqlQuery -
writer -
Throws:
java.lang.Exception

deserializeCQLQuery

public static CQLQuery deserializeCQLQuery(java.io.InputStream xmlStream)
                                    throws java.lang.Exception
Create an instance of CQLQuery from the specified inputstream. The stream must contains an XML representation of the CQLQuery. If the reader is null, an IllegalArgumentException will be thown.

Parameters:
xmlStream -
Returns:
an instance of CQLQuery from the specified inputstream.
Throws:
java.lang.Exception - on null argument or deserialization failure

serializeDCQLQuery

public static void serializeDCQLQuery(DCQLQuery dcqlQuery,
                                      java.io.Writer writer)
                               throws java.lang.Exception
Write the XML representation of the specified metadata to the specified writer. If either are null, an IllegalArgumentException will be thown.

Parameters:
dcqlQuery -
writer -
Throws:
java.lang.Exception

deserializeDCQLQuery

public static DCQLQuery deserializeDCQLQuery(java.io.InputStream xmlStream)
                                      throws java.lang.Exception
Create an instance of DCQLQuery from the specified inputstream. The stream must contains an XML representation of the DCQLQuery. If the reader is null, an IllegalArgumentException will be thown.

Parameters:
xmlStream -
Returns:
an instance of DCQLQuery from the specified inputstream.
Throws:
java.lang.Exception - on null argument or deserialization failure