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

java.lang.Object
  extended by org.eaglei.datatools.etl.server.extractor.Extractor
      extended by org.eaglei.datatools.etl.server.extractor.XmlExtractor

public class XmlExtractor
extends Extractor

Author:
"Sravan Cheriyala" Started Mar 1, 2011

Constructor Summary
XmlExtractor(java.io.File xmlFile, java.lang.String version)
           
 
Method Summary
 java.util.Map<java.lang.String,Data> getData(java.io.File mapDirectory)
          We need to parse the file and convert the data into #org.eaglei.datatools.etl.server.extractor.parsers.data .
 java.lang.String getFormVersion()
          Every File which is submitted to ETL have to be associated with the form version.
 
Methods inherited from class org.eaglei.datatools.etl.server.extractor.Extractor
getMapDirectory, getMapFiles
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlExtractor

public XmlExtractor(java.io.File xmlFile,
                    java.lang.String version)
             throws java.text.ParseException,
                    javax.xml.parsers.ParserConfigurationException,
                    org.xml.sax.SAXException,
                    java.io.IOException
Throws:
java.text.ParseException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
Method Detail

getData

public java.util.Map<java.lang.String,Data> getData(java.io.File mapDirectory)
                                             throws org.apache.commons.configuration.ConfigurationException,
                                                    java.io.IOException,
                                                    java.text.ParseException,
                                                    ExtractorException
Description copied from class: Extractor
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.

Specified by:
getData in class Extractor
Returns:
Throws:
org.apache.commons.configuration.ConfigurationException
java.io.IOException
java.text.ParseException
ExtractorException

getFormVersion

public java.lang.String getFormVersion()
                                throws java.text.ParseException,
                                       java.io.IOException
Description copied from class: Extractor
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.

Specified by:
getFormVersion in class Extractor
Returns:
the version string
Throws:
java.text.ParseException
java.io.IOException


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