net.sf.flatpack
Interface ParserFactory

All Known Implementing Classes:
BuffReaderParseFactory, DefaultParserFactory

public interface ParserFactory

Factory definitions for creating a PZParser (delimiter or fixed length). The creation of a parser will not start the parsing. It should not fail either (unless DB issues etc).

Author:
Benoit Xhenseval

Method Summary
 Parser newDelimitedParser(java.sql.Connection con, java.io.InputStream dataSource, java.lang.String dataDefinition, char delimiter, char qualifier, boolean ignoreFirstRecord)
          Deprecated. Please use the newDelimitedParser(Connection, Reader, String, char, char, boolean). The InputStream can be wrapped in a "new InputStreamReader(InputStream)"
 Parser newDelimitedParser(java.sql.Connection con, java.io.Reader dataSource, java.lang.String dataDefinition, char delimiter, char qualifier, boolean ignoreFirstRecord)
          New constructor based on Reader.
 Parser newDelimitedParser(java.io.File dataSource, char delimiter, char qualifier)
          Deprecated. Please use the newDelimitedParser(Reader, char, char, boolean). The InputStream can be wrapped in a "new FileReader(File)"
 Parser newDelimitedParser(java.io.File pzmapXML, java.io.File dataSource, char delimiter, char qualifier, boolean ignoreFirstRecord)
          Deprecated. Please use the newDelimitedParser(Reader, Reader, String, char, char, boolean). The File can be wrapped in a "new FileReader(File)"
 Parser newDelimitedParser(java.io.InputStream dataSource, char delimiter, char qualifier)
          Deprecated. Please use the newDelimitedParser(Reader, char, char, boolean). The InputStream can be wrapped in a "new InputStreamReader(InputStream)"
 Parser newDelimitedParser(java.io.InputStream pzmapXMLStream, java.io.InputStream dataSourceStream, char delimiter, char qualifier, boolean ignoreFirstRecord)
          Deprecated. Please use the newDelimitedParser(Reader, Reader, String, char, char, boolean). The InputStream can be wrapped in a "new InputStreamReader(InputStream)"
 Parser newDelimitedParser(java.io.Reader dataSource, char delimiter, char qualifier)
          Constructs a new DataSet using the first line of data found in the text file as the column names.
 Parser newDelimitedParser(java.io.Reader pzmapXML, java.io.Reader dataSource, char delimiter, char qualifier, boolean ignoreFirstRecord)
          Constructs a new DataSet using the PZMAP XML file layout method.
 Parser newFixedLengthParser(java.sql.Connection con, java.io.File dataSource, java.lang.String dataDefinition)
          Deprecated. Please use the newFixedLengthParser(Connection, Reader, String). The File can be wrapped in a "new FileReader(File)"
 Parser newFixedLengthParser(java.sql.Connection con, java.io.InputStream dataSourceStream, java.lang.String dataDefinition)
          Deprecated. Please use the newFixedLengthParser(Connection, Reader, String). The InputStream can be wrapped in a "new InputStreamReader(InputStream)"
 Parser newFixedLengthParser(java.sql.Connection con, java.io.Reader dataSource, java.lang.String dataDefinition)
          Constructs a new DataSet using the database table file layout method.
 Parser newFixedLengthParser(java.io.File pzmapXML, java.io.File dataSource)
          Deprecated. Please use the newFixedLengthParser(Reader, Reader). The File can be wrapped in a "new FileReader(InputStream)"
 Parser newFixedLengthParser(java.io.InputStream pzmapXMLStream, java.io.InputStream dataSourceStream)
          Deprecated. Please use the newFixedLengthParser(Reader, Reader). The InputStream can be wrapped in a "new InputStreamReader(InputStream)"
 Parser newFixedLengthParser(java.io.Reader pzmapXMLStream, java.io.Reader dataSource)
          New constructor based on Reader.
 

Method Detail

newFixedLengthParser

Parser newFixedLengthParser(java.sql.Connection con,
                            java.io.File dataSource,
                            java.lang.String dataDefinition)
Deprecated. Please use the newFixedLengthParser(Connection, Reader, String). The File can be wrapped in a "new FileReader(File)"

Constructs a new DataSet using the database table file layout method. This is used for a FIXED LENGTH text file. The user is responsible for closing the DB connection.

Parameters:
con - - Connection to database with DATAFILE and DATASTRUCTURE tables, user is responsible for closing it.
dataSource - - Fixed length file to read from
dataDefinition - - Name of dataDefinition in the DATAFILE table DATAFILE_DESC column
Returns:
PZParser

newFixedLengthParser

Parser newFixedLengthParser(java.sql.Connection con,
                            java.io.InputStream dataSourceStream,
                            java.lang.String dataDefinition)
Deprecated. Please use the newFixedLengthParser(Connection, Reader, String). The InputStream can be wrapped in a "new InputStreamReader(InputStream)"

Constructs a new DataSet using the database table file layout method. This is used for a FIXED LENGTH text file. The user is responsible for closing the DB connection and InputStream.

Parameters:
con - - Connection to database with DATAFILE and DATASTRUCTURE tables, user is responsible for closing it.
dataSourceStream - - text file datasource InputStream to read from
dataDefinition - - Name of dataDefinition in the DATAFILE table DATAFILE_DESC column
Returns:
PZParser

newFixedLengthParser

Parser newFixedLengthParser(java.io.File pzmapXML,
                            java.io.File dataSource)
Deprecated. Please use the newFixedLengthParser(Reader, Reader). The File can be wrapped in a "new FileReader(InputStream)"

Constructs a new DataSet using the PZMAP XML file layout method. This is used for a FIXED LENGTH text file.

Parameters:
pzmapXML - - Reference to the xml file holding the pzmap
dataSource - - Delimited file to read from
Returns:
PZParser

newFixedLengthParser

Parser newFixedLengthParser(java.io.InputStream pzmapXMLStream,
                            java.io.InputStream dataSourceStream)
Deprecated. Please use the newFixedLengthParser(Reader, Reader). The InputStream can be wrapped in a "new InputStreamReader(InputStream)"

New constructor based on InputStream. Constructs a new DataSet using the PZMAP XML file layout method. This is used for a FIXED LENGTH text file. The user is responsible for closing the InputStreams.

Parameters:
pzmapXMLStream - - Reference to the xml file InputStream holding the pzmap, user must close them after use.
dataSourceStream - - Delimited file InputStream to read from, user must close them after use.
Returns:
PZParser

newFixedLengthParser

Parser newFixedLengthParser(java.sql.Connection con,
                            java.io.Reader dataSource,
                            java.lang.String dataDefinition)
Constructs a new DataSet using the database table file layout method. This is used for a FIXED LENGTH text file. The user is responsible for closing the DB connection.

Parameters:
con - - Connection to database with DATAFILE and DATASTRUCTURE tables, user is responsible for closing it.
dataSource - - Fixed length file to read from
dataDefinition - - Name of dataDefinition in the DATAFILE table DATAFILE_DESC column
Returns:
PZParser

newFixedLengthParser

Parser newFixedLengthParser(java.io.Reader pzmapXMLStream,
                            java.io.Reader dataSource)
New constructor based on Reader. Constructs a new DataSet using the PZMAP XML file layout method. This is used for a FIXED LENGTH text file. The user is responsible for closing the Readers.

Parameters:
pzmapXMLStream - - Reference to the xml Reader holding the pzmap, user must close them after use.
dataSource - - Delimited file Reader to read from, user must close them after use.
Returns:
PZParser

newDelimitedParser

Parser newDelimitedParser(java.sql.Connection con,
                          java.io.InputStream dataSource,
                          java.lang.String dataDefinition,
                          char delimiter,
                          char qualifier,
                          boolean ignoreFirstRecord)
Deprecated. Please use the newDelimitedParser(Connection, Reader, String, char, char, boolean). The InputStream can be wrapped in a "new InputStreamReader(InputStream)"

Constructs a new DataSet using the database table file layout method. This is used for a DELIMITED text file. esacpe sequence reference: \n newline
\t tab
\b backspace
\r return
\f form feed
\\ backslash
\' single quote
\" double quote The user is responsible for closing the DB connection and InputStream.

Parameters:
con - - Connection to database with DATAFILE and DATASTRUCTURE tables, user must close it when done.
dataSource - - text file datasource InputStream to read from, user must close it when done.
dataDefinition - - Name of dataDefinition in the DATAFILE table DATAFILE_DESC column
delimiter - - Char the file is delimited By
qualifier - - Char text is qualified by
ignoreFirstRecord - - skips the first line that contains data in the file
Returns:
PZParser

newDelimitedParser

Parser newDelimitedParser(java.sql.Connection con,
                          java.io.Reader dataSource,
                          java.lang.String dataDefinition,
                          char delimiter,
                          char qualifier,
                          boolean ignoreFirstRecord)
New constructor based on Reader. Constructs a new DataSet using the database table file layout method. This is used for a DELIMITED text file. esacpe sequence reference: \n newline
\t tab
\b backspace
\r return
\f form feed
\\ backslash
\' single quote
\" double quote The user is responsible for closing the DB connection and InputStream.

Parameters:
con - - Connection to database with DATAFILE and DATASTRUCTURE tables, user must close it when done.
dataSource - - text file datasource InputStream to read from, user must close it when done.
dataDefinition - - Name of dataDefinition in the DATAFILE table DATAFILE_DESC column
delimiter - - Char the file is delimited By
qualifier - - Char text is qualified by
ignoreFirstRecord - - skips the first line that contains data in the file
Returns:
PZParser

newDelimitedParser

Parser newDelimitedParser(java.io.File pzmapXML,
                          java.io.File dataSource,
                          char delimiter,
                          char qualifier,
                          boolean ignoreFirstRecord)
Deprecated. Please use the newDelimitedParser(Reader, Reader, String, char, char, boolean). The File can be wrapped in a "new FileReader(File)"

Constructs a new DataSet using the PZMAP XML file layout method. This is used for a DELIMITED text file. esacpe sequence reference: \n newline
\t tab
\b backspace
\r return
\f form feed
\\ backslash
\' single quote
\" double quote

Parameters:
pzmapXML - - Reference to the xml file holding the pzmap
dataSource - - text file datasource to read from
delimiter - - Char the file is delimited By
qualifier - - Char text is qualified by
ignoreFirstRecord - - skips the first line that contains data in the file
Returns:
PZParser

newDelimitedParser

Parser newDelimitedParser(java.io.Reader pzmapXML,
                          java.io.Reader dataSource,
                          char delimiter,
                          char qualifier,
                          boolean ignoreFirstRecord)
Constructs a new DataSet using the PZMAP XML file layout method. This is used for a DELIMITED text file. esacpe sequence reference: \n newline
\t tab
\b backspace
\r return
\f form feed
\\ backslash
\' single quote
\" double quote

Parameters:
pzmapXML - - Reference to the xml file holding the pzmap
dataSource - - text file datasource to read from
delimiter - - Char the file is delimited By
qualifier - - Char text is qualified by
ignoreFirstRecord - - skips the first line that contains data in the file
Returns:
PZParser

newDelimitedParser

Parser newDelimitedParser(java.io.InputStream pzmapXMLStream,
                          java.io.InputStream dataSourceStream,
                          char delimiter,
                          char qualifier,
                          boolean ignoreFirstRecord)
Deprecated. Please use the newDelimitedParser(Reader, Reader, String, char, char, boolean). The InputStream can be wrapped in a "new InputStreamReader(InputStream)"

New constructor based on InputStream. Constructs a new DataSet using the PZMAP XML file layout method. This is used for a DELIMITED text file. esacpe sequence reference: \n newline
\t tab
\b backspace
\r return
\f form feed
\\ backslash
\' single quote
\" double quote The user is responsible for closing the InputStreams.

Parameters:
pzmapXMLStream - - Reference to the xml file holding the pzmap, user must close it when done.
dataSourceStream - - text file datasource InputStream to read from, user must close it when done.
delimiter - - Char the file is delimited By
qualifier - - Char text is qualified by
ignoreFirstRecord - - skips the first line that contains data in the file
Returns:
PZParser

newDelimitedParser

Parser newDelimitedParser(java.io.File dataSource,
                          char delimiter,
                          char qualifier)
Deprecated. Please use the newDelimitedParser(Reader, char, char, boolean). The InputStream can be wrapped in a "new FileReader(File)"

Constructs a new DataSet using the first line of data found in the text file as the column names. This is used for a DELIMITED text file. esacpe sequence reference: \n newline
\t tab
\b backspace
\r return
\f form feed
\\ backslash
\' single quote
\" double quote

Parameters:
dataSource - - text file datasource to read from
delimiter - - Char the file is delimited By
qualifier - - Char text is qualified by
Returns:
PZParser

newDelimitedParser

Parser newDelimitedParser(java.io.Reader dataSource,
                          char delimiter,
                          char qualifier)
Constructs a new DataSet using the first line of data found in the text file as the column names. This is used for a DELIMITED text file. esacpe sequence reference: \n newline
\t tab
\b backspace
\r return
\f form feed
\\ backslash
\' single quote
\" double quote

Parameters:
dataSource - - text file datasource to read from
delimiter - - Char the file is delimited By
qualifier - - Char text is qualified by
Returns:
PZParser

newDelimitedParser

Parser newDelimitedParser(java.io.InputStream dataSource,
                          char delimiter,
                          char qualifier)
Deprecated. Please use the newDelimitedParser(Reader, char, char, boolean). The InputStream can be wrapped in a "new InputStreamReader(InputStream)"

Constructs a new DataSet using the first line of data found in the text file as the column names. This is used for a DELIMITED text file. esacpe sequence reference: \n newline
\t tab
\b backspace
\r return
\f form feed
\\ backslash
\' single quote
\" double quote The user must close the InputStream when done (after parsing).

Parameters:
dataSource - - text file InputStream to read from, user must close it when done.
delimiter - - Char the file is delimited By
qualifier - - Char text is qualified by
Returns:
PZParser


Copyright © 2006-2011 Appendium - Portfolio Financing Platform. All Rights Reserved.