org.eaglei.datatools.etl.server.extractor
Class Extractor

java.lang.Object
  extended by org.eaglei.datatools.etl.server.extractor.Extractor
Direct Known Subclasses:
ExcelExtractor, XmlExtractor

public abstract class Extractor
extends java.lang.Object

Author:
Sravan Cheriyala

Constructor Summary
Extractor()
           
 
Method Summary
abstract  java.util.Map<java.lang.String,Data> getData(java.io.File templateConfigFile)
          We need to parse the file and convert the data into #org.eaglei.datatools.etl.server.extractor.parsers.data .
abstract  java.lang.String getFormVersion()
          Every File which is submitted to ETL have to be associated with the form version.
 java.io.File getMapDirectory(java.lang.String formVersion, java.io.File mapsParentDirectory)
          Map directories are named with following format RESOURCETYPE_VERSION.In this directory all map files are stored .
 java.util.Map<java.lang.String,java.io.File> getMapFiles(java.io.File mapDirectory)
          gets all the map files require to transform the extracted file,returns the java.Util.Map with 'key' as map filename and 'value' as Map File
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Extractor

public Extractor()
Method Detail

getFormVersion

public abstract java.lang.String getFormVersion()
                                         throws java.text.ParseException,
                                                java.io.IOException
Every File which is submitted to ETL have to be associated with the form version. This form version is either submitted from within the file or as one of the input to ETL . If Form Version submitted from within the file then we need to write the file parser in such a way so that it reads the from version . The FormVersion decides which version of map file should be used to transform the data.

Returns:
the version string
Throws:
java.text.ParseException
java.io.IOException

getData

public abstract java.util.Map<java.lang.String,Data> getData(java.io.File templateConfigFile)
                                                      throws org.apache.commons.configuration.ConfigurationException,
                                                             java.io.IOException,
                                                             java.text.ParseException,
                                                             ExtractorException
We need to parse the file and convert the data into #org.eaglei.datatools.etl.server.extractor.parsers.data . This method returns the Java.util.Map with 'key' as the name of Map file and 'value' as the Data.It needs template config file as input. This templateconfig will be having information about the file being extracted.

Parameters:
templateConfigFile -
Returns:
Throws:
org.apache.commons.configuration.ConfigurationException
java.io.IOException
java.text.ParseException
ExtractorException

getMapFiles

public java.util.Map<java.lang.String,java.io.File> getMapFiles(java.io.File mapDirectory)
                                                         throws java.io.FileNotFoundException
gets all the map files require to transform the extracted file,returns the java.Util.Map with 'key' as map filename and 'value' as Map File

Parameters:
mapDirectory -
Returns:
Throws:
java.io.FileNotFoundException

getMapDirectory

public java.io.File getMapDirectory(java.lang.String formVersion,
                                    java.io.File mapsParentDirectory)
Map directories are named with following format RESOURCETYPE_VERSION.In this directory all map files are stored . This method will return the map directory.

Parameters:
formVersion -
mapsParentDirectory -
Returns:


Copyright © 2009-2011 Eagle-I. All Rights Reserved.