ch.sahits.codegen.ui.wizards
Class XMLSerializerFactory

java.lang.Object
  extended by ch.sahits.codegen.input.GeneralHeadlessXMLSerializerFactory
      extended by ch.sahits.codegen.ui.input.GeneralXMLSerializerFactory
          extended by ch.sahits.codegen.ui.wizards.XMLSerializerFactory
All Implemented Interfaces:
IXMLSerializerFactory

public class XMLSerializerFactory
extends GeneralXMLSerializerFactory

This Serialize factory retrives an instance of a IXMLSerializer. There are two different methods for retrieveing an IXMLSerializer instance:
For De-serialisation, where you have an existing XML file and need the deserializer for the maching version, and for serialisation where the configuration is stored with the most current version.

Since:
1.1.0
Author:
Andi Hotz

Constructor Summary
protected XMLSerializerFactory()
          Default constructor may only be called from whithin the class hierarchy
 
Method Summary
static XMLSerializerFactory getInstance()
          Retrieve an instance of this factory The instance may only be called from XMLSerializerFactroryFactory
 GerneralHeadLessXMLSerializer getXMLDeSerializer(java.lang.String inputFile)
          Get instance of a serializer for deserializing a XML file
 GerneralHeadLessXMLSerializer getXMLSerializer(java.lang.String inputFile)
          Retrieve the XML serialisation instance that serializes the configuration for the current XML version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLSerializerFactory

protected XMLSerializerFactory()
Default constructor may only be called from whithin the class hierarchy

Method Detail

getInstance

public static XMLSerializerFactory getInstance()
Retrieve an instance of this factory The instance may only be called from XMLSerializerFactroryFactory

Returns:
instance of this type

getXMLDeSerializer

public GerneralHeadLessXMLSerializer getXMLDeSerializer(java.lang.String inputFile)
                                                 throws JDOMException,
                                                        java.io.IOException
Get instance of a serializer for deserializing a XML file

Specified by:
getXMLDeSerializer in interface IXMLSerializerFactory
Overrides:
getXMLDeSerializer in class GeneralXMLSerializerFactory
Parameters:
inputFile - path to the XML file
Returns:
De-Serializing instance
Throws:
JDOMException
java.io.IOException

getXMLSerializer

public GerneralHeadLessXMLSerializer getXMLSerializer(java.lang.String inputFile)
                                               throws JDOMException,
                                                      java.io.IOException
Retrieve the XML serialisation instance that serializes the configuration for the current XML version

Specified by:
getXMLSerializer in interface IXMLSerializerFactory
Overrides:
getXMLSerializer in class GeneralXMLSerializerFactory
Parameters:
inputFile - path to the XML file
Returns:
Serializing instance
Throws:
JDOMException
java.io.IOException