org.fosstrak.ale.util
Class SerializerUtil

java.lang.Object
  extended by org.fosstrak.ale.util.SerializerUtil

public class SerializerUtil
extends java.lang.Object

This class provides some methods to serialize ec specifications and reports.

Author:
regli, sawielan

Constructor Summary
SerializerUtil()
           
 
Method Summary
static void serializeAddReaders(org.fosstrak.ale.wsdl.alelr.epcglobal.AddReaders readers, java.lang.String pathName)
          Serializes an AddReaders to xml and stores this xml into a file.
static void serializeECReports(org.fosstrak.ale.xsd.ale.epcglobal.ECReports ecReports, java.io.Writer writer)
          This method serializes ec reports to an xml and writes it into a writer.
static void serializeECReportsPretty(org.fosstrak.ale.xsd.ale.epcglobal.ECReports ecReports, java.io.Writer writer)
          This method serializes ec reports to a well formed xml and writes it into a writer.
static void serializeECSpec(org.fosstrak.ale.xsd.ale.epcglobal.ECSpec ecSpec, java.io.FileOutputStream writer)
          This method serializes an ec specification to an xml and writes it into a writer.
static void serializeECSpec(org.fosstrak.ale.xsd.ale.epcglobal.ECSpec ecSpec, java.io.Writer writer)
          This method serializes en ECSpec to an xml and writes it into a writer.
static void serializeECSpecPretty(org.fosstrak.ale.xsd.ale.epcglobal.ECSpec ecSpec, java.io.FileOutputStream writer)
          This method serializes an ec specification to a well formed xml and writes it into a writer.
static void serializeLRSpec(org.fosstrak.ale.xsd.ale.epcglobal.LRSpec spec, java.lang.String pathName, boolean pretty)
          This method serializes an LRSpec to an xml and writes it into a file.
static void serializeLRSpec(org.fosstrak.ale.xsd.ale.epcglobal.LRSpec spec, java.io.Writer writer)
          This method serializes an LRSpec to an xml and writes it into a file.
static void serializeRemoveReaders(org.fosstrak.ale.wsdl.alelr.epcglobal.RemoveReaders readers, java.lang.String pathName)
          Serializes a RemoveReaders to xml and stores this xml into a file.
static void serializeSetProperties(org.fosstrak.ale.wsdl.alelr.epcglobal.SetProperties props, java.lang.String pathName)
          Serializes an SetProperties to xml and stores this xml into a file.
static void serializeSetReaders(org.fosstrak.ale.wsdl.alelr.epcglobal.SetReaders readers, java.lang.String pathName)
          Serializes a SetReaders to xml and stores this xml into a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializerUtil

public SerializerUtil()
Method Detail

serializeECSpec

public static void serializeECSpec(org.fosstrak.ale.xsd.ale.epcglobal.ECSpec ecSpec,
                                   java.io.FileOutputStream writer)
                            throws java.io.IOException
This method serializes an ec specification to an xml and writes it into a writer.

Parameters:
ecSpec - to serialize
writer - containing the xml
Throws:
java.io.IOException - if serialization fails

serializeECSpecPretty

public static void serializeECSpecPretty(org.fosstrak.ale.xsd.ale.epcglobal.ECSpec ecSpec,
                                         java.io.FileOutputStream writer)
                                  throws java.io.IOException
This method serializes an ec specification to a well formed xml and writes it into a writer.

Parameters:
ecSpec - to serialize
writer - to write the well formed xml into
Throws:
java.io.IOException - if serialization fails

serializeECReports

public static void serializeECReports(org.fosstrak.ale.xsd.ale.epcglobal.ECReports ecReports,
                                      java.io.Writer writer)
                               throws java.io.IOException
This method serializes ec reports to an xml and writes it into a writer.

Parameters:
ecReports - to serialize
writer - to write the xml into
Throws:
java.io.IOException - if serialization fails

serializeECReportsPretty

public static void serializeECReportsPretty(org.fosstrak.ale.xsd.ale.epcglobal.ECReports ecReports,
                                            java.io.Writer writer)
                                     throws java.io.IOException
This method serializes ec reports to a well formed xml and writes it into a writer.

Parameters:
ecReports - to serialize
writer - to write the well formed xml into
Throws:
java.io.IOException - if serialization fails

serializeLRSpec

public static void serializeLRSpec(org.fosstrak.ale.xsd.ale.epcglobal.LRSpec spec,
                                   java.lang.String pathName,
                                   boolean pretty)
                            throws java.io.IOException
This method serializes an LRSpec to an xml and writes it into a file.

Parameters:
spec - the LRSpec to be written into a file
pathName - the file where to store
pretty - flag whether well-formed xml or not
Throws:
java.io.IOException - whenever an io problem occurs

serializeLRSpec

public static void serializeLRSpec(org.fosstrak.ale.xsd.ale.epcglobal.LRSpec spec,
                                   java.io.Writer writer)
                            throws java.io.IOException
This method serializes an LRSpec to an xml and writes it into a file.

Parameters:
spec - the LRSpec to be written into a file
pathName - the file where to store
pretty - flag whether well-formed xml or not
Throws:
java.io.IOException - whenever an io problem occurs

serializeSetProperties

public static void serializeSetProperties(org.fosstrak.ale.wsdl.alelr.epcglobal.SetProperties props,
                                          java.lang.String pathName)
                                   throws java.io.IOException
Serializes an SetProperties to xml and stores this xml into a file.

Parameters:
props - the SetProperties to be serialized.
pathName - the path to the file where to store the xml.
Throws:
java.io.IOException - if the file cannot be used.

serializeRemoveReaders

public static void serializeRemoveReaders(org.fosstrak.ale.wsdl.alelr.epcglobal.RemoveReaders readers,
                                          java.lang.String pathName)
                                   throws java.io.IOException
Serializes a RemoveReaders to xml and stores this xml into a file.

Parameters:
readers - the RemoveReaders to be serialized.
pathName - the path to the file where to store the xml.
Throws:
java.io.IOException - if the file cannot be used.

serializeSetReaders

public static void serializeSetReaders(org.fosstrak.ale.wsdl.alelr.epcglobal.SetReaders readers,
                                       java.lang.String pathName)
                                throws java.io.IOException
Serializes a SetReaders to xml and stores this xml into a file.

Parameters:
readers - the SetReaders to be serialized.
pathName - the path to the file where to store the xml.
Throws:
java.io.IOException - if the file cannot be used.

serializeAddReaders

public static void serializeAddReaders(org.fosstrak.ale.wsdl.alelr.epcglobal.AddReaders readers,
                                       java.lang.String pathName)
                                throws java.io.IOException
Serializes an AddReaders to xml and stores this xml into a file.

Parameters:
readers - the AddReaders to be serialized.
pathName - the path to the file where to store the xml.
Throws:
java.io.IOException - if the file cannot be used.

serializeECSpec

public static void serializeECSpec(org.fosstrak.ale.xsd.ale.epcglobal.ECSpec ecSpec,
                                   java.io.Writer writer)
                            throws java.io.IOException
This method serializes en ECSpec to an xml and writes it into a writer.

Parameters:
ecSpec - spec to be serialized.
writer - to writer where to store.
Throws:
java.io.IOException - if the file cannot be read.


Copyright © 2009. All Rights Reserved.