ch.sahits.codegen.input
Interface IInputParser

All Known Subinterfaces:
IDBInputParser, IXMLGeneralInputFileParser, IXMLInputFileParser, IXMLJavaInputFileParser, IXMLJavaInputFileParser
All Known Implementing Classes:
ClassFileParser, CSVInputFileParser, MySQLCreateScriptInputParser, OracleSQLCreateScriptInputParser, PHPXMLInputParser, SQLCreateScriptInput, SQLServerCreateScriptInputParser, WebserviceParser, XHTMLModelParser, XMLParserWithoutDB, XMLTableParser

public interface IInputParser

Marker interface for an input parser

Since:
0.9.0
Author:
Andi Hotz

Method Summary
 java.lang.String getFileExtension()
          Get the file extension of the input file this InputParser is capable of parsing
 int getRanking()
          This method rates the implementation.
 int getWorkload()
          Defines how complex the generation of the model is
 void init(java.lang.String inputFile)
          Initialize the parser with the file
 EDBConnectionData needsDataBaseInformationForCompleetion()
          Indicate if the input file is self contained or if for compleetion of the model information from the second page is needed.
 IGeneratedObject parse()
          Parse the input file into an object that represents a database table.
 

Method Detail

parse

IGeneratedObject parse()
Parse the input file into an object that represents a database table.

Returns:
IGeneratedJavaClass Bean with the data

getFileExtension

java.lang.String getFileExtension()
Get the file extension of the input file this InputParser is capable of parsing

Returns:
file extension

init

void init(java.lang.String inputFile)
          throws java.lang.Exception
Initialize the parser with the file

Parameters:
inputFile -
Throws:
java.lang.Exception - some exception occured during initialisation

getRanking

int getRanking()
This method rates the implementation. Since this Interface is used for an extension point Implementations with the highest ranking are choosen.

Returns:
Ranking of the implementation

getWorkload

int getWorkload()
Defines how complex the generation of the model is

Returns:
Number of work steps

needsDataBaseInformationForCompleetion

EDBConnectionData needsDataBaseInformationForCompleetion()
Indicate if the input file is self contained or if for compleetion of the model information from the second page is needed.

Returns:
true if data from the second page is needed
Since:
2.1.0