ch.sahits.codegen.wizards
Interface IXMLSerializer


public interface IXMLSerializer

This interface defines the functionality a XML serialisation class must provide.

Since:
1.1.0
Author:
Andi Hotz

Method Summary
 boolean checkFileVersion()
          Check if the xml version of the file matches with the one of the parser
 IInputObjectModel deserialize()
          Generate a ch.sahits.codegen.java.internal.wizards.IGeneratedClass that also implements IInputObjectModelfrom the XML file
 java.lang.String getParserName()
          Retrieve the name of this parser
 void init(java.lang.String inputFile)
          Initialize the parser
This method must be called before any acces to the elements in the XML file is possible.
 void serialize(IInputObjectModel genClass)
          Serialize the GeneratedClass object into the xml file
 

Method Detail

getParserName

java.lang.String getParserName()
Retrieve the name of this parser

Returns:
the class name

deserialize

IInputObjectModel deserialize()
Generate a ch.sahits.codegen.java.internal.wizards.IGeneratedClass that also implements IInputObjectModelfrom the XML file

Returns:
ch.sahits.codegen.java.internal.wizards.IGeneratedClass

serialize

void serialize(IInputObjectModel genClass)
Serialize the GeneratedClass object into the xml file

Parameters:
genClass - object to be serialized

checkFileVersion

boolean checkFileVersion()
Check if the xml version of the file matches with the one of the parser

Returns:
true if both versions are equal

init

void init(java.lang.String inputFile)
          throws java.lang.Exception
Initialize the parser
This method must be called before any acces to the elements in the XML file is possible.

Parameters:
inputFile - Input parser
Throws:
java.lang.Exception - one of the following
JDOMException - Could not create a SAX parser
java.io.IOException - Could not read from input file
java.net.MalformedURLException - malformed input file