ch.sahits.codegen.extensions
Class InputParser

java.lang.Object
  extended by ch.sahits.codegen.extensions.InputParser

public final class InputParser
extends java.lang.Object

This class encapsules the access to the extension point ch.sahits.codegen.java.inputparser

Since:
0.9.3
Author:
Andi Hotz

Constructor Summary
InputParser()
           
 
Method Summary
static IInputParser getGenerator(java.lang.String fileExtension)
          Retrieve the IInputParser from the extension point for a specific file extension.
static IInputParser getInputParser(java.lang.String inputFilePath, java.lang.String dbProduct)
          Retrieve an instance of an input paser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputParser

public InputParser()
Method Detail

getGenerator

public static IInputParser getGenerator(java.lang.String fileExtension)
Retrieve the IInputParser from the extension point for a specific file extension. If there is more than one implementation for one and the same file extension registered, the one with the lowest ranking is choosen.

Parameters:
fileExtension - file extension of the input file to be parsed
Returns:
Instance of an parser or null if for the specified product no implementation is found.

getInputParser

public static IInputParser getInputParser(java.lang.String inputFilePath,
                                          java.lang.String dbProduct)
Retrieve an instance of an input paser

Parameters:
inputFilePath - absolute filepath of the input file
dbProduct - database product (only needed for SQL files)
Returns:
Instance of the input parser or null if an exception occured while creating an XML parser
Since:
2.1.0