You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(112) |
Nov
(44) |
Dec
(49) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(14) |
Feb
(12) |
Mar
(12) |
Apr
(12) |
May
(6) |
Jun
(11) |
Jul
(10) |
Aug
(6) |
Sep
(17) |
Oct
(3) |
Nov
(22) |
Dec
|
2008 |
Jan
(3) |
Feb
(7) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(6) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(1) |
Mar
(9) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
(2) |
Dec
|
2011 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2012 |
Jan
(3) |
Feb
|
Mar
(2) |
Apr
(8) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <zep...@us...> - 2006-10-17 14:21:37
|
Revision: 65 http://svn.sourceforge.net/pzfilereader/?rev=65&view=rev Author: zepernick Date: 2006-10-17 07:21:32 -0700 (Tue, 17 Oct 2006) Log Message: ----------- removed exception for DataSets containing <record> mappings when an orderBy was called Added logic to push all non-detail records to the bottom of the DataSet on a sort Modified Paths: -------------- trunk/PZFileReader/src/main/java/com/pz/reader/DataSet.java trunk/PZFileReader/src/main/java/com/pz/reader/ordering/OrderBy.java Modified: trunk/PZFileReader/src/main/java/com/pz/reader/DataSet.java =================================================================== --- trunk/PZFileReader/src/main/java/com/pz/reader/DataSet.java 2006-10-16 23:27:19 UTC (rev 64) +++ trunk/PZFileReader/src/main/java/com/pz/reader/DataSet.java 2006-10-17 14:21:32 UTC (rev 65) @@ -1154,9 +1154,11 @@ * @see com.pz.reader.ordering.OrderColumn */ public void orderRows(final OrderBy ob) throws Exception { - if (columnMD.size() > 1) { - throw new Exception("orderRows does not currently support ordering with <RECORD> mappings"); - } + //PZ try to handle other <records> by sending them to + //the bottom of the sort + // if (columnMD.size() > 1) { + // throw new Exception("orderRows does not currently support ordering with <RECORD> mappings"); + // } final List cmds = ParserUtils.getColumnMetaData("detail", columnMD); if (ob != null && rows != null) { ob.setColumnMD(cmds); Modified: trunk/PZFileReader/src/main/java/com/pz/reader/ordering/OrderBy.java =================================================================== --- trunk/PZFileReader/src/main/java/com/pz/reader/ordering/OrderBy.java 2006-10-16 23:27:19 UTC (rev 64) +++ trunk/PZFileReader/src/main/java/com/pz/reader/ordering/OrderBy.java 2006-10-17 14:21:32 UTC (rev 65) @@ -66,9 +66,17 @@ for (int i = 0; i < orderbys.size(); i++) { oc = (OrderColumn) orderbys.get(i); + + //null indicates "detail" record which is what the parser assigns to <column> 's setup outside of <record> elements + //shift all non detail records to the bottom of the DataSet + if (row0.getMdkey() != null && !row0.getMdkey().equals("detail")){ + return 1; + }else if (row1.getMdkey() != null && !row1.getMdkey().equals("detail")){ + return 0; + } + // convert to one type of case so the comparator does not take case // into account when sorting - comp0 = row0.getValue(ParserUtils.findColumn(oc.getColumnName(), columnMD)).toLowerCase(); comp1 = row1.getValue(ParserUtils.findColumn(oc.getColumnName(), columnMD)).toLowerCase(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2006-10-16 23:27:31
|
Revision: 64 http://svn.sourceforge.net/pzfilereader/?rev=64&view=rev Author: benoitx Date: 2006-10-16 16:27:19 -0700 (Mon, 16 Oct 2006) Log Message: ----------- A few Checkstyle and FindBugs resolutions. Modified Paths: -------------- trunk/PZFileReader/src/main/java/com/pz/reader/DataError.java trunk/PZFileReader/src/main/java/com/pz/reader/DataSet.java trunk/PZFileReader/src/main/java/com/pz/reader/LargeDataSet.java trunk/PZFileReader/src/main/java/com/pz/reader/ordering/OrderBy.java trunk/PZFileReader/src/main/java/com/pz/reader/util/ParserUtils.java trunk/PZFileReader/src/main/java/com/pz/reader/xml/PZMapParser.java Modified: trunk/PZFileReader/src/main/java/com/pz/reader/DataError.java =================================================================== --- trunk/PZFileReader/src/main/java/com/pz/reader/DataError.java 2006-10-16 21:19:38 UTC (rev 63) +++ trunk/PZFileReader/src/main/java/com/pz/reader/DataError.java 2006-10-16 23:27:19 UTC (rev 64) @@ -22,20 +22,19 @@ */ public class DataError { - /** Description of error */ + /** Description of error. */ private String errorDesc = null; - /** line number in file error occured on */ + /** line number in file error occured on. */ private int lineNo = 0; /** - * Severity of the error 1 = Warning 2 = Moderate 3 = Severe + * Severity of the error 1 = Warning 2 = Moderate 3 = Severe. */ private int errorLevel = 0; /** default constructor */ public DataError() { - super(); } /** Modified: trunk/PZFileReader/src/main/java/com/pz/reader/DataSet.java =================================================================== --- trunk/PZFileReader/src/main/java/com/pz/reader/DataSet.java 2006-10-16 21:19:38 UTC (rev 63) +++ trunk/PZFileReader/src/main/java/com/pz/reader/DataSet.java 2006-10-16 23:27:19 UTC (rev 64) @@ -823,7 +823,7 @@ * @exception NoSuchElementException * @return String */ - public String getString(final String column) throws NoSuchElementException { + public String getString(final String column) { final Row row = (Row) rows.get(pointer); final List cmds = ParserUtils.getColumnMetaData(row.getMdkey(), columnMD); @@ -850,7 +850,7 @@ * @exception NumberFormatException * @return double */ - public double getDouble(final String column) throws NoSuchElementException, NumberFormatException { + public double getDouble(final String column) { String s = null; final StringBuffer newString = new StringBuffer(); final String[] allowedChars = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "-" }; @@ -891,7 +891,7 @@ * @exception NumberFormatException * @return double */ - public int getInt(final String column) throws NoSuchElementException, NumberFormatException { + public int getInt(final String column) { String s = null; final StringBuffer newString = new StringBuffer(); final String[] allowedChars = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-" }; @@ -1076,7 +1076,7 @@ * int * @exception IndexOutOfBoundsException */ - public void absolute(final int localPointer) throws IndexOutOfBoundsException { + public void absolute(final int localPointer) { if (localPointer < 0 || localPointer > rows.size() - 1) { throw new IndexOutOfBoundsException("INVALID POINTER LOCATION: " + localPointer); } Modified: trunk/PZFileReader/src/main/java/com/pz/reader/LargeDataSet.java =================================================================== --- trunk/PZFileReader/src/main/java/com/pz/reader/LargeDataSet.java 2006-10-16 21:19:38 UTC (rev 63) +++ trunk/PZFileReader/src/main/java/com/pz/reader/LargeDataSet.java 2006-10-16 23:27:19 UTC (rev 64) @@ -261,7 +261,7 @@ * int * @exception IndexOutOfBoundsException */ - public void absolute(final int localPointer) throws IndexOutOfBoundsException { + public void absolute(final int localPointer) { throw new RuntimeException("absolute() is Not Implemented For LargeDataSet"); } @@ -524,7 +524,7 @@ if (isHandleShortLines()) { // We can pad this line out while (line.length() < recordLength) { - line = line + " "; + line += ParserUtils.padding(recordLength-line.length(), ' '); } // log a warning Modified: trunk/PZFileReader/src/main/java/com/pz/reader/ordering/OrderBy.java =================================================================== --- trunk/PZFileReader/src/main/java/com/pz/reader/ordering/OrderBy.java 2006-10-16 21:19:38 UTC (rev 63) +++ trunk/PZFileReader/src/main/java/com/pz/reader/ordering/OrderBy.java 2006-10-16 23:27:19 UTC (rev 64) @@ -72,12 +72,13 @@ comp0 = row0.getValue(ParserUtils.findColumn(oc.getColumnName(), columnMD)).toLowerCase(); comp1 = row1.getValue(ParserUtils.findColumn(oc.getColumnName(), columnMD)).toLowerCase(); - if (comp0 == null) { - comp0 = new String(""); - } - if (comp1 == null) { - comp1 = new String(""); - } +//+ BX will never be equal to null. +// if (comp0 == null) { +// comp0 = new String(""); +// } +// if (comp1 == null) { +// comp1 = new String(""); +// } // multiply by the sort indicator to get a ASC or DESC result result = comp0.compareTo(comp1) * oc.getSortIndicator(); Modified: trunk/PZFileReader/src/main/java/com/pz/reader/util/ParserUtils.java =================================================================== --- trunk/PZFileReader/src/main/java/com/pz/reader/util/ParserUtils.java 2006-10-16 21:19:38 UTC (rev 63) +++ trunk/PZFileReader/src/main/java/com/pz/reader/util/ParserUtils.java 2006-10-16 23:27:19 UTC (rev 64) @@ -400,7 +400,7 @@ * @return int - position of the column in the file * @throws NoSuchElementException */ - public static int findColumn(final String columnName, final List columnMD) throws NoSuchElementException { + public static int findColumn(final String columnName, final List columnMD) { for (int i = 0; i < columnMD.size(); i++) { final ColumnMetaData cmd = (ColumnMetaData) columnMD.get(i); if (cmd.getColName().equalsIgnoreCase(columnName)) { @@ -679,4 +679,38 @@ } } + + /** + * <p>Returns padding using the specified delimiter repeated + * to a given length.</p> + * + * <pre> + * StringUtils.padding(0, 'e') = "" + * StringUtils.padding(3, 'e') = "eee" + * StringUtils.padding(-2, 'e') = IndexOutOfBoundsException + * </pre> + * + * <p>Note: this method doesn't not support padding with + * <a href="http://www.unicode.org/glossary/#supplementary_character">Unicode Supplementary Characters</a> + * as they require a pair of <code>char</code>s to be represented. + * If you are needing to support full I18N of your applications + * consider using {@link #repeat(String, int)} instead. + * </p> + * + * @param repeat number of times to repeat delim + * @param padChar character to repeat + * @return String with repeated character + * @throws IndexOutOfBoundsException if <code>repeat < 0</code> + * @see #repeat(String, int) + */ + public static String padding(int repeat, char padChar) { + if (repeat < 0) { + throw new IndexOutOfBoundsException("Cannot pad a negative amount: " + repeat); + } + final char[] buf = new char[repeat]; + for (int i = 0; i < buf.length; i++) { + buf[i] = padChar; + } + return new String(buf); + } } Modified: trunk/PZFileReader/src/main/java/com/pz/reader/xml/PZMapParser.java =================================================================== --- trunk/PZFileReader/src/main/java/com/pz/reader/xml/PZMapParser.java 2006-10-16 21:19:38 UTC (rev 63) +++ trunk/PZFileReader/src/main/java/com/pz/reader/xml/PZMapParser.java 2006-10-16 23:27:19 UTC (rev 64) @@ -37,7 +37,7 @@ */ public final class PZMapParser { - private static boolean SHOW_DEBUG = false; + private static boolean showDebug = false; /** * Constructor @@ -123,7 +123,7 @@ mdIndex.put(xmlElement.getAttributeValue("id"), xmlre); } - if (SHOW_DEBUG) { + if (showDebug) { showDebug(mdIndex); } @@ -189,7 +189,7 @@ * @param b */ public static void setDebug(final boolean b) { - SHOW_DEBUG = b; + showDebug = b; } private static void showDebug(final Map xmlResults) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2006-10-16 21:21:04
|
Revision: 63 http://svn.sourceforge.net/pzfilereader/?rev=63&view=rev Author: benoitx Date: 2006-10-16 14:19:38 -0700 (Mon, 16 Oct 2006) Log Message: ----------- One step closer to have the examples working. Tidy up website too. Modified Paths: -------------- trunk/PZFileReaderSamples/project.xml trunk/PZFileReaderSamples/src/site/index.xml trunk/src/site/navigation.xml Added Paths: ----------- trunk/common-build/lib/ trunk/common-build/lib/README trunk/common-build/lib/jdom.jar trunk/common-build/lib/jexcelapi license.txt trunk/common-build/lib/jxl.jar trunk/src/site/features.xml Removed Paths: ------------- trunk/PZFileReader/include/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/createsamplecsv/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/createsamplecsv/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvheaderandtrailer/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvheaderandtrailer/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvperformancetest/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvperformancetest/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimitedcolumnnamesinfile/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimitedcolumnnamesinfile/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumns/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumns/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumnswitherrors/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumnswitherrors/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/exporttoexcel/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/exporttoexcel/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthdynamiccolumns/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthdynamiccolumns/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthheaderandtrailer/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthheaderandtrailer/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/delimiteddynamiccolumns/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/delimiteddynamiccolumns/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/fixedlengthdynamiccolumns/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/fixedlengthdynamiccolumns/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/largecsvperformancetest/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/largecsvperformancetest/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/lowlevelparse/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/lowlevelparse/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/multilinedelimitedrecord/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/multilinedelimitedrecord/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/numericsanddates/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/numericsanddates/README.txt Modified: trunk/PZFileReaderSamples/project.xml =================================================================== --- trunk/PZFileReaderSamples/project.xml 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/project.xml 2006-10-16 21:19:38 UTC (rev 63) @@ -66,9 +66,24 @@ <includes> <include>**/*.txt</include> <include>**/*.xml</include> + <include>**/*.csv</include> </includes> <filtering>false</filtering> </resource> + <resource> + <directory>${basedir}/../common-build/lib</directory> + <includes> + <include>**/*.jar</include> + </includes> + <filtering>false</filtering> + </resource> + <resource> + <directory>${basedir}/common-build/lib</directory> + <includes> + <include>**/*.jar</include> + </includes> + <filtering>false</filtering> + </resource> </resources> </build> Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/createsamplecsv/ExecuteSample.bat =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/createsamplecsv/ExecuteSample.bat 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/createsamplecsv/ExecuteSample.bat 2006-10-16 21:19:38 UTC (rev 63) @@ -1,3 +0,0 @@ -REM param1 = # cols to make | param2 = #rows to make -java -cp ./ CSVTestFileCreator 10 100000 -pause \ No newline at end of file Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/createsamplecsv/README.txt =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/createsamplecsv/README.txt 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/createsamplecsv/README.txt 2006-10-16 21:19:38 UTC (rev 63) @@ -1,8 +0,0 @@ -This utility can be used to create a sample CSV file for testing the parser. In the -ExecuterSample.bat file, there are 2 parameters. - -param1 = # cols to make | param2 = #rows to make - -The following line would create a csv file with 10 columns and 100000 rows: - -java -cp ./ CSVTestFileCreator 10 100000 \ No newline at end of file Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvheaderandtrailer/ExecuteSample.bat =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvheaderandtrailer/ExecuteSample.bat 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvheaderandtrailer/ExecuteSample.bat 2006-10-16 21:19:38 UTC (rev 63) @@ -1,2 +0,0 @@ -java -cp ./;../../pzFileReader2_2_2.jar;../../lib/jdom.jar CSVHeaderAndTrailer -pause \ No newline at end of file Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvheaderandtrailer/README.txt =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvheaderandtrailer/README.txt 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvheaderandtrailer/README.txt 2006-10-16 21:19:38 UTC (rev 63) @@ -1,4 +0,0 @@ -File Type: Comma Delimted With Text Qualified By "'s - - -This shows the ability to parse header and trailer records out of a file. Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvperformancetest/ExecuteSample.bat =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvperformancetest/ExecuteSample.bat 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvperformancetest/ExecuteSample.bat 2006-10-16 21:19:38 UTC (rev 63) @@ -1,2 +0,0 @@ -java -Xmx712m -Xms712m -cp ./;../../pzFileReader2_2_2.jar;../../lib/jdom.jar;../../lib/jxl.jar CSVPerformanceTest -pause \ No newline at end of file Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvperformancetest/README.txt =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvperformancetest/README.txt 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvperformancetest/README.txt 2006-10-16 21:19:38 UTC (rev 63) @@ -1,30 +0,0 @@ -File Type: Must Be A CSV file - -This is meant to be a performance test. The sample file contains 10 columns and 100,000 rows. - - -Performance Tests ------------------------------- - Machine Specs: P4 1.7 GHZ 256MB RAM | Parse Time: 45-48 secs. - Machine Specs: P4 2.9 GHZ 1 GB RAM | Parse Time: 23-25 secs. - -Feel free to post additional performance tests in the SF forums :) - - -There is a settings.properties file in this directory. This file has 2 different options: - -verbose - can be set to true/false. If set to true, the data in the file will be ran to the screen -after the parse. There is a 2 second pause before data start to get spit to the screen. This is -to allow the user to see the total time it took to parse the file. - -csvFile - set this to the path of the CSV file to be read in. Feel free to test this against your own -CSV files. - - -This particular example uses the first record in the file for the column names. - -Depending on the size of the file being parsed, the -Xmx parameter may need to be adjusted. This -is the max memory setting for the JVM to use. This parameter is set in the ExecuteSample.bat file -and is currently set to 128mb. This needs to be adjusted if OutOfMemory errors occur. - - Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimitedcolumnnamesinfile/ExecuteSample.bat =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimitedcolumnnamesinfile/ExecuteSample.bat 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimitedcolumnnamesinfile/ExecuteSample.bat 2006-10-16 21:19:38 UTC (rev 63) @@ -1,2 +0,0 @@ -java -cp ./;../../pzFileReader2_2_2.jar;../../lib/jdom.jar DelimitedColumnNamesInFile -pause \ No newline at end of file Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimitedcolumnnamesinfile/README.txt =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimitedcolumnnamesinfile/README.txt 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimitedcolumnnamesinfile/README.txt 2006-10-16 21:19:38 UTC (rev 63) @@ -1,10 +0,0 @@ -File Type: Comma Delimted With Text Qualified By "'s - -This sample uses the column names which are contained in the CSV file instead -of relying on a mapping to tell the parser what the column names are. - -This sample also re-orders the file by CITY ASC, LASTNAME DESC - - -There have also been " 's and , 's added to the text on one of the records -to show the parsing abilities of the API. Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumns/ExecuteSample.bat =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumns/ExecuteSample.bat 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumns/ExecuteSample.bat 2006-10-16 21:19:38 UTC (rev 63) @@ -1,2 +0,0 @@ -java -cp ./;../../pzFileReader2_2_2.jar;../../lib/jdom.jar DelimitedWithPZMap -pause \ No newline at end of file Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumns/README.txt =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumns/README.txt 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumns/README.txt 2006-10-16 21:19:38 UTC (rev 63) @@ -1,11 +0,0 @@ -File Type: Comma Delimted With Text Qualified By "'s - - -This sample dynamically reads the column names from the DataSet and evaluates -the values of each column. Making use of the getColumns() method. - -This sample also re-orders the file by CITY ASC, LASTNAME DESC - - -There have also been " 's and , 's added to the text on one of the records -to show the parsing abilities of the API. Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumnswitherrors/ExecuteSample.bat =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumnswitherrors/ExecuteSample.bat 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumnswitherrors/ExecuteSample.bat 2006-10-16 21:19:38 UTC (rev 63) @@ -1,2 +0,0 @@ -java -cp ./;../../pzFileReader2_2_2.jar;../../lib/jdom.jar DelimitedWithPZMapErrors -pause \ No newline at end of file Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumnswitherrors/README.txt =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumnswitherrors/README.txt 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumnswitherrors/README.txt 2006-10-16 21:19:38 UTC (rev 63) @@ -1,18 +0,0 @@ -File Type: Comma Delimted With Text Qualified By "'s - -This sample contains errors in the PEOPLE-CommaDelimitedWithQualifier.txt -2 Lines in the file contain more columns then we have declared in the -PEOPLE-Delimited.pzmap.xml -This demonstrates how to check for errors that happened while reading the file. - - -This sample dynamically reads the column names from the DataSet and evaluates -the values of each column. Making use of the getColumns() method. - -This sample also re-orders the file by CITY ASC, LASTNAME DESC - - -There have also been " 's and , 's added to the text on one of the records -to show the parsing abilities of the API. - - Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/exporttoexcel/ExecuteSample.bat =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/exporttoexcel/ExecuteSample.bat 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/exporttoexcel/ExecuteSample.bat 2006-10-16 21:19:38 UTC (rev 63) @@ -1,2 +0,0 @@ -java -cp ./;../../pzFileReader2_2_2.jar;../../lib/jdom.jar;../../lib/jxl.jar DelimitedFileExportToExcel -pause \ No newline at end of file Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/exporttoexcel/README.txt =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/exporttoexcel/README.txt 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/exporttoexcel/README.txt 2006-10-16 21:19:38 UTC (rev 63) @@ -1,9 +0,0 @@ -File Type: Comma Delimted With Text Qualified By "'s - - - -This sample re-orders the file by CITY ASC, LASTNAME DESC and exports to "MyExcelExport.xls" - - -There have also been " 's and , 's added to the text on one of the records -to show the parsing abilities of the API. Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthdynamiccolumns/ExecuteSample.bat =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthdynamiccolumns/ExecuteSample.bat 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthdynamiccolumns/ExecuteSample.bat 2006-10-16 21:19:38 UTC (rev 63) @@ -1,2 +0,0 @@ -java -cp ./;../../pzFileReader2_2_2.jar;../../lib/jdom.jar FixedLengthWithPZMap -pause \ No newline at end of file Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthdynamiccolumns/README.txt =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthdynamiccolumns/README.txt 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthdynamiccolumns/README.txt 2006-10-16 21:19:38 UTC (rev 63) @@ -1,9 +0,0 @@ -File Type: Fixed Width Text - -This sample dynamically reads the column names from the DataSet and evaluates -the values of each column. Making use of the getColumns() method. - -This sample also re-orders the file by CITY ASC, LASTNAME DESC - - - Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthheaderandtrailer/ExecuteSample.bat =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthheaderandtrailer/ExecuteSample.bat 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthheaderandtrailer/ExecuteSample.bat 2006-10-16 21:19:38 UTC (rev 63) @@ -1,2 +0,0 @@ -java -cp ./;../../pzFileReader2_2_2.jar;../../lib/jdom.jar FixedLengthHeaderAndTrailer -pause \ No newline at end of file Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthheaderandtrailer/README.txt =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthheaderandtrailer/README.txt 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthheaderandtrailer/README.txt 2006-10-16 21:19:38 UTC (rev 63) @@ -1,9 +0,0 @@ -File Type: Fixed Width Text - -This sample dynamically reads the column names from the DataSet and evaluates -the values of each column. Making use of the getColumns() method. - -This sample also re-orders the file by CITY ASC, LASTNAME DESC - - - Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/delimiteddynamiccolumns/ExecuteSample.bat =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/delimiteddynamiccolumns/ExecuteSample.bat 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/delimiteddynamiccolumns/ExecuteSample.bat 2006-10-16 21:19:38 UTC (rev 63) @@ -1,2 +0,0 @@ -java -cp ./;../../../pzFileReader2_2_2.jar;../../../lib/jdom.jar DelimitedWithPZMap -pause \ No newline at end of file Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/delimiteddynamiccolumns/README.txt =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/delimiteddynamiccolumns/README.txt 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/delimiteddynamiccolumns/README.txt 2006-10-16 21:19:38 UTC (rev 63) @@ -1,9 +0,0 @@ -File Type: Comma Delimted With Text Qualified By "'s - - -This sample dynamically reads the column names from the LargeDataSet and evaluates -the values of each column. Making use of the getColumns() method. - - -There have also been " 's and , 's added to the text on one of the records -to show the parsing abilities of the API. Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/fixedlengthdynamiccolumns/ExecuteSample.bat =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/fixedlengthdynamiccolumns/ExecuteSample.bat 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/fixedlengthdynamiccolumns/ExecuteSample.bat 2006-10-16 21:19:38 UTC (rev 63) @@ -1,2 +0,0 @@ -java -cp ./;../../../pzFileReader2_2_2.jar;../../../lib/jdom.jar FixedLengthWithPZMap -pause \ No newline at end of file Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/fixedlengthdynamiccolumns/README.txt =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/fixedlengthdynamiccolumns/README.txt 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/fixedlengthdynamiccolumns/README.txt 2006-10-16 21:19:38 UTC (rev 63) @@ -1,9 +0,0 @@ -File Type: Fixed Width Text - -This sample dynamically reads the column names from the DataSet and evaluates -the values of each column. Making use of the getColumns() method. - -This sample also re-orders the file by CITY ASC, LASTNAME DESC - - - Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/largecsvperformancetest/ExecuteSample.bat =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/largecsvperformancetest/ExecuteSample.bat 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/largecsvperformancetest/ExecuteSample.bat 2006-10-16 21:19:38 UTC (rev 63) @@ -1,2 +0,0 @@ -java -Xmx128m -Xms128m -cp ./;../../../pzFileReader2_2_2.jar;../../../lib/jdom.jar CSVLarge -pause \ No newline at end of file Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/largecsvperformancetest/README.txt =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/largecsvperformancetest/README.txt 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/largecsvperformancetest/README.txt 2006-10-16 21:19:38 UTC (rev 63) @@ -1,20 +0,0 @@ -File Type: Must Be A CSV file - -This is meant to be a performance test for large files. This will make use of the new LargeDataSet class introduced -in 2.2. A println will be run to the screen for every 2500 records parsed & looped through in the file. - -This class differs from the DataSet class where the file is no longer read into memory. - -There is a settings.properties file in this directory. - -csvFile - set this to the path of the CSV file to be read in. Feel free to test this against your own -CSV files. - - -This particular example uses the first record in the file for the column names. - -Depending on the size of the file being parsed, the -Xmx parameter may need to be adjusted. This -is the max memory setting for the JVM to use. This parameter is set in the ExecuteSample.bat file -and is currently set to 128mb. This needs to be adjusted if OutOfMemory errors occur. - - Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/lowlevelparse/ExecuteSample.bat =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/lowlevelparse/ExecuteSample.bat 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/lowlevelparse/ExecuteSample.bat 2006-10-16 21:19:38 UTC (rev 63) @@ -1,2 +0,0 @@ -java -cp ./;../../pzFileReader2_2_2.jar;../../lib/jdom.jar LowLevelParse -pause \ No newline at end of file Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/lowlevelparse/README.txt =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/lowlevelparse/README.txt 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/lowlevelparse/README.txt 2006-10-16 21:19:38 UTC (rev 63) @@ -1,7 +0,0 @@ -File Type: Comma Delimted With Text Qualified By "'s - - -This demonstrates how to perform lower level parsing. The DataSet -class is bypassed alltogether and a buffered reader is used instead. -This sample makes use of parsing utilities which are provided through -the ParserUtils class. Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/multilinedelimitedrecord/ExecuteSample.bat =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/multilinedelimitedrecord/ExecuteSample.bat 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/multilinedelimitedrecord/ExecuteSample.bat 2006-10-16 21:19:38 UTC (rev 63) @@ -1,2 +0,0 @@ -java -cp ./;../../pzFileReader2_2_2.jar;../../lib/jdom.jar DelimitedMultiLine -pause \ No newline at end of file Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/multilinedelimitedrecord/README.txt =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/multilinedelimitedrecord/README.txt 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/multilinedelimitedrecord/README.txt 2006-10-16 21:19:38 UTC (rev 63) @@ -1,11 +0,0 @@ -File Type: Comma Delimted With Text Qualified By "'s - - -This sample dynamically reads the column names from the DataSet and evaluates -the values of each column. Making use of the getColumns() method. - -This sample also re-orders the file by CITY ASC, LASTNAME DESC - - -There have also been " 's and , 's added to the text on one of the records -to show the parsing abilities of the API. Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/numericsanddates/ExecuteSample.bat =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/numericsanddates/ExecuteSample.bat 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/numericsanddates/ExecuteSample.bat 2006-10-16 21:19:38 UTC (rev 63) @@ -1,2 +0,0 @@ -java -cp ./;../../pzFileReader2_2_2.jar;../../lib/jdom.jar NumericsAndDates -pause \ No newline at end of file Deleted: trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/numericsanddates/README.txt =================================================================== --- trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/numericsanddates/README.txt 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/numericsanddates/README.txt 2006-10-16 21:19:38 UTC (rev 63) @@ -1,4 +0,0 @@ -File Type: Comma Delimted With Text Qualified By "'s - -This sample demonstrates how values can be pulled out as Strings,double's,int's, -and Date's from the file. Modified: trunk/PZFileReaderSamples/src/site/index.xml =================================================================== --- trunk/PZFileReaderSamples/src/site/index.xml 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/PZFileReaderSamples/src/site/index.xml 2006-10-16 21:19:38 UTC (rev 63) @@ -20,11 +20,288 @@ </head> <body> <!-- The body of the document contains a number of sections --> - <section name="PZFileReader Introduction"> + <section name="PZFileReader Examples"> <p>Check out the <a href="apidocs/index.html">UML diagrams here</a></p> <p>Also look at the <a href="maven-reports.html">Project Reports</a> menu on the left for project specific items, unit tests, QA etc.</p> - </section> + + <subsection name="The Examples"> + <p>All examples are in the com.pz.reader.examples sub-directories. Here is the list:</p> + <ol> + <li>...createsamplecsv.<a href="#CSVTestFileCreator">CSVTestFileCreator</a>.java Create sample CSV</li> + <li>...csvheaderandtrailer.<a href="#CSVHeaderAndTrailer">CSVHeaderAndTrailer</a>.java This shows the ability to parse header and trailer records out of a file.</li> + <li>...csvperformancetest.<a href="#CSVPerformanceTest">CSVPerformanceTest</a>.java Create sample CSV</li> + <li>...delimitedcolumnnamesinfile.<a href="#DelimitedColumnNamesInFile">DelimitedColumnNamesInFile</a>.java Create sample CSV</li> + <li>...delimiteddynamiccolumns.<a href="#DelimitedWithPZMap">DelimitedWithPZMap</a>.java Create sample CSV</li> + <li>...delimiteddynamiccolumnswitherrors.<a href="#DelimitedWithPZMapErrors">DelimitedWithPZMapErrors</a>.java Create sample CSV</li> + <li>...exporttoexcel.<a href="#DelimitedFileExportToExcel">DelimitedFileExportToExcel</a>.java Create sample CSV</li> + <li>...fixedlengthdynamiccolumns.<a href="#FixedLengthWithPZMap">FixedLengthWithPZMap</a>.java Create sample CSV</li> + <li>...fixedlengthheaderandtrailer.<a href="#FixedLengthHeaderAndTrailer">FixedLengthHeaderAndTrailer</a>.java Create sample CSV</li> + <li>...largedataset.delimiteddynamiccolumns.<a href="#DelimitedWithPZMap2">DelimitedWithPZMap</a>.java Create sample CSV</li> + <li>...largedataset.fixedlengthdynamiccolumns.<a href="#FixedLengthWithPZMap2">FixedLengthWithPZMap</a>.java Create sample CSV</li> + <li>...largedataset.largecsvperformancetest.<a href="#CSVLarge">CSVLarge</a>.java Create sample CSV</li> + <li>...lowlevelparse.<a href="#LowLevelParse">LowLevelParse</a>.java Create sample CSV</li> + <li>...multilinedelimitedrecord.<a href="#DelimitedMultiLine">DelimitedMultiLine</a>.java Create sample CSV</li> + <li>...numericsanddates.<a href="#NumericsAndDates">NumericsAndDates</a>.java Create sample CSV</li> + </ol> + </subsection> + <subsection name="CSVTestFileCreator"><a name="CSVTestFileCreator"/> +<div clas="code"><pre> +This utility can be used to create a sample CSV file for testing the parser. In the +ExecuterSample.bat file, there are 2 parameters. + +param1 = # cols to make | param2 = #rows to make + +The following line would create a csv file with 10 columns and 100000 rows: + +java -cp ./ CSVTestFileCreator 10 100000 +</pre></div> + </subsection> + + + <subsection name="CSVHeaderAndTrailer"><a name="CSVHeaderAndTrailer"/> +<div clas="code"><pre> +File Type: Comma Delimted With Text Qualified By "'s + +This shows the ability to parse header and trailer records out of a file. + +java -cp ./;../../pzfilereader-2.2.0.jar;../../lib/jdom.jar com.pz.reader.examples.csvheaderandtrailer.CSVHeaderAndTrailer +</pre></div> +</subsection> + +<subsection name="CSVPerformanceTest"><a name="CSVPerformanceTest"/> +<div clas="code"><pre> +File Type: Must Be A CSV file + +This is meant to be a performance test. The sample file contains 10 columns and 100,000 rows. + + +Performance Tests +------------------------------ + Machine Specs: P4 1.7 GHZ 256MB RAM | Parse Time: 45-48 secs. + Machine Specs: P4 2.9 GHZ 1 GB RAM | Parse Time: 23-25 secs. + +Feel free to post additional performance tests in the SF forums :) + + +There is a settings.properties file in this directory. This file has 2 different options: + +verbose - can be set to true/false. If set to true, the data in the file will be ran to the screen +after the parse. There is a 2 second pause before data start to get spit to the screen. This is +to allow the user to see the total time it took to parse the file. + +csvFile - set this to the path of the CSV file to be read in. Feel free to test this against your own +CSV files. + + +This particular example uses the first record in the file for the column names. + +Depending on the size of the file being parsed, the -Xmx parameter may need to be adjusted. This +is the max memory setting for the JVM to use. This parameter is set in the ExecuteSample.bat file +and is currently set to 128mb. This needs to be adjusted if OutOfMemory errors occur. + + +java -Xmx712m -Xms712m -cp ./;../../pzfilereader-2.2.0.jar;../../lib/jdom.jar;../../lib/jxl.jar com.pz.reader.examples.csvperformancetest.CSVPerformanceTest +</pre></div> +</subsection> + +<subsection name="DelimitedColumnNamesInFile"><a name="DelimitedColumnNamesInFile"/> +<div clas="code"><pre> +File Type: Comma Delimted With Text Qualified By "'s + +This sample uses the column names which are contained in the CSV file instead +of relying on a mapping to tell the parser what the column names are. + +This sample also re-orders the file by CITY ASC, LASTNAME DESC + + +There have also been " 's and , 's added to the text on one of the records +to show the parsing abilities of the API. + +java -cp ./;../../pzfilereader-2.2.0.jar;../../lib/jdom.jar com.pz.reader.examples.delimitedcolumnnamesinfile.DelimitedColumnNamesInFile +</pre></div> +</subsection> + +<subsection name="DelimitedWithPZMap"><a name="DelimitedWithPZMap"/> +<div clas="code"><pre> +File Type: Comma Delimted With Text Qualified By "'s + + +This sample dynamically reads the column names from the DataSet and evaluates +the values of each column. Making use of the getColumns() method. + +This sample also re-orders the file by CITY ASC, LASTNAME DESC + + +There have also been " 's and , 's added to the text on one of the records +to show the parsing abilities of the API. +java -cp ./;../../pzfilereader-2.2.0.jar;../../lib/jdom.jar com.pz.reader.examples.delimiteddynamiccolumns.DelimitedWithPZMap +</pre></div> +</subsection> + +<subsection name="DelimitedWithPZMapErrors"><a name="DelimitedWithPZMapErrors"/> +<div clas="code"><pre> +File Type: Comma Delimted With Text Qualified By "'s + +This sample contains errors in the PEOPLE-CommaDelimitedWithQualifier.txt +2 Lines in the file contain more columns then we have declared in the +PEOPLE-Delimited.pzmap.xml +This demonstrates how to check for errors that happened while reading the file. + + +This sample dynamically reads the column names from the DataSet and evaluates +the values of each column. Making use of the getColumns() method. + +This sample also re-orders the file by CITY ASC, LASTNAME DESC + + +There have also been " 's and , 's added to the text on one of the records +to show the parsing abilities of the API. + +java -cp ./;../../pzfilereader-2.2.0.jar;../../lib/jdom.jar com.pz.reader.examples.delimiteddynamiccolumnswitherrors.DelimitedWithPZMapErrors +</pre></div> +</subsection> + +<subsection name="DelimitedFileExportToExcel"><a name="DelimitedFileExportToExcel"/> +<div clas="code"><pre> +File Type: Comma Delimted With Text Qualified By "'s + +This sample re-orders the file by CITY ASC, LASTNAME DESC and exports to "MyExcelExport.xls" + + +There have also been " 's and , 's added to the text on one of the records +to show the parsing abilities of the API. +java -cp ./;../../pzfilereader-2.2.0.jar;../../lib/jdom.jar com.pz.reader.examples.exporttoexcel.DelimitedFileExportToExcel +</pre></div> +</subsection> + +<subsection name="FixedLengthWithPZMap"><a name="FixedLengthWithPZMap"/> +<div clas="code"><pre> +File Type: Fixed Width Text + +This sample dynamically reads the column names from the DataSet and evaluates +the values of each column. Making use of the getColumns() method. + +This sample also re-orders the file by CITY ASC, LASTNAME DESC +java -cp ./;../../pzfilereader-2.2.0.jar;../../lib/jdom.jar com.pz.reader.examples.fixedlengthdynamiccolumns.FixedLengthWithPZMap +</pre></div> +</subsection> + +<subsection name="FixedLengthHeaderAndTrailer"><a name="FixedLengthHeaderAndTrailer"/> +<div clas="code"><pre> +File Type: Fixed Width Text + +This sample dynamically reads the column names from the DataSet and evaluates +the values of each column. Making use of the getColumns() method. + +This sample also re-orders the file by CITY ASC, LASTNAME DESC + +java -cp ./;../../pzfilereader-2.2.0.jar;../../lib/jdom.jar com.pz.reader.examples.fixedlengthheaderandtrailer.FixedLengthHeaderAndTrailer +</pre></div> +</subsection> + +<subsection name="DelimitedWithPZMap"><a name="DelimitedWithPZMap2"/> +<div clas="code"><pre> +File Type: Comma Delimted With Text Qualified By "'s + + +This sample dynamically reads the column names from the LargeDataSet and evaluates +the values of each column. Making use of the getColumns() method. + + +There have also been " 's and , 's added to the text on one of the records +to show the parsing abilities of the API. + +java -cp ./;../../pzfilereader-2.2.0.jar;../../lib/jdom.jar com.pz.reader.examples.largeset.delimiteddynamiccolumns.DelimitedWithPZMap +</pre></div> +</subsection> + +<subsection name="FixedLengthWithPZMap"><a name="FixedLengthWithPZMap2"/> +<div clas="code"><pre> +File Type: Fixed Width Text + +This sample dynamically reads the column names from the DataSet and evaluates +the values of each column. Making use of the getColumns() method. + +This sample also re-orders the file by CITY ASC, LASTNAME DESC + +java -cp ./;../../pzfilereader-2.2.0.jar;../../lib/jdom.jar com.pz.reader.examples.largeset.fixedlengthdynamiccolumns.FixedLengthWithPZMap +</pre></div> +</subsection> + +<subsection name="CSVLarge"><a name="CSVLarge"/> +<div clas="code"><pre> +File Type: Must Be A CSV file + +This is meant to be a performance test for large files. This will make use of the new LargeDataSet class introduced +in 2.2. A println will be run to the screen for every 2500 records parsed and looped through in the file. + +This class differs from the DataSet class where the file is no longer read into memory. + +There is a settings.properties file in this directory. + +csvFile - set this to the path of the CSV file to be read in. Feel free to test this against your own +CSV files. + + +This particular example uses the first record in the file for the column names. + +Depending on the size of the file being parsed, the -Xmx parameter may need to be adjusted. This +is the max memory setting for the JVM to use. This parameter is set in the ExecuteSample.bat file +and is currently set to 128mb. This needs to be adjusted if OutOfMemory errors occur. + + +java -cp ./;../../pzfilereader-2.2.0.jar;../../lib/jdom.jar com.pz.reader.examples.largeset.largecsvperformancetest.CSVLarge +</pre></div> +</subsection> + +<subsection name="LowLevelParse"><a name="LowLevelParse"/> +<div clas="code"><pre> +File Type: Comma Delimted With Text Qualified By "'s + + +This demonstrates how to perform lower level parsing. The DataSet +class is bypassed alltogether and a buffered reader is used instead. +This sample makes use of parsing utilities which are provided through +the ParserUtils class. + +java -cp ./;../../pzfilereader-2.2.0.jar;../../lib/jdom.jar com.pz.reader.examples.lowlevel.LowLevelParse +</pre></div> +</subsection> + +<subsection name="DelimitedMultiLine"><a name="DelimitedMultiLine"/> +<div clas="code"><pre> +File Type: Comma Delimted With Text Qualified By "'s + + +This sample dynamically reads the column names from the DataSet and evaluates +the values of each column. Making use of the getColumns() method. + +This sample also re-orders the file by CITY ASC, LASTNAME DESC + + +There have also been " 's and , 's added to the text on one of the records +to show the parsing abilities of the API. + +java -cp ./;../../pzfilereader-2.2.0.jar;../../lib/jdom.jar com.pz.reader.examples.multilinedelimitedrecord.DelimitedMultiLine +</pre></div> +</subsection> + +<subsection name="NumericsAndDates"><a name="NumericsAndDates"/> +<div clas="code"><pre> +File Type: Comma Delimted With Text Qualified By "'s + +This sample demonstrates how values can be pulled out as Strings,double's,int's, +and Date's from the file. + +java -cp ./;../../pzfilereader-2.2.0.jar;../../lib/jdom.jar com.pz.reader.examples.numericsanddates.NumericsAndDates +</pre></div> +</subsection> + + +</section> + + </body> </document> \ No newline at end of file Added: trunk/common-build/lib/README =================================================================== --- trunk/common-build/lib/README (rev 0) +++ trunk/common-build/lib/README 2006-10-16 21:19:38 UTC (rev 63) @@ -0,0 +1,5 @@ +This dir contains build & runtime dependent files + +jdom.jar - required +junit.jar - optional used for unit testing +jxl.jar - optional used for excel integration \ No newline at end of file Added: trunk/common-build/lib/jdom.jar =================================================================== (Binary files differ) Property changes on: trunk/common-build/lib/jdom.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/common-build/lib/jexcelapi license.txt =================================================================== --- trunk/common-build/lib/jexcelapi license.txt (rev 0) +++ trunk/common-build/lib/jexcelapi license.txt 2006-10-16 21:19:38 UTC (rev 63) @@ -0,0 +1,23 @@ +/********************************************************************* +* +* Copyright (C) 2002 Andrew Khan +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; either +* version 2.1 of the License, or (at your option) any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +***************************************************************************/ + + +The LPGL license can be found here: + +http://www.gnu.org/licenses/lgpl.html \ No newline at end of file Added: trunk/common-build/lib/jxl.jar =================================================================== (Binary files differ) Property changes on: trunk/common-build/lib/jxl.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/site/features.xml =================================================================== --- trunk/src/site/features.xml (rev 0) +++ trunk/src/site/features.xml 2006-10-16 21:19:38 UTC (rev 63) @@ -0,0 +1,69 @@ +<document> + <properties> + <title>Features</title> + </properties> + <head> + <meta name="description" + content="PZFileReader offers configurable flat file CSV and fixed length parser, released under the business-friendly Apache 2.0 license." + /> + + <meta name="keywords" content="CSV, Fixed length file parser" /> + <meta name="Subject" content="Date Calculators" /> + <meta name="Copyright" content="ObjectLab Financial Ltd" /> + <meta name="Language" content="English" /> + <meta name="Designer" content="ObjectLab Financial Ltd" /> + <meta name="Distribution" content="Global" /> + <meta name="robots" content="ALL"/> + <meta name="Revisit-After" content="20 Days" /> + </head> + <body> + <!-- The body of the document contains a number of sections --> + <section name="Features"> + + <ul> + +<li>Ability to parse any delimited or fixed length file. Columns in the files are mapped through an XML document or a database table. The data can then be pulled out of the columns by referencing the column names provided in the mappings. </li> + +<li>Allows the mapping and parsing of header and trailer records. There is no limit to how many different header / trailers you can have in a file, each header / trailer type is given a unique id which can be checked for while looping through the parse results. </li> + +<li>Parser can handle records in delimited files which span multiple lines: + +<br/>ie. element, element, "element with line break +<br/>more element data +<br/>more element data +<br/>more element data" +<br/>start next rec here </li> + +<li>Implements a special class, LargeDataSet, which handles large text files. This will read large files with very low memory usage. This class should be used for file sizes > 100mb. </li> + +<li>Delimited files which have the first record containing the columns names, can be parsed using the column names in the file. </li> + +<li>The delimited parser has been tested thoroughly with Excel CSV. Qualifiers and delimiters are allowed in the text elements, with the exception that a qualifier can not be followed by a delimiter inside the text element. </li> + +<li>Ability to resort the file before looping through it. Just like an ORDER BY on an SQL statement. </li> + +<li>Handles truncated lines of data if needed (optional feature). ie. Not enough elements, or fixed length line is shorter then the what is in the mapping file. Missing columns are filled in with empties. </li> + +<li>Ability to automatically convert all data in the file to upper or lower case. </li> + +<li>Retrieve columns as Strings, Dates, Doubles, or Ints. By default, when calling getDouble() or getInt(), the parser will remove any non numeric characters to prevent exceptions. This is helps when dealing with files that contain; dollar signs, commas, etc. Strict parsing can be turned on if this is not desired. </li> + +<li>Ability to jump to the top or bottom of the file, go to an absolute position, next or previous row. </li> + +<li>Rows can be removed from the file while processing. This only removes them out of memory and does not remove them from the actual file. </li> + +<li>Column values can be changed. This is only done in memory and does not change the actual file. </li> + +<li>Error messages of errors which occurred during parsing are collected in a list. Rows which contained parsing errors are excluded when returning the data which is in the file. This list of errors can also be added to while processing the data in the file. It can be used to report all errors that happened during file processing. </li> + +<li>Delimiter parser is provided in a utility class. This can be used to parse a String of text, for users who wish to do their own low level parsing. </li> + +<li>Using mapping files to associate column names to positions in the text file provides an easy way to update a layout when there is a change without breaking the code. This is especially helpful when a new column is inserted in the middle of a file, and normally there would be a lot of substring to change :( </li> + </ul> + + + + </section> + + </body> +</document> \ No newline at end of file Modified: trunk/src/site/navigation.xml =================================================================== --- trunk/src/site/navigation.xml 2006-10-16 19:52:04 UTC (rev 62) +++ trunk/src/site/navigation.xml 2006-10-16 21:19:38 UTC (rev 63) @@ -13,6 +13,8 @@ href="multiproject/pzfilereader/index.html" /> <item name="History" href="history.html" /> + <item name="Features" + href="features.html" /> <item name="Examples" href="multiproject/pzfilereader-examples/index.html" /> <item name="JavaDoc" class="newWindow" target="_new" href="apidocs/index.html" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2006-10-16 19:53:26
|
Revision: 62 http://svn.sourceforge.net/pzfilereader/?rev=62&view=rev Author: benoitx Date: 2006-10-16 12:52:04 -0700 (Mon, 16 Oct 2006) Log Message: ----------- Add some documentation Modified Paths: -------------- trunk/PZFileReader/qalab.xml trunk/PZFileReader/src/site/index.xml trunk/PZFileReaderSamples/project.xml trunk/common-build/project.xml trunk/src/site/changes.xml trunk/src/site/index.xml trunk/src/site/navigation.xml Added Paths: ----------- trunk/src/site/documentation/ trunk/src/site/documentation/index.xml trunk/src/site/documentation/pzfilereader-manual.doc trunk/src/site/documentation/pzfilereader-manual.pdf trunk/src/site/history.xml Modified: trunk/PZFileReader/qalab.xml =================================================================== --- trunk/PZFileReader/qalab.xml 2006-10-16 16:39:11 UTC (rev 61) +++ trunk/PZFileReader/qalab.xml 2006-10-16 19:52:04 UTC (rev 62) @@ -42,7 +42,7 @@ <summaryresult date="2006-10-15" filecount="7" statvalue="20" type="findbugs"/> <summaryresult date="2006-10-15" filecount="3" statvalue="170" type="simian"/> <summaryresult date="2006-10-16" filecount="18" statvalue="32" type="checkstyle"/> - <summaryresult date="2006-10-16" filecount="3" statvalue="5" type="pmd"/> + <summaryresult date="2006-10-16" filecount="2" statvalue="4" type="pmd"/> <summaryresult date="2006-10-16" filecount="7" statvalue="16" type="findbugs"/> <summaryresult date="2006-10-16" filecount="3" statvalue="116" type="simian"/> <summaryresult date="2006-10-16" filecount="13" statvalue="17" type="cobertura-line"/> @@ -162,7 +162,7 @@ <result date="2006-10-15" statvalue="5" type="findbugs"/> <result date="2006-10-16" statvalue="9" type="checkstyle"/> <result date="2006-10-16" statvalue="3" type="findbugs"/> - <result date="2006-10-16" statvalue="21" type="cobertura-line"/> + <result date="2006-10-16" statvalue="20" type="cobertura-line"/> <result date="2006-10-16" statvalue="25" type="cobertura-branch"/> </file> <file id="com_pz_reader_LargeDataSet.java" path="com/pz/reader/LargeDataSet.java"> @@ -304,7 +304,5 @@ <result date="2006-10-16" statvalue="100" type="cobertura-branch"/> </file> <file - id="C:_project_pzfilereader_PZFileReader_src_test_java_com_test_delim_multiLine_TestCSVPerformance.java" path="C:/project/pzfilereader/PZFileReader/src/test/java/com/test/delim/multiLine/TestCSVPerformance.java"> - <result date="2006-10-16" statvalue="1" type="pmd"/> - </file> + id="C:_project_pzfilereader_PZFileReader_src_test_java_com_test_delim_multiLine_TestCSVPerformance.java" path="C:/project/pzfilereader/PZFileReader/src/test/java/com/test/delim/multiLine/TestCSVPerformance.java"/> </qalab> Modified: trunk/PZFileReader/src/site/index.xml =================================================================== --- trunk/PZFileReader/src/site/index.xml 2006-10-16 16:39:11 UTC (rev 61) +++ trunk/PZFileReader/src/site/index.xml 2006-10-16 19:52:04 UTC (rev 62) @@ -5,11 +5,10 @@ </properties> <head> <meta name="description" - content="PZFIle Reader Apache 2.0 license." + content="PZFileReader offers configurable flat file CSV and fixed length parser, released under the business-friendly Apache 2.0 license." /> - <meta name="keywords" - content="CSV, Fixed length file parser" /> + <meta name="keywords" content="CSV, Fixed length file parser" /> <meta name="Subject" content="Fixed Length parser" /> <meta name="Copyright" content="ObjectLab Financial Ltd" /> <meta name="Language" content="English" /> Modified: trunk/PZFileReaderSamples/project.xml =================================================================== --- trunk/PZFileReaderSamples/project.xml 2006-10-16 16:39:11 UTC (rev 61) +++ trunk/PZFileReaderSamples/project.xml 2006-10-16 19:52:04 UTC (rev 62) @@ -60,6 +60,16 @@ <exclude>**/Abstract*.java</exclude> </excludes> </unitTest> + <resources> + <resource> + <directory>src/main/java</directory> + <includes> + <include>**/*.txt</include> + <include>**/*.xml</include> + </includes> + <filtering>false</filtering> + </resource> + </resources> </build> </project> Modified: trunk/common-build/project.xml =================================================================== --- trunk/common-build/project.xml 2006-10-16 16:39:11 UTC (rev 61) +++ trunk/common-build/project.xml 2006-10-16 19:52:04 UTC (rev 62) @@ -136,12 +136,14 @@ <artifactId>jdom</artifactId> <version>1.0</version> <type>jar</type> + <url>http://www.jdom.org</url> </dependency> <dependency> <groupId>jexcelapi</groupId> <artifactId>jxl</artifactId> <version>2.4.2</version> <type>jar</type> + <url>http://sourceforge.net/projects/jexcelapi</url> </dependency> </dependencies> @@ -159,7 +161,7 @@ <report>maven-simian-plugin</report> <report>maven-cobertura-plugin</report> <report>maven-qalab-plugin</report> - <report>maven-javadoc-plugin</report> + <report>maven-ydoc-plugin</report> <report>maven-jdepend-plugin</report> <report>maven-faq-plugin</report> <report>maven-junit-report-plugin</report> Modified: trunk/src/site/changes.xml =================================================================== --- trunk/src/site/changes.xml 2006-10-16 16:39:11 UTC (rev 61) +++ trunk/src/site/changes.xml 2006-10-16 19:52:04 UTC (rev 62) @@ -7,9 +7,10 @@ <title>Changes</title> </properties> <body> - <release version="2.3.0" date="in svn" description="Move to Maven"> + <release version="2.3.0" date="in svn" description="Move to Maven and Subversion"> <action dev="benoitx" type="add">Move build to Maven 1.1.x and generate the entire website from the build.</action> <action dev="benoitx" type="fix">Modify code following warning by Findbugs, checkstyle and PMD.</action> + <action dev="marchy" type="add">Move to Subversion.</action> </release> <release version="2.2.2" date="2006-08-18" description="Fix"> <action dev="zepernick" type="fix">Fixed bug in LargeDataSet. Multiline delimited records were not being parsed correctly. They were showing Added: trunk/src/site/documentation/index.xml =================================================================== --- trunk/src/site/documentation/index.xml (rev 0) +++ trunk/src/site/documentation/index.xml 2006-10-16 19:52:04 UTC (rev 62) @@ -0,0 +1,152 @@ +<document> + <properties> + <title>PZFileReader XML Examples</title> + </properties> + <head> + <meta name="description" + content="PZFileReader offers configurable flat file CSV and fixed length parser, released under the business-friendly Apache 2.0 license." + /> + + <meta name="keywords" + content="Open source, flat file api, csv parser, fixed length parser" /> + <meta name="Subject" content="Date Calculators" /> + <meta name="Copyright" content="ObjectLab Financial Ltd" /> + <meta name="Language" content="English" /> + <meta name="Designer" content="ObjectLab Financial Ltd" /> + <meta name="Distribution" content="Global" /> + <meta name="robots" content="ALL"/> + <meta name="Revisit-After" content="20 Days" /> + </head> + <body> + <!-- The body of the document contains a number of sections --> + <section name="XML Examples"> + + <subsection name="Delimited.pzmap.xml"> + <div class="code"> + <pre> +<?xml version="1.0"?> +<!-- DTD can be pulled from the Jar or over the web--> +<!DOCTYPE PZMAP SYSTEM "pzfilereader.dtd" > +<!--<!DOCTYPE PZMAP SYSTEM "http://pzfilereader.sourceforge.net/pzfilereader.dtd" >--> +<PZMAP> + <COLUMN name="FIRSTNAME" /> + <COLUMN name="LASTNAME" /> + <COLUMN name="ADDRESS" /> + <COLUMN name="CITY" /> + <COLUMN name="STATE" /> + <COLUMN name="ZIP" /> + +</PZMAP> + </pre> + </div> + </subsection> + + <subsection name="DelimitedWithHeaderAndTrailer.pzmap.xml"> + <div class="code"> + <pre> +<?xml version='1.0'?> +<!-- DTD can be pulled from the Jar or over the web--> +<!DOCTYPE PZMAP SYSTEM "pzfilereader.dtd" > +<!--<!DOCTYPE PZMAP SYSTEM "http://pzfilereader.sourceforge.net/pzfilereader.dtd" >--> +<PZMAP> + <RECORD id="header" indicator="H" elementNumber="1"> + <COLUMN name="RECORDINDICATOR" /> + <COLUMN name="HEADERDATA" /> + </RECORD> + <COLUMN name="FIRSTNAME" /> + <COLUMN name="LASTNAME" /> + <COLUMN name="ADDRESS" /> + <COLUMN name="CITY" /> + <COLUMN name="STATE" /> + <COLUMN name="ZIP" /> + <RECORD id="trailer" indicator="T" elementNumber="1"> + <COLUMN name="RECORDINDICATOR" /> + <COLUMN name="TRAILERDATA" /> + </RECORD> + +</PZMAP> + </pre> + </div> + </subsection> + + <subsection name="FixedLength.pzmap.xml"> + <div class="code"> + <pre> +<?xml version="1.0"?> +<!-- DTD can be pulled from the Jar or over the web--> +<!DOCTYPE PZMAP SYSTEM "pzfilereader.dtd" > +<!--<!DOCTYPE PZMAP SYSTEM "http://pzfilereader.sourceforge.net/pzfilereader.dtd" >--> +<PZMAP> + <COLUMN name="FIRSTNAME" length="35" /> + <COLUMN name="LASTNAME" length="35" /> + <COLUMN name="ADDRESS" length="100" /> + <COLUMN name="CITY" length="100" /> + <COLUMN name="STATE" length="2" /> + <COLUMN name="ZIP" length="5" /> + +</PZMAP> + </pre> + </div> + </subsection> + + <subsection name="FixedLengthWithHeaderAndTrailer.pzmap.xml"> + <div class="code"> + <pre> +<?xml version='1.0'?> +<!-- DTD can be pulled from the Jar or over the web--> +<!DOCTYPE PZMAP SYSTEM "pzfilereader.dtd" > +<!--<!DOCTYPE PZMAP SYSTEM "http://pzfilereader.sourceforge.net/pzfilereader.dtd" >--> + +<PZMAP> + <RECORD id="header" startPosition="1" endPosition="7" indicator="HEADER "> + <COLUMN name="INDICATOR" length="7" /> + <COLUMN name="HEADERDATA" length="19" /> + </RECORD> + <COLUMN name="FIRSTNAME" length="35" /> + <COLUMN name="LASTNAME" length="35" /> + <COLUMN name="ADDRESS" length="100" /> + <COLUMN name="CITY" length="100" /> + <COLUMN name="STATE" length="2" /> + <COLUMN name="ZIP" length="5" /> + <RECORD id="trailer" startPosition="1" endPosition="7" indicator="TRAILER"> + <COLUMN name="INDICATOR" length="7" /> + <COLUMN name="TRAILERDATA" length="19" /> + </RECORD> + +</PZMAP> + </pre> + </div> + </subsection> + + + <subsection name="SQLTableLayout"> + <div class="code"> + <pre> +Below is the layout for the 2 sql tables needed to map column names in a text file. +THIS IS ONLY NEEDED IF NOT USING THE PZMAP XML to map columns. + +This should work with just about any database. The contructor for the DataSet class accepts +a java.sql.Connection object if using this mapping method. + +TABLE1: + + >Table Name: DATAFILE + *Column: DATAFILE_NO - Numeric <PK> + *Column: DATAFILE_DESC - VarChar(45) - the value of this column is what needs to be passed into the + dataDefinition parameter on the DataSet constructor. + +TABLE2: + >Table Name: DATASTRUCTURE + *Column: DATASTRUCTURE_NO - Numeric <PK> + *Column: DATAFILE_NO - Numeric <FK> - Links to DATAFILE table + *Column: DATASTRUCTURE_COLUMN - VarChar(100) - Name of the column to map + *Column: DATASTRUCTURE_LENGTH - Numeric - Length of the column, ONLY APPLIES TO FIXED LENGTH FILES + *Column: DATASTRUCTURE_COL_ORDER - Numeric - Numerical ordering columns appear in file 1,2,3...etc + </pre> + </div> + </subsection> + + </section> + + </body> +</document> \ No newline at end of file Added: trunk/src/site/documentation/pzfilereader-manual.doc =================================================================== (Binary files differ) Property changes on: trunk/src/site/documentation/pzfilereader-manual.doc ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/site/documentation/pzfilereader-manual.pdf =================================================================== --- trunk/src/site/documentation/pzfilereader-manual.pdf (rev 0) +++ trunk/src/site/documentation/pzfilereader-manual.pdf 2006-10-16 19:52:04 UTC (rev 62) @@ -0,0 +1,1157 @@ +%PDF-1.4 %\xE2\xE3\xCF\xD3 +761 0 obj <</Linearized 1/L 98839/O 765/E 18715/N 18/T 83571/H [ 1831 628]>> endobj +xref +761 75 +0000000016 00000 n +0000002654 00000 n +0000001831 00000 n +0000002963 00000 n +0000003104 00000 n +0000003488 00000 n +0000003690 00000 n +0000003833 00000 n +0000003977 00000 n +0000004121 00000 n +0000004266 00000 n +0000004411 00000 n +0000004555 00000 n +0000004700 00000 n +0000004845 00000 n +0000004990 00000 n +0000005135 00000 n +0000005278 00000 n +0000005423 00000 n +0000005568 00000 n +0000005713 00000 n +0000005858 00000 n +0000006002 00000 n +0000006147 00000 n +0000006290 00000 n +0000006434 00000 n +0000006578 00000 n +0000006721 00000 n +0000006864 00000 n +0000007008 00000 n +0000007470 00000 n +0000007832 00000 n +0000008381 00000 n +0000008842 00000 n +0000008878 00000 n +0000009118 00000 n +0000009195 00000 n +0000009441 00000 n +0000009704 00000 n +0000010297 00000 n +0000010779 00000 n +0000011273 00000 n +0000011782 00000 n +0000012313 00000 n +0000012811 00000 n +0000013293 00000 n +0000013549 00000 n +0000013593 00000 n +0000014050 00000 n +0000014602 00000 n +0000017272 00000 n +0000017502 00000 n +0000017554 00000 n +0000017606 00000 n +0000017658 00000 n +0000017710 00000 n +0000017762 00000 n +0000017814 00000 n +0000017867 00000 n +0000017920 00000 n +0000017973 00000 n +0000018026 00000 n +0000018079 00000 n +0000018132 00000 n +0000018185 00000 n +0000018238 00000 n +0000018291 00000 n +0000018344 00000 n +0000018397 00000 n +0000018450 00000 n +0000018503 00000 n +0000018556 00000 n +0000018609 00000 n +0000018662 00000 n +0000002459 00000 n +trailer +<</Size 836/Prev 83559/XRefStm 2459/Root 762 0 R/Info 90 0 R/ID[<7990763939504b36a91718126092912b><3b5ae8d6b530524aa6e1cc876db48a48>]>> +startxref +0 +%%EOF + +763 0 obj<</Length 534/Filter/FlateDecode/C 656/L 640/O 624/S 458>>stream +x\xDAb```b`\xE0\x94g`g``Ve\xE0c@ |
From: <be...@us...> - 2006-10-16 17:41:04
|
Revision: 61 http://svn.sourceforge.net/pzfilereader/?rev=61&view=rev Author: benoitx Date: 2006-10-16 09:39:11 -0700 (Mon, 16 Oct 2006) Log Message: ----------- Suggest that we aim the next release at 2.3 or 3.0, make our maven changes and modify the package structure for iBiblio.org (that will also have an impact on Maven build). Modified Paths: -------------- trunk/src/site/changes.xml Modified: trunk/src/site/changes.xml =================================================================== --- trunk/src/site/changes.xml 2006-10-16 16:21:49 UTC (rev 60) +++ trunk/src/site/changes.xml 2006-10-16 16:39:11 UTC (rev 61) @@ -7,6 +7,10 @@ <title>Changes</title> </properties> <body> + <release version="2.3.0" date="in svn" description="Move to Maven"> + <action dev="benoitx" type="add">Move build to Maven 1.1.x and generate the entire website from the build.</action> + <action dev="benoitx" type="fix">Modify code following warning by Findbugs, checkstyle and PMD.</action> + </release> <release version="2.2.2" date="2006-08-18" description="Fix"> <action dev="zepernick" type="fix">Fixed bug in LargeDataSet. Multiline delimited records were not being parsed correctly. They were showing up as errors when being parsed.</action> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2006-10-16 16:22:01
|
Revision: 60 http://svn.sourceforge.net/pzfilereader/?rev=60&view=rev Author: benoitx Date: 2006-10-16 09:21:49 -0700 (Mon, 16 Oct 2006) Log Message: ----------- Converted changes.txt to the changes.xml that will be automatically included in the website generation. Only this file should be maintained. Modified Paths: -------------- trunk/PZFileReader/qalab.xml Added Paths: ----------- trunk/src/site/changes.xml trunk/src/site/pzfilereader.dtd Removed Paths: ------------- trunk/PZFileReader/Changes.txt Deleted: trunk/PZFileReader/Changes.txt =================================================================== --- trunk/PZFileReader/Changes.txt 2006-10-16 15:35:27 UTC (rev 59) +++ trunk/PZFileReader/Changes.txt 2006-10-16 16:21:49 UTC (rev 60) @@ -1,192 +0,0 @@ -Version 3.0 ----------------------------------- -10-13-2006 - - Chaned the pacakge structure from com.pz.reader to net.sf.pzfilereader. This was done per the requirments - of ibiblio. - -Version 2.2.2 ----------------------------------- -8-18-2006 - - Fixed bug in LargeDataSet. Multiline delimited records were not being parsed correctly. They were showing - up as errors when being parsed. - -Version 2.2.1 ----------------------------------- -8-12-2006 - - Fixed a bug in the delimited parser. Errors were caused by multiple column multi-line records. Special thanks - to Malcolm Dobson for bringing the bug to attention and providing the fix. - -Version 2.2.0 ----------------------------------- -06-11-2006 - - When using column names out of the CSV file 2 input streams were being created. One to read the file and - the other to get the column names. This has been reduced to one. - - - Added a new constructor to have the ability to provide an InputStream when reading columns from the file. - - - Added a LargeDataSet class. This should be used to read large files. It provides the ability to read large - files without reading them into memory. The following methods are not applicable for this class; - previous(), writeToExcel, orderRows(), absolute(), remove(), getIndex(), goBottom(), goTop(), - setValue(). An exception will be thrown if these are called. - -05-27-2006 - - Added the ability to specify Header, Trailer, or other records which can be uniquly identified by a piece - of data on the record. These get mapped to their own set of column names seperate from the detail records. - See the documentation included in the download for details on the new options in the mapping file. - - - Added isRecordID(String) method. This can be used to see if the record being processed belongs to a particular - <RECORD> mapping in the xml file. This will need to be used if you have differnt column names mapped to different - record types. ie header, trailer, detail, etc - - - Added setDebug(boolean) to PZMapParser class. When flagged true, the Parser will spit the results of the XML - parse to the console. - -05-29-2006 - - Added 2 new samples; CSVHeaderAndTrailer, FixedLengthHeaderAndTrailer - - - -Version 2.1.0 ----------------------------------- -A VERY Special Thanks to Roland Klein for contributing the following enchancements: - - Ability to read a file from an InputStream, File object support still exists. This enhancement makes pzfilereader - Java Web Start friendly :) - - - Added a method in ParserUtils to create an InputStream from a File object. - - - Changed all ArrayLists and Vectors to List objects. This affects the getErrors() method which was returning - a Vector. This may potentially cause compilation errors if migrating from a previous version. - -02-26-2006 - - Implemented Roland's changed in cvs HEAD - - - Removed constructors depricated in 2.0.0 - - - Added ability to parse delimited file which have records spanning multiple lines in the file. The element - which is breaking to the next line must be qualified. The data can be qualified with any char, a double quote - is used in the example. - - ie. element, element, "element with line break - more element data - more element data - more element data" - start next rec here - - - Begining to write some simple Junit tests under com.test.* These will be excluded from the production jar. - - - Added getRowCount() method. This returns the total amount of rows parsed from the file. Rows which had errors - during the parse are excluded from this count and are added to the error collection. - - - Added getReaderVersion() method. This will return a String representation for the pzFileReader version being used. - -05-10-2006 - - Added ability to transform a DataSet into excel. This utilizes JExcelApi which can be found here: - http://sourceforge.net/projects/jexcelapi - - The jxl.jar has been included in the download for your convience and must be on the classpath if using this - new method --> writeToExcel(File) in the DataSet class - - - Changed examples to work with 2.1.0. Some examples still refered to depricated constructors from 2.0.0 which have - been removed in this version. - - - Added 2 new examples to demonstrate the export to Excel and the parsing of multiline records. - - - Updated Java Docs - -Version 2.0.0 ----------------------------------- -11-27-2005 - - Re-coded the way the MetaData was being stored. It was being duplicated for every row in the file. It is now only being stored - once for the entire file. This will drastically reduce memory usage. - - - Created a ParserUtils class. This class can be used to perform low level reads if needed (no mapping file required). - For now, this change only applies to delimited files. - - - Changed the delimited file parser to use a StringBuffer. It was performing a lot of String concatinations which could have been - bogging down performance, and creating un-necessary overhead. - -12-03-2005 - -created ANT build build file, and published to CVS - - -Removed the use of the Column object. This was able to cut down on the parse time. - - -Add patch provided by Luke Driscoll [1371162]. This provides 2 new constructors for fixed length files. There is a boolean - that can now be passed which will tell the parser to allow lines which are shorter then the allowed line length for a record. - Missing columns will be filled in with empties. - -12-22-2005 - - The following objects in the DataSet are now public; rows, errors, columnMD, empty constructor. - This allows for the DataSet class to be extended if needed to provide custom functionality. - -12-26-2005 - - Took patch [1371162] a step further and also implemented for delimited files. If the row is missing any columns, the parser - will automatically add the columns in as empty's. This functionality happens only when the handleShortLines parameter is set - to true. - - - Revamped user documenation. The user documenation is now much more detailed. User documentation and Java Docs are now - included with the distribution instead of having them in seperate downloads. - - -Version 1.0.5 ----------------------------------- -9-1-2005 - -Fixed bug in delimited parse. If the last column of the last column of the file was empty, the row was being logged to the - "errors" collection. Thank you very much to Luke Driscoll who found this bug and submitted the patch. See bug - [ 1275910 ] CSV File with blank last column, for more information. - - - While fixing bug 1275910, a couple of other bugs were brought to light. Spaces before or after the delimiter with a text qualifier - was breaking the parse. Example...assuming comma as delimter and double quote as the text qualifier. "value1" , "value2" ,"value" - -10-1-2005 - -Added new method, freeMemory(), when called, the DataSet is cleared. - - -Updated examples and JavaDocs. - -Version 1.0.4 ------------------------------------ -7-20-2005 - -Fixed bug in delimited parse. If parsing a delimited file with text qualifiers, and the last column of a - line had hard spaces at the end, a string out of bounds exception was being thrown. - - -Added setStrictNumericParse(boolean) method. This is defaulted to false. When calling getDouble or getInt - on a column, all non numeric chars will be striped before performing the parse. If the column is empty after the strip, it will be returned as 0. Setting this to true will parse all numeric values as is. -Version 1.0.3 ------------------------------------ -2-5-2005 - -added methods to set data in DataSet to all lower or all upper case setLowerCase(), setUpperCase() - - -Changed the OrderBy class to make sure the elements being compared were the same case, so as not to make - case a factor when comparing. If they are not the same case elements are converted to lower before comparing. - - -Added setLowerCase() and setUpperCase() to Java Docs - - -Added JSP example to samples - - -Version 1.0.2 ------------------------------------ -1-27-2005 - - -Changed parsing logic for delimited files with text qualifiers. The parser will now parse lines that are qualified - and not qualified. For example: - "here",1234,"test",50,test - This will now parse into 5 seperate columns. However if the text contains a delimiter or seperator inside the text, it must be qualified to work correctly. - - - -Version 1.0.1 ------------------------------------ - -1-23-2005: - -Fixed bug in delimted parse. If no elements were found - in a line, a string index out of bounds exception was thrown. - - -Added getDate(String,SimpleDateFormat). By default, the current getDate(String) method - was expecting the date in yyyyMMdd format. This method allows for another date format to be - specified. This format should match the format in the text file. If you would like to change the - formating of the date after it is returned from the DataSet, you can use SimpleDateFormat.format(Date) - - -Corrected javadocs for the getDate methods. Had return type of double, changed to Date. - - -Added samples - Modified: trunk/PZFileReader/qalab.xml =================================================================== --- trunk/PZFileReader/qalab.xml 2006-10-16 15:35:27 UTC (rev 59) +++ trunk/PZFileReader/qalab.xml 2006-10-16 16:21:49 UTC (rev 60) @@ -42,7 +42,7 @@ <summaryresult date="2006-10-15" filecount="7" statvalue="20" type="findbugs"/> <summaryresult date="2006-10-15" filecount="3" statvalue="170" type="simian"/> <summaryresult date="2006-10-16" filecount="18" statvalue="32" type="checkstyle"/> - <summaryresult date="2006-10-16" filecount="2" statvalue="4" type="pmd"/> + <summaryresult date="2006-10-16" filecount="3" statvalue="5" type="pmd"/> <summaryresult date="2006-10-16" filecount="7" statvalue="16" type="findbugs"/> <summaryresult date="2006-10-16" filecount="3" statvalue="116" type="simian"/> <summaryresult date="2006-10-16" filecount="13" statvalue="17" type="cobertura-line"/> @@ -303,4 +303,8 @@ <result date="2006-10-15" statvalue="34" type="checkstyle"/> <result date="2006-10-16" statvalue="100" type="cobertura-branch"/> </file> + <file + id="C:_project_pzfilereader_PZFileReader_src_test_java_com_test_delim_multiLine_TestCSVPerformance.java" path="C:/project/pzfilereader/PZFileReader/src/test/java/com/test/delim/multiLine/TestCSVPerformance.java"> + <result date="2006-10-16" statvalue="1" type="pmd"/> + </file> </qalab> Added: trunk/src/site/changes.xml =================================================================== --- trunk/src/site/changes.xml (rev 0) +++ trunk/src/site/changes.xml 2006-10-16 16:21:49 UTC (rev 60) @@ -0,0 +1,163 @@ +<?xml version="1.0"?> +<!-- + --> + +<document> + <properties> + <title>Changes</title> + </properties> + <body> + <release version="2.2.2" date="2006-08-18" description="Fix"> + <action dev="zepernick" type="fix">Fixed bug in LargeDataSet. Multiline delimited records were not being parsed correctly. They were showing + up as errors when being parsed.</action> + </release> + <release version="2.2.1" date="2006-08-12" description="Fix"> + <action dev="zepernick" type="fix">Fixed a bug in the delimited parser. Errors were caused by multiple column multi-line records. Special thanks + to Malcolm Dobson for bringing the bug to attention and providing the fix.</action> + </release> + <release version="2.2.0" date="2006-06-11" description="Fix"> + <action dev="zepernick" type="fix">When using column names out of the CSV file 2 input streams were being created. One to read the file and + the other to get the column names. This has been reduced to one.</action> + <action dev="zepernick" type="add">Added a new constructor to have the ability to provide an InputStream when reading columns from the file.</action> + <action dev="zepernick" type="add">Added a LargeDataSet class. This should be used to read large files. It provides the ability to read large + files without reading them into memory. The following methods are not applicable for this class; + previous(), writeToExcel, orderRows(), absolute(), remove(), getIndex(), goBottom(), goTop(), + setValue(). An exception will be thrown if these are called.</action> + <action dev="zepernick" type="add">Added the ability to specify Header, Trailer, or other records which can be uniquly identified by a piece + of data on the record. These get mapped to their own set of column names seperate from the detail records. + See the documentation included in the download for details on the new options in the mapping file. + </action> + <action dev="zepernick" type="add">Added setDebug(boolean) to PZMapParser class. When flagged true, the Parser will spit the results of the XML + parse to the console + </action> + <action dev="zepernick" type="add">Added 2 new samples; CSVHeaderAndTrailer, FixedLengthHeaderAndTrailer.</action> + </release> + + <release version="2.1.0" date="2006-02-26" description="Maintenance"> + <action dev="zepernick" type="fix">A VERY Special Thanks to Roland Klein for contributing the following enchancements: + <br/>- Ability to read a file from an InputStream, File object support still exists. This enhancement makes pzfilereader + Java Web Start friendly :) + + <br/>- Added a method in ParserUtils to create an InputStream from a File object. + + <br/>- Changed all ArrayLists and Vectors to List objects. This affects the getErrors() method which was returning + a Vector. This may potentially cause compilation errors if migrating from a previous version..</action> + <action dev="zepernick" type="add">Implemented Roland's changed in cvs HEAD</action> + <action dev="zepernick" type="fix">Removed constructors deprecated in 2.0.0</action> + <action dev="zepernick" type="add">Added ability to parse delimited file which have records spanning multiple lines in the file. The element + which is breaking to the next line must be qualified. The data can be qualified with any char, a double quote + is used in the example. + + ie. element, element, "element with line break + more element data + more element data + more element data" + start next rec here + </action> + <action dev="zepernick" type="add">Begining to write some simple Junit tests under com.test.* These will be excluded from the production jar. + </action> + <action dev="zepernick" type="add">Added getRowCount() method. This returns the total amount of rows parsed from the file. Rows which had errors + during the parse are excluded from this count and are added to the error collection. + </action> + <action dev="zepernick" type="add">Added getReaderVersion() method. This will return a String representation for the pzFileReader version being used. + </action> + <action dev="zepernick" type="add">Added ability to transform a DataSet into excel. This utilizes JExcelApi which can be found here: + http://sourceforge.net/projects/jexcelapi. The jxl.jar has been included in the download for your convience and must be on the classpath if using this + new method --> writeToExcel(File) in the DataSet class + </action> + <action dev="zepernick" type="add">Changed examples to work with 2.1.0. Some examples still refered to depricated constructors from 2.0.0 which have + been removed in this version. + </action> + <action dev="zepernick" type="add">Added 2 new examples to demonstrate the export to Excel and the parsing of multiline records. + </action> + <action dev="zepernick" type="add">Updated Java Docs. + </action> + </release> + + <release version="2.0.0" date="2005-11-27" description="Maintenance"> + <action dev="zepernick" type="add">Re-coded the way the MetaData was being stored. It was being duplicated for every row in the file. It is now only being stored + once for the entire file. This will drastically reduce memory usage. + </action> + <action dev="zepernick" type="add">Created a ParserUtils class. This class can be used to perform low level reads if needed (no mapping file required). + For now, this change only applies to delimited files. + </action> + <action dev="zepernick" type="add">Changed the delimited file parser to use a StringBuffer. It was performing a lot of String concatinations which could have been + bogging down performance, and creating un-necessary overhead. + </action> + <action dev="zepernick" type="add">created ANT build build file, and published to CVS + </action> + <action dev="zepernick" type="add">Removed the use of the Column object. This was able to cut down on the parse time. + </action> + <action dev="zepernick" type="add">Add patch provided by Luke Driscoll [1371162]. This provides 2 new constructors for fixed length files. There is a boolean + that can now be passed which will tell the parser to allow lines which are shorter then the allowed line length for a record. + Missing columns will be filled in with empties. + </action> + <action dev="zepernick" type="add">The following objects in the DataSet are now public; rows, errors, columnMD, empty constructor. + This allows for the DataSet class to be extended if needed to provide custom functionality. + </action> + <action dev="zepernick" type="add">Took patch [1371162] a step further and also implemented for delimited files. If the row is missing any columns, the parser + will automatically add the columns in as empty's. This functionality happens only when the handleShortLines parameter is set + to true. + </action> + <action dev="zepernick" type="add">Revamped user documenation. The user documenation is now much more detailed. User documentation and Java Docs are now + included with the distribution instead of having them in seperate downloads. + </action> + </release> + <release version="1.0.5" date="2005-10-01" description="Maintenance"> + <action dev="zepernick" type="fix">Fixed bug in delimited parse. If the last column of the last column of the file was empty, the row was being logged to the + "errors" collection. Thank you very much to Luke Driscoll who found this bug and submitted the patch. See bug + [ 1275910 ] CSV File with blank last column, for more information. + </action> + <action dev="zepernick" type="fix">While fixing bug 1275910, a couple of other bugs were brought to light. Spaces before or after the delimiter with a text qualifier + was breaking the parse. Example...assuming comma as delimter and double quote as the text qualifier. "value1" , "value2" ,"value" + </action> + <action dev="zepernick" type="add">Added new method, freeMemory(), when called, the DataSet is cleared. + </action> + <action dev="zepernick" type="add">Updated examples and JavaDocs. + </action> + </release> + <release version="1.0.4" date="2005-07-20" description="Maintenance"> + <action dev="zepernick" type="fix">Fixed bug in delimited parse. If parsing a delimited file with text qualifiers, and the last column of a + line had hard spaces at the end, a string out of bounds exception was being thrown. + </action> + <action dev="zepernick" type="fix">Added setStrictNumericParse(boolean) method. This is defaulted to false. When calling getDouble or getInt + on a column, all non numeric chars will be striped before performing the parse. If the column is empty after the strip, it will be returned as 0. Setting this to true will parse all numeric values as is. + </action> + </release> + + <release version="1.0.3" date="2005-05-02" description="Maintenance"> + <action dev="zepernick" type="add">added methods to set data in DataSet to all lower or all upper case setLowerCase(), setUpperCase() + </action> + <action dev="zepernick" type="add">Changed the OrderBy class to make sure the elements being compared were the same case, so as not to make + case a factor when comparing. If they are not the same case elements are converted to lower before comparing. + </action> + <action dev="zepernick" type="add">Added setLowerCase() and setUpperCase() to Java Docs + </action> + <action dev="zepernick" type="add">Added JSP example to samples + </action> + </release> + + <release version="1.0.2" date="2005-01-27" description="Maintenance"> + <action dev="zepernick" type="add">Changed parsing logic for delimited files with text qualifiers. The parser will now parse lines that are qualified + and not qualified. For example: + <br/>"here",1234,"test",50,test + <br/>This will now parse into 5 seperate columns. However if the text contains a delimiter or seperator inside the text, it must be qualified to work correctly. + </action> + </release> + + <release version="1.0.1" date="2005-01-23" description="Maintenance"> + <action dev="zepernick" type="fix">Fixed bug in delimted parse. If no elements were found in a line, a string index out of bounds exception was thrown. + </action> + <action dev="zepernick" type="fix">Added getDate(String,SimpleDateFormat). By default, the current getDate(String) method + was expecting the date in yyyyMMdd format. This method allows for another date format to be + specified. This format should match the format in the text file. If you would like to change the + formating of the date after it is returned from the DataSet, you can use SimpleDateFormat.format(Date) + </action> + <action dev="zepernick" type="fix">Corrected javadocs for the getDate methods. Had return type of double, changed to Date. + </action> + <action dev="zepernick" type="fix">Added samples + </action> + </release> + + </body> +</document> Added: trunk/src/site/pzfilereader.dtd =================================================================== --- trunk/src/site/pzfilereader.dtd (rev 0) +++ trunk/src/site/pzfilereader.dtd 2006-10-16 16:21:49 UTC (rev 60) @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!ELEMENT PZMAP (RECORD*,COLUMN+,RECORD*)> + <!ELEMENT RECORD (COLUMN+)> + <!ATTLIST RECORD id ID #REQUIRED + startPosition CDATA #IMPLIED + endPosition CDATA #IMPLIED + elementNumber CDATA #IMPLIED + indicator CDATA #REQUIRED> + <!ELEMENT COLUMN EMPTY> + <!ATTLIST COLUMN name CDATA #REQUIRED + length CDATA #IMPLIED > \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2006-10-16 15:36:39
|
Revision: 59 http://svn.sourceforge.net/pzfilereader/?rev=59&view=rev Author: benoitx Date: 2006-10-16 08:35:27 -0700 (Mon, 16 Oct 2006) Log Message: ----------- Applied the Eclipse cleanUp, organise imports and format to help reduce the Checkstyle issues, from 1696 to 32. slightly modified a few lines as well (ensured encapsulation). Modified Paths: -------------- trunk/PZFileReader/maven.xml trunk/PZFileReader/project.xml trunk/PZFileReader/qalab.xml trunk/PZFileReader/src/main/java/com/pz/reader/DataError.java trunk/PZFileReader/src/main/java/com/pz/reader/DataSet.java trunk/PZFileReader/src/main/java/com/pz/reader/LargeDataSet.java trunk/PZFileReader/src/main/java/com/pz/reader/Version.java trunk/PZFileReader/src/main/java/com/pz/reader/ordering/OrderBy.java trunk/PZFileReader/src/main/java/com/pz/reader/ordering/OrderColumn.java trunk/PZFileReader/src/main/java/com/pz/reader/structure/ColumnMetaData.java trunk/PZFileReader/src/main/java/com/pz/reader/structure/Row.java trunk/PZFileReader/src/main/java/com/pz/reader/util/ExcelTransformer.java trunk/PZFileReader/src/main/java/com/pz/reader/util/ParserUtils.java trunk/PZFileReader/src/main/java/com/pz/reader/xml/PZMapParser.java trunk/PZFileReader/src/main/java/com/pz/reader/xml/ResolveLocalDTD.java trunk/PZFileReader/src/main/java/com/pz/reader/xml/XMLRecordElement.java trunk/PZFileReader/src/site/navigation.xml trunk/PZFileReader/src/test/java/com/test/AllJunitTests.java trunk/PZFileReader/src/test/java/com/test/delim/columnInFile/DelimitedColumnNamesInFile.java trunk/PZFileReader/src/test/java/com/test/delim/columnInFile/DelimitedColumnNamesInFileTest.java trunk/PZFileReader/src/test/java/com/test/delim/multiLine/TestCSVPerformance.java trunk/PZFileReader/src/test/java/com/test/delim/tab/TabDelimited.java trunk/PZFileReader/src/test/java/com/test/delim/tab/TabDelimitedTest.java trunk/PZFileReaderSamples/maven.xml trunk/PZFileReaderSamples/project.xml trunk/PZFileReaderSamples/qalab.xml trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/createsamplecsv/CSVTestFileCreator.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvheaderandtrailer/CSVHeaderAndTrailer.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvperformancetest/CSVPerformanceTest.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimitedcolumnnamesinfile/DelimitedColumnNamesInFile.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumns/DelimitedWithPZMap.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumnswitherrors/DelimitedWithPZMapErrors.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/exporttoexcel/DelimitedFileExportToExcel.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthdynamiccolumns/FixedLengthWithPZMap.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthheaderandtrailer/FixedLengthHeaderAndTrailer.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/delimiteddynamiccolumns/DelimitedWithPZMap.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/fixedlengthdynamiccolumns/FixedLengthWithPZMap.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/largecsvperformancetest/CSVLarge.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/lowlevelparse/LowLevelParse.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/multilinedelimitedrecord/DelimitedMultiLine.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/numericsanddates/NumericsAndDates.java trunk/PZFileReaderSamples/src/site/navigation.xml trunk/project.xml trunk/src/site/navigation.xml Added Paths: ----------- trunk/PZFileReader/.settings/ trunk/PZFileReader/.settings/org.eclipse.jdt.core.prefs trunk/PZFileReader/.settings/org.eclipse.jdt.ui.prefs trunk/PZFileReader/.settings/org.eclipse.wst.validation.prefs trunk/PZFileReaderSamples/.settings/ trunk/PZFileReaderSamples/.settings/org.eclipse.jdt.core.prefs trunk/PZFileReaderSamples/.settings/org.eclipse.jdt.ui.prefs Added: trunk/PZFileReader/.settings/org.eclipse.jdt.core.prefs =================================================================== --- trunk/PZFileReader/.settings/org.eclipse.jdt.core.prefs (rev 0) +++ trunk/PZFileReader/.settings/org.eclipse.jdt.core.prefs 2006-10-16 15:35:27 UTC (rev 59) @@ -0,0 +1,12 @@ +#Mon Oct 16 14:33:58 BST 2006 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.4 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning +org.eclipse.jdt.core.compiler.source=1.3 Added: trunk/PZFileReader/.settings/org.eclipse.jdt.ui.prefs =================================================================== --- trunk/PZFileReader/.settings/org.eclipse.jdt.ui.prefs (rev 0) +++ trunk/PZFileReader/.settings/org.eclipse.jdt.ui.prefs 2006-10-16 15:35:27 UTC (rev 59) @@ -0,0 +1,4 @@ +#Mon Oct 16 14:33:59 BST 2006 +eclipse.preferences.version=1 +internal.default.compliance=default +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/> Added: trunk/PZFileReader/.settings/org.eclipse.wst.validation.prefs =================================================================== --- trunk/PZFileReader/.settings/org.eclipse.wst.validation.prefs (rev 0) +++ trunk/PZFileReader/.settings/org.eclipse.wst.validation.prefs 2006-10-16 15:35:27 UTC (rev 59) @@ -0,0 +1,6 @@ +#Mon Oct 16 14:34:00 BST 2006 +DELEGATES_PREFERENCE=delegateValidatorListorg.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator\=org.eclipse.wst.wsdl.validation.internal.eclipse.Validator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator\=org.eclipse.wst.xsd.core.internal.validation.eclipse.Validator; +USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.jst.jsp.core.internal.validation.JSPELValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPJavaValidator;org.eclipse.jst.jsp.core.internal.validation.JSPDirectiveValidator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator; +USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.jst.jsp.core.internal.validation.JSPELValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsp.core.internal.validation.JSPJavaValidator;org.eclipse.jst.jsp.core.internal.validation.JSPDirectiveValidator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator; +USER_PREFERENCE=overrideGlobalPreferencesfalse +eclipse.preferences.version=1 Modified: trunk/PZFileReader/maven.xml =================================================================== --- trunk/PZFileReader/maven.xml 2006-10-16 15:32:39 UTC (rev 58) +++ trunk/PZFileReader/maven.xml 2006-10-16 15:35:27 UTC (rev 59) @@ -14,5 +14,5 @@ xmlns:log="jelly:log"> <goal name="pz:build" prereqs="jar:install" /> - <goal name="pz:rebuild" prereqs="clean,kit:build" /> + <goal name="pz:rebuild" prereqs="clean,pz:build" /> </project> Modified: trunk/PZFileReader/project.xml =================================================================== --- trunk/PZFileReader/project.xml 2006-10-16 15:32:39 UTC (rev 58) +++ trunk/PZFileReader/project.xml 2006-10-16 15:35:27 UTC (rev 59) @@ -27,7 +27,7 @@ <name>PZFileReader</name> <artifactId>pzfilereader</artifactId> <package>com.pz.reader</package> - <shortDescription>PZFileReader </shortDescription> + <shortDescription>Flat File Parser via XML Mappings (fixed length,csv).</shortDescription> <description> Simple Java delimited and fixed width file parser. Handles CSV, Excel CSV, Tab, Pipe delimiters, just to name a few. Maps column positions in the file to user friendly names via XML. See PZFileReader Feature List under News for complete feature list. Modified: trunk/PZFileReader/qalab.xml =================================================================== --- trunk/PZFileReader/qalab.xml 2006-10-16 15:32:39 UTC (rev 58) +++ trunk/PZFileReader/qalab.xml 2006-10-16 15:35:27 UTC (rev 59) @@ -17,87 +17,290 @@ ]> <qalab version="1.1"> <summary> - <summaryresult date="2006-10-16" filecount="18" statvalue="469" type="checkstyle"/> + <summaryresult date="2006-10-05" filecount="31" statvalue="1696" type="checkstyle"/> + <summaryresult date="2006-10-05" filecount="2" statvalue="4" type="pmd"/> + <summaryresult date="2006-10-05" filecount="7" statvalue="20" type="findbugs"/> + <summaryresult date="2006-10-05" filecount="3" statvalue="170" type="simian"/> + <summaryresult date="2006-10-06" filecount="18" statvalue="469" type="checkstyle"/> + <summaryresult date="2006-10-06" filecount="2" statvalue="4" type="pmd"/> + <summaryresult date="2006-10-06" filecount="7" statvalue="20" type="findbugs"/> + <summaryresult date="2006-10-06" filecount="3" statvalue="170" type="simian"/> + <summaryresult date="2006-10-12" filecount="31" statvalue="1696" type="checkstyle"/> + <summaryresult date="2006-10-12" filecount="2" statvalue="4" type="pmd"/> + <summaryresult date="2006-10-12" filecount="7" statvalue="20" type="findbugs"/> + <summaryresult date="2006-10-12" filecount="3" statvalue="170" type="simian"/> + <summaryresult date="2006-10-13" filecount="31" statvalue="1696" type="checkstyle"/> + <summaryresult date="2006-10-13" filecount="2" statvalue="4" type="pmd"/> + <summaryresult date="2006-10-13" filecount="7" statvalue="20" type="findbugs"/> + <summaryresult date="2006-10-13" filecount="3" statvalue="170" type="simian"/> + <summaryresult date="2006-10-14" filecount="31" statvalue="1696" type="checkstyle"/> + <summaryresult date="2006-10-14" filecount="2" statvalue="4" type="pmd"/> + <summaryresult date="2006-10-14" filecount="7" statvalue="20" type="findbugs"/> + <summaryresult date="2006-10-14" filecount="3" statvalue="170" type="simian"/> + <summaryresult date="2006-10-15" filecount="31" statvalue="1696" type="checkstyle"/> + <summaryresult date="2006-10-15" filecount="2" statvalue="4" type="pmd"/> + <summaryresult date="2006-10-15" filecount="7" statvalue="20" type="findbugs"/> + <summaryresult date="2006-10-15" filecount="3" statvalue="170" type="simian"/> + <summaryresult date="2006-10-16" filecount="18" statvalue="32" type="checkstyle"/> <summaryresult date="2006-10-16" filecount="2" statvalue="4" type="pmd"/> <summaryresult date="2006-10-16" filecount="7" statvalue="16" type="findbugs"/> - <summaryresult date="2006-10-16" filecount="3" statvalue="170" type="simian"/> + <summaryresult date="2006-10-16" filecount="3" statvalue="116" type="simian"/> <summaryresult date="2006-10-16" filecount="13" statvalue="17" type="cobertura-line"/> - <summaryresult date="2006-10-16" filecount="13" statvalue="26" type="cobertura-branch"/> + <summaryresult date="2006-10-16" filecount="13" statvalue="23" type="cobertura-branch"/> </summary> - <file id="com_pz_reader_util_ParserUtils.java" path="com/pz/reader/util/ParserUtils.java"> - <result date="2006-10-16" statvalue="25" type="checkstyle"/> - <result date="2006-10-16" statvalue="3" type="pmd"/> - <result date="2006-10-16" statvalue="3" type="findbugs"/> - <result date="2006-10-16" statvalue="37" type="cobertura-line"/> - <result date="2006-10-16" statvalue="48" type="cobertura-branch"/> + <file id="com_pz_reader_ordering_package.html" path="com/pz/reader/ordering/package.html"> + <result date="2006-10-05" statvalue="1" type="checkstyle"/> + <result date="2006-10-06" statvalue="1" type="checkstyle"/> + <result date="2006-10-12" statvalue="1" type="checkstyle"/> + <result date="2006-10-13" statvalue="1" type="checkstyle"/> + <result date="2006-10-14" statvalue="1" type="checkstyle"/> + <result date="2006-10-15" statvalue="1" type="checkstyle"/> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> </file> - <file id="com_pz_reader_xml_PZMapParser.java" path="com/pz/reader/xml/PZMapParser.java"> - <result date="2006-10-16" statvalue="158" type="checkstyle"/> - <result date="2006-10-16" statvalue="1" type="pmd"/> - <result date="2006-10-16" statvalue="1" type="findbugs"/> + <file id="com_pz_reader_package.html" path="com/pz/reader/package.html"> + <result date="2006-10-05" statvalue="1" type="checkstyle"/> + <result date="2006-10-06" statvalue="1" type="checkstyle"/> + <result date="2006-10-12" statvalue="1" type="checkstyle"/> + <result date="2006-10-13" statvalue="1" type="checkstyle"/> + <result date="2006-10-14" statvalue="1" type="checkstyle"/> + <result date="2006-10-15" statvalue="1" type="checkstyle"/> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> </file> - <file - id="C:_project_pzfilereader_PZFileReader_src_test_java_com_test_delim_multiLine_CSVPerformanceTest.java" path="C:/project/pzfilereader/PZFileReader/src/test/java/com/test/delim/multiLine/CSVPerformanceTest.java"/> - <file - id="C:_project_pzfilereader_PZFileReader_src_test_java_com_test_delim_tab_TabDelimited.java" path="C:/project/pzfilereader/PZFileReader/src/test/java/com/test/delim/tab/TabDelimited.java"/> - <file id="com_pz_reader_DataSet.java" path="com/pz/reader/DataSet.java"> - <result date="2006-10-16" statvalue="103" type="checkstyle"/> - <result date="2006-10-16" statvalue="2" type="findbugs"/> - <result date="2006-10-16" statvalue="20" type="cobertura-line"/> - <result date="2006-10-16" statvalue="25" type="cobertura-branch"/> + <file id="com_pz_reader_util_package.html" path="com/pz/reader/util/package.html"> + <result date="2006-10-05" statvalue="1" type="checkstyle"/> + <result date="2006-10-06" statvalue="1" type="checkstyle"/> + <result date="2006-10-12" statvalue="1" type="checkstyle"/> + <result date="2006-10-13" statvalue="1" type="checkstyle"/> + <result date="2006-10-14" statvalue="1" type="checkstyle"/> + <result date="2006-10-15" statvalue="1" type="checkstyle"/> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> </file> - <file id="com_pz_reader_LargeDataSet.java" path="com/pz/reader/LargeDataSet.java"> - <result date="2006-10-16" statvalue="63" type="checkstyle"/> - <result date="2006-10-16" statvalue="2" type="findbugs"/> + <file id="com_pz_reader_xml_package.html" path="com/pz/reader/xml/package.html"> + <result date="2006-10-05" statvalue="1" type="checkstyle"/> + <result date="2006-10-06" statvalue="1" type="checkstyle"/> + <result date="2006-10-12" statvalue="1" type="checkstyle"/> + <result date="2006-10-13" statvalue="1" type="checkstyle"/> + <result date="2006-10-14" statvalue="1" type="checkstyle"/> + <result date="2006-10-15" statvalue="1" type="checkstyle"/> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> </file> - <file id="com_pz_reader_ordering_OrderBy.java" path="com/pz/reader/ordering/OrderBy.java"> - <result date="2006-10-16" statvalue="12" type="checkstyle"/> - <result date="2006-10-16" statvalue="5" type="findbugs"/> + <file id="com_pz_reader_structure_package.html" path="com/pz/reader/structure/package.html"> + <result date="2006-10-05" statvalue="1" type="checkstyle"/> + <result date="2006-10-06" statvalue="1" type="checkstyle"/> + <result date="2006-10-12" statvalue="1" type="checkstyle"/> + <result date="2006-10-13" statvalue="1" type="checkstyle"/> + <result date="2006-10-14" statvalue="1" type="checkstyle"/> + <result date="2006-10-15" statvalue="1" type="checkstyle"/> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> </file> - <file id="com_pz_reader_xml_ResolveLocalDTD.java" path="com/pz/reader/xml/ResolveLocalDTD.java"> - <result date="2006-10-16" statvalue="16" type="checkstyle"/> - <result date="2006-10-16" statvalue="2" type="findbugs"/> - </file> <file id="com_pz_reader_structure_Row.java" path="com/pz/reader/structure/Row.java"> - <result date="2006-10-16" statvalue="2" type="checkstyle"/> + <result date="2006-10-05" statvalue="1" type="checkstyle"/> + <result date="2006-10-05" statvalue="33" type="checkstyle"/> + <result date="2006-10-05" statvalue="1" type="findbugs"/> + <result date="2006-10-06" statvalue="1" type="checkstyle"/> + <result date="2006-10-06" statvalue="33" type="checkstyle"/> + <result date="2006-10-06" statvalue="1" type="checkstyle"/> + <result date="2006-10-06" statvalue="33" type="checkstyle"/> + <result date="2006-10-06" statvalue="1" type="checkstyle"/> + <result date="2006-10-06" statvalue="33" type="checkstyle"/> + <result date="2006-10-06" statvalue="1" type="checkstyle"/> + <result date="2006-10-06" statvalue="33" type="checkstyle"/> + <result date="2006-10-06" statvalue="1" type="checkstyle"/> + <result date="2006-10-06" statvalue="33" type="checkstyle"/> + <result date="2006-10-06" statvalue="2" type="checkstyle"/> + <result date="2006-10-06" statvalue="1" type="findbugs"/> + <result date="2006-10-12" statvalue="33" type="checkstyle"/> + <result date="2006-10-12" statvalue="1" type="checkstyle"/> + <result date="2006-10-12" statvalue="33" type="checkstyle"/> + <result date="2006-10-12" statvalue="1" type="checkstyle"/> + <result date="2006-10-12" statvalue="33" type="checkstyle"/> + <result date="2006-10-12" statvalue="1" type="findbugs"/> + <result date="2006-10-13" statvalue="1" type="checkstyle"/> + <result date="2006-10-13" statvalue="33" type="checkstyle"/> + <result date="2006-10-13" statvalue="1" type="checkstyle"/> + <result date="2006-10-13" statvalue="33" type="checkstyle"/> + <result date="2006-10-13" statvalue="1" type="findbugs"/> + <result date="2006-10-14" statvalue="33" type="checkstyle"/> + <result date="2006-10-14" statvalue="1" type="checkstyle"/> + <result date="2006-10-14" statvalue="33" type="checkstyle"/> + <result date="2006-10-14" statvalue="1" type="checkstyle"/> + <result date="2006-10-14" statvalue="33" type="checkstyle"/> + <result date="2006-10-14" statvalue="1" type="findbugs"/> + <result date="2006-10-15" statvalue="33" type="checkstyle"/> + <result date="2006-10-15" statvalue="1" type="checkstyle"/> + <result date="2006-10-15" statvalue="33" type="checkstyle"/> + <result date="2006-10-15" statvalue="1" type="checkstyle"/> + <result date="2006-10-15" statvalue="33" type="checkstyle"/> + <result date="2006-10-15" statvalue="1" type="checkstyle"/> + <result date="2006-10-15" statvalue="33" type="checkstyle"/> + <result date="2006-10-15" statvalue="1" type="findbugs"/> <result date="2006-10-16" statvalue="1" type="findbugs"/> <result date="2006-10-16" statvalue="44" type="cobertura-line"/> </file> <file id="com_pz_reader_DataError.java" path="com/pz/reader/DataError.java"> - <result date="2006-10-16" statvalue="5" type="checkstyle"/> + <result date="2006-10-05" statvalue="22" type="checkstyle"/> + <result date="2006-10-06" statvalue="5" type="checkstyle"/> + <result date="2006-10-12" statvalue="22" type="checkstyle"/> + <result date="2006-10-13" statvalue="22" type="checkstyle"/> + <result date="2006-10-14" statvalue="22" type="checkstyle"/> + <result date="2006-10-15" statvalue="22" type="checkstyle"/> + <result date="2006-10-16" statvalue="3" type="checkstyle"/> <result date="2006-10-16" statvalue="100" type="cobertura-branch"/> </file> + <file id="com_pz_reader_DataSet.java" path="com/pz/reader/DataSet.java"> + <result date="2006-10-05" statvalue="485" type="checkstyle"/> + <result date="2006-10-05" statvalue="5" type="findbugs"/> + <result date="2006-10-06" statvalue="103" type="checkstyle"/> + <result date="2006-10-06" statvalue="5" type="findbugs"/> + <result date="2006-10-12" statvalue="485" type="checkstyle"/> + <result date="2006-10-12" statvalue="5" type="findbugs"/> + <result date="2006-10-13" statvalue="485" type="checkstyle"/> + <result date="2006-10-13" statvalue="5" type="findbugs"/> + <result date="2006-10-14" statvalue="485" type="checkstyle"/> + <result date="2006-10-14" statvalue="5" type="findbugs"/> + <result date="2006-10-15" statvalue="485" type="checkstyle"/> + <result date="2006-10-15" statvalue="5" type="findbugs"/> + <result date="2006-10-16" statvalue="9" type="checkstyle"/> + <result date="2006-10-16" statvalue="3" type="findbugs"/> + <result date="2006-10-16" statvalue="21" type="cobertura-line"/> + <result date="2006-10-16" statvalue="25" type="cobertura-branch"/> + </file> + <file id="com_pz_reader_LargeDataSet.java" path="com/pz/reader/LargeDataSet.java"> + <result date="2006-10-05" statvalue="278" type="checkstyle"/> + <result date="2006-10-05" statvalue="3" type="findbugs"/> + <result date="2006-10-06" statvalue="63" type="checkstyle"/> + <result date="2006-10-06" statvalue="3" type="findbugs"/> + <result date="2006-10-12" statvalue="278" type="checkstyle"/> + <result date="2006-10-12" statvalue="3" type="findbugs"/> + <result date="2006-10-13" statvalue="278" type="checkstyle"/> + <result date="2006-10-13" statvalue="3" type="findbugs"/> + <result date="2006-10-14" statvalue="278" type="checkstyle"/> + <result date="2006-10-14" statvalue="3" type="findbugs"/> + <result date="2006-10-15" statvalue="278" type="checkstyle"/> + <result date="2006-10-15" statvalue="3" type="findbugs"/> + <result date="2006-10-16" statvalue="5" type="checkstyle"/> + <result date="2006-10-16" statvalue="1" type="findbugs"/> + </file> <file id="com_pz_reader_Version.java" path="com/pz/reader/Version.java"> + <result date="2006-10-05" statvalue="2" type="checkstyle"/> + <result date="2006-10-12" statvalue="2" type="checkstyle"/> + <result date="2006-10-13" statvalue="2" type="checkstyle"/> + <result date="2006-10-14" statvalue="2" type="checkstyle"/> + <result date="2006-10-15" statvalue="2" type="checkstyle"/> <result date="2006-10-16" statvalue="100" type="cobertura-branch"/> </file> + <file id="com_pz_reader_ordering_OrderBy.java" path="com/pz/reader/ordering/OrderBy.java"> + <result date="2006-10-05" statvalue="65" type="checkstyle"/> + <result date="2006-10-05" statvalue="5" type="findbugs"/> + <result date="2006-10-06" statvalue="12" type="checkstyle"/> + <result date="2006-10-06" statvalue="5" type="findbugs"/> + <result date="2006-10-12" statvalue="65" type="checkstyle"/> + <result date="2006-10-12" statvalue="5" type="findbugs"/> + <result date="2006-10-13" statvalue="65" type="checkstyle"/> + <result date="2006-10-13" statvalue="5" type="findbugs"/> + <result date="2006-10-14" statvalue="65" type="checkstyle"/> + <result date="2006-10-14" statvalue="5" type="findbugs"/> + <result date="2006-10-15" statvalue="65" type="checkstyle"/> + <result date="2006-10-15" statvalue="5" type="findbugs"/> + <result date="2006-10-16" statvalue="5" type="findbugs"/> + </file> + <file id="com_pz_reader_ordering_OrderColumn.java" path="com/pz/reader/ordering/OrderColumn.java"> + <result date="2006-10-05" statvalue="25" type="checkstyle"/> + <result date="2006-10-06" statvalue="4" type="checkstyle"/> + <result date="2006-10-12" statvalue="25" type="checkstyle"/> + <result date="2006-10-13" statvalue="25" type="checkstyle"/> + <result date="2006-10-14" statvalue="25" type="checkstyle"/> + <result date="2006-10-15" statvalue="25" type="checkstyle"/> + </file> <file id="com_pz_reader_structure_ColumnMetaData.java" path="com/pz/reader/structure/ColumnMetaData.java"> - <result date="2006-10-16" statvalue="66" type="checkstyle"/> + <result date="2006-10-05" statvalue="99" type="checkstyle"/> + <result date="2006-10-06" statvalue="66" type="checkstyle"/> + <result date="2006-10-12" statvalue="99" type="checkstyle"/> + <result date="2006-10-13" statvalue="99" type="checkstyle"/> + <result date="2006-10-14" statvalue="99" type="checkstyle"/> + <result date="2006-10-15" statvalue="99" type="checkstyle"/> <result date="2006-10-16" statvalue="50" type="cobertura-line"/> <result date="2006-10-16" statvalue="100" type="cobertura-branch"/> </file> - <file id="com_pz_reader_xml_XMLRecordElement.java" path="com/pz/reader/xml/XMLRecordElement.java"> - <result date="2006-10-16" statvalue="2" type="checkstyle"/> - <result date="2006-10-16" statvalue="100" type="cobertura-branch"/> + <file id="com_pz_reader_structure_Row.java" path="com/pz/reader/structure/Row.java"/> + <file id="com_pz_reader_util_ExcelTransformer.java" path="com/pz/reader/util/ExcelTransformer.java"> + <result date="2006-10-05" statvalue="60" type="checkstyle"/> + <result date="2006-10-06" statvalue="8" type="checkstyle"/> + <result date="2006-10-12" statvalue="60" type="checkstyle"/> + <result date="2006-10-13" statvalue="60" type="checkstyle"/> + <result date="2006-10-14" statvalue="60" type="checkstyle"/> + <result date="2006-10-15" statvalue="60" type="checkstyle"/> </file> - <file id="com_pz_reader_structure_package.html" path="com/pz/reader/structure/package.html"> - <result date="2006-10-16" statvalue="1" type="checkstyle"/> + <file id="com_pz_reader_util_ParserUtils.java" path="com/pz/reader/util/ParserUtils.java"> + <result date="2006-10-05" statvalue="290" type="checkstyle"/> + <result date="2006-10-05" statvalue="3" type="pmd"/> + <result date="2006-10-05" statvalue="3" type="findbugs"/> + <result date="2006-10-06" statvalue="25" type="checkstyle"/> + <result date="2006-10-06" statvalue="3" type="pmd"/> + <result date="2006-10-06" statvalue="3" type="findbugs"/> + <result date="2006-10-12" statvalue="290" type="checkstyle"/> + <result date="2006-10-12" statvalue="3" type="pmd"/> + <result date="2006-10-12" statvalue="3" type="findbugs"/> + <result date="2006-10-13" statvalue="290" type="checkstyle"/> + <result date="2006-10-13" statvalue="3" type="pmd"/> + <result date="2006-10-13" statvalue="3" type="findbugs"/> + <result date="2006-10-14" statvalue="290" type="checkstyle"/> + <result date="2006-10-14" statvalue="3" type="pmd"/> + <result date="2006-10-14" statvalue="3" type="findbugs"/> + <result date="2006-10-15" statvalue="290" type="checkstyle"/> + <result date="2006-10-15" statvalue="3" type="pmd"/> + <result date="2006-10-15" statvalue="3" type="findbugs"/> + <result date="2006-10-16" statvalue="5" type="checkstyle"/> + <result date="2006-10-16" statvalue="3" type="pmd"/> + <result date="2006-10-16" statvalue="3" type="findbugs"/> + <result date="2006-10-16" statvalue="35" type="cobertura-line"/> + <result date="2006-10-16" statvalue="42" type="cobertura-branch"/> </file> - <file id="com_pz_reader_util_package.html" path="com/pz/reader/util/package.html"> - <result date="2006-10-16" statvalue="1" type="checkstyle"/> + <file id="com_pz_reader_xml_PZMapParser.java" path="com/pz/reader/xml/PZMapParser.java"> + <result date="2006-10-05" statvalue="257" type="checkstyle"/> + <result date="2006-10-05" statvalue="1" type="pmd"/> + <result date="2006-10-05" statvalue="1" type="findbugs"/> + <result date="2006-10-06" statvalue="158" type="checkstyle"/> + <result date="2006-10-06" statvalue="1" type="pmd"/> + <result date="2006-10-06" statvalue="1" type="findbugs"/> + <result date="2006-10-12" statvalue="257" type="checkstyle"/> + <result date="2006-10-12" statvalue="1" type="pmd"/> + <result date="2006-10-12" statvalue="1" type="findbugs"/> + <result date="2006-10-13" statvalue="257" type="checkstyle"/> + <result date="2006-10-13" statvalue="1" type="pmd"/> + <result date="2006-10-13" statvalue="1" type="findbugs"/> + <result date="2006-10-14" statvalue="257" type="checkstyle"/> + <result date="2006-10-14" statvalue="1" type="pmd"/> + <result date="2006-10-14" statvalue="1" type="findbugs"/> + <result date="2006-10-15" statvalue="257" type="checkstyle"/> + <result date="2006-10-15" statvalue="1" type="pmd"/> + <result date="2006-10-15" statvalue="1" type="findbugs"/> + <result date="2006-10-16" statvalue="5" type="checkstyle"/> + <result date="2006-10-16" statvalue="1" type="pmd"/> + <result date="2006-10-16" statvalue="1" type="findbugs"/> </file> - <file id="com_pz_reader_ordering_package.html" path="com/pz/reader/ordering/package.html"> - <result date="2006-10-16" statvalue="1" type="checkstyle"/> + <file id="com_pz_reader_xml_ResolveLocalDTD.java" path="com/pz/reader/xml/ResolveLocalDTD.java"> + <result date="2006-10-05" statvalue="40" type="checkstyle"/> + <result date="2006-10-05" statvalue="2" type="findbugs"/> + <result date="2006-10-06" statvalue="16" type="checkstyle"/> + <result date="2006-10-06" statvalue="2" type="findbugs"/> + <result date="2006-10-12" statvalue="40" type="checkstyle"/> + <result date="2006-10-12" statvalue="2" type="findbugs"/> + <result date="2006-10-13" statvalue="40" type="checkstyle"/> + <result date="2006-10-13" statvalue="2" type="findbugs"/> + <result date="2006-10-14" statvalue="40" type="checkstyle"/> + <result date="2006-10-14" statvalue="2" type="findbugs"/> + <result date="2006-10-15" statvalue="40" type="checkstyle"/> + <result date="2006-10-15" statvalue="2" type="findbugs"/> + <result date="2006-10-16" statvalue="2" type="findbugs"/> </file> - <file id="com_pz_reader_package.html" path="com/pz/reader/package.html"> - <result date="2006-10-16" statvalue="1" type="checkstyle"/> + <file id="com_pz_reader_xml_XMLRecordElement.java" path="com/pz/reader/xml/XMLRecordElement.java"> + <result date="2006-10-05" statvalue="34" type="checkstyle"/> + <result date="2006-10-06" statvalue="2" type="checkstyle"/> + <result date="2006-10-12" statvalue="34" type="checkstyle"/> + <result date="2006-10-13" statvalue="34" type="checkstyle"/> + <result date="2006-10-14" statvalue="34" type="checkstyle"/> + <result date="2006-10-15" statvalue="34" type="checkstyle"/> + <result date="2006-10-16" statvalue="100" type="cobertura-branch"/> </file> - <file id="com_pz_reader_xml_package.html" path="com/pz/reader/xml/package.html"> - <result date="2006-10-16" statvalue="1" type="checkstyle"/> - </file> - <file id="com_pz_reader_ordering_OrderColumn.java" path="com/pz/reader/ordering/OrderColumn.java"> - <result date="2006-10-16" statvalue="4" type="checkstyle"/> - </file> - <file id="com_pz_reader_util_ExcelTransformer.java" path="com/pz/reader/util/ExcelTransformer.java"> - <result date="2006-10-16" statvalue="8" type="checkstyle"/> - </file> </qalab> Modified: trunk/PZFileReader/src/main/java/com/pz/reader/DataError.java =================================================================== --- trunk/PZFileReader/src/main/java/com/pz/reader/DataError.java 2006-10-16 15:32:39 UTC (rev 58) +++ trunk/PZFileReader/src/main/java/com/pz/reader/DataError.java 2006-10-16 15:35:27 UTC (rev 59) @@ -1,30 +1,37 @@ /* Copyright 2006 Paul Zepernick - Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + Unless required by applicable law or agreed to in writing, software distributed + under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for + the specific language governing permissions and limitations under the License. */ package com.pz.reader; - /** * This class holds errors that occured while parsing or processing a data file. + * * @author Paul Zepernick * @version 2.0 */ public class DataError { - + /** Description of error */ - private String errorDesc = null; + private String errorDesc = null; + /** line number in file error occured on */ - private int lineNo = 0; + private int lineNo = 0; + /** * Severity of the error 1 = Warning 2 = Moderate 3 = Severe */ - private int errorLevel = 0; + private int errorLevel = 0; /** default constructor */ public DataError() { @@ -33,6 +40,7 @@ /** * Returns the errorDesc. + * * @return String */ public String getErrorDesc() { @@ -41,6 +49,7 @@ /** * Returns the errorLevel. + * * @return int */ public int getErrorLevel() { @@ -49,6 +58,7 @@ /** * Returns the lineNo. + * * @return int */ public int getLineNo() { @@ -57,26 +67,31 @@ /** * Sets the errorDesc. - * @param errorDesc The errorDesc to set + * + * @param errorDesc + * The errorDesc to set */ - public void setErrorDesc(String errorDesc) { + public void setErrorDesc(final String errorDesc) { this.errorDesc = errorDesc; } /** * Sets the errorLevel. - * @param errorLevel The errorLevel to set + * + * @param errorLevel + * The errorLevel to set */ - public void setErrorLevel(int errorLevel) { + public void setErrorLevel(final int errorLevel) { this.errorLevel = errorLevel; } /** * Sets the lineNo. - * @param lineNo The lineNo to set + * + * @param lineNo + * The lineNo to set */ - public void setLineNo(int lineNo) { + public void setLineNo(final int lineNo) { this.lineNo = lineNo; } - } Modified: trunk/PZFileReader/src/main/java/com/pz/reader/DataSet.java =================================================================== --- trunk/PZFileReader/src/main/java/com/pz/reader/DataSet.java 2006-10-16 15:32:39 UTC (rev 58) +++ trunk/PZFileReader/src/main/java/com/pz/reader/DataSet.java 2006-10-16 15:35:27 UTC (rev 59) @@ -1,11 +1,16 @@ /* Copyright 2006 Paul Zepernick - Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + Unless required by applicable law or agreed to in writing, software distributed + under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for + the specific language governing permissions and limitations under the License. */ package com.pz.reader; @@ -35,76 +40,89 @@ import com.pz.reader.util.ParserUtils; import com.pz.reader.xml.PZMapParser; - - /** - * This class parses a datafile and holds methods to scroll back and forth through the datafile - * along with methods to retreive values from columns. + * This class parses a datafile and holds methods to scroll back and forth + * through the datafile along with methods to retreive values from columns. + * * @author Paul Zepernick * @version 2.0.1 */ public class DataSet { /** Array to hold the rows and their values in the text file */ - public List rows = null; + private List rows = null; - /** Array of errors that have occured during processing */ - public List errors = null; + private List errors = null; /** Map of column metadata's */ - public Map columnMD = null; + private Map columnMD = null; /** Pointer for the current row in the array we are on */ - private int pointer = -1; + private int pointer = -1; /** flag to indicate if data should be pulled as lower case */ - private boolean lowerCase = false; + private boolean lowerCase = false; /** flag to inidicate if data should be pulled as upper case */ - private boolean upperCase = false; + private boolean upperCase = false; /** - * flag to indicate if a strict parse should be used when getting doubles and ints + * flag to indicate if a strict parse should be used when getting doubles + * and ints */ private boolean strictNumericParse = false; /** - * Flag to indicate that we can cope with lines shorter than the required lengh + * Flag to indicate that we can cope with lines shorter than the required + * lengh */ - private boolean handleShortLines = false; + private boolean handleShortLines = false; /** - * empty constructor. THIS SHOULD ONLY BE USED FOR CUSTOM DataSet implementations. It provides - * NO parsing abilities + * empty constructor. THIS SHOULD ONLY BE USED FOR CUSTOM DataSet + * implementations. It provides NO parsing abilities */ public DataSet() { } - /** - * Constructs a new DataSet using the database table file layout method. This is used for a - * FIXED LENGTH text file. - * @param con - Connection to database with DATAFILE and DATASTRUCTURE tables - * @param dataSource - Fixed length file to read from - * @param dataDefinition - Name of dataDefinition in the DATAFILE table DATAFILE_DESC column - * @param handleShortLines - Pad lines out to fit the fixed length + * Constructs a new DataSet using the database table file layout method. + * This is used for a FIXED LENGTH text file. + * + * @param con - + * Connection to database with DATAFILE and DATASTRUCTURE tables + * @param dataSource - + * Fixed length file to read from + * @param dataDefinition - + * Name of dataDefinition in the DATAFILE table DATAFILE_DESC + * column + * @param handleShortLines - + * Pad lines out to fit the fixed length * @exception Exception */ - public DataSet(Connection con, File dataSource, String dataDefinition, boolean handleShortLines) throws Exception { + public DataSet(final Connection con, final File dataSource, final String dataDefinition, final boolean handleShortLines) + throws Exception { this(con, ParserUtils.createInputStream(dataSource), dataDefinition, handleShortLines); } /** - * Constructs a new DataSet using the database table file layout method. This is used for a - * FIXED LENGTH text file. - * @param con - Connection to database with DATAFILE and DATASTRUCTURE tables - * @param dataSourceStream - text file datasource InputStream to read from - * @param dataDefinition - Name of dataDefinition in the DATAFILE table DATAFILE_DESC column - * @param handleShortLines - Pad lines out to fit the fixed length + * Constructs a new DataSet using the database table file layout method. + * This is used for a FIXED LENGTH text file. + * + * @param con - + * Connection to database with DATAFILE and DATASTRUCTURE tables + * @param dataSourceStream - + * text file datasource InputStream to read from + * @param dataDefinition - + * Name of dataDefinition in the DATAFILE table DATAFILE_DESC + * column + * @param handleShortLines - + * Pad lines out to fit the fixed length * @exception Exception */ - public DataSet(Connection con, InputStream dataSourceStream, String dataDefinition, boolean handleShortLines) throws Exception { + public DataSet(final Connection con, final InputStream dataSourceStream, final String dataDefinition, + final boolean handleShortLines) throws Exception { super(); this.handleShortLines = handleShortLines; @@ -114,15 +132,14 @@ ColumnMetaData column = null; boolean hasResults = false; int recPosition = 1; - List cmds = new ArrayList(); + final List cmds = new ArrayList(); try { columnMD = new LinkedHashMap(); stmt = con.createStatement(); - sql = "SELECT * FROM DATAFILE INNER JOIN DATASTRUCTURE ON " - + "DATAFILE.DATAFILE_NO = DATASTRUCTURE.DATAFILE_NO " + "WHERE DATAFILE.DATAFILE_DESC = '" - + dataDefinition + "' " + "ORDER BY DATASTRUCTURE_COL_ORDER"; + sql = "SELECT * FROM DATAFILE INNER JOIN DATASTRUCTURE ON " + "DATAFILE.DATAFILE_NO = DATASTRUCTURE.DATAFILE_NO " + + "WHERE DATAFILE.DATAFILE_DESC = '" + dataDefinition + "' " + "ORDER BY DATASTRUCTURE_COL_ORDER"; rs = stmt.executeQuery(sql); @@ -141,9 +158,9 @@ hasResults = true; } - - columnMD.put("detail",cmds); + columnMD.put("detail", cmds); + if (!hasResults) { throw new FileNotFoundException("DATA DEFINITION CAN NOT BE FOUND IN THE DATABASE " + dataDefinition); } @@ -152,51 +169,78 @@ doFixedLengthFile(dataSourceStream); } finally { - if (rs != null) + if (rs != null) { rs.close(); - if (stmt != null) + } + if (stmt != null) { stmt.close(); + } } } - /** - * Constructs a new DataSet using the database table file layout method. This is used for a - * DELIMITED text file. esacpe sequence reference: \n newline <br> \t tab <br> \b backspace <br> \r return <br> \f - * form feed <br> \\ backslash <br> \' single quote <br> \" double quote - * @param con - Connection to database with DATAFILE and DATASTRUCTURE tables - * @param dataSource - text file datasource to read from - * @param dataDefinition - Name of dataDefinition in the DATAFILE table DATAFILE_DESC column - * @param delimiter - Char the file is delimited By - * @param qualifier - Char text is qualified by - * @param ignoreFirstRecord - skips the first line that contains data in the file - * @param handleShortLines - Adds missing columns as empty's to the DataSet instead of logging - * them as an error + * Constructs a new DataSet using the database table file layout method. + * This is used for a DELIMITED text file. esacpe sequence reference: \n + * newline <br> + * \t tab <br> + * \b backspace <br> + * \r return <br> + * \f form feed <br> \\ backslash <br> \' single quote <br> \" double quote + * + * @param con - + * Connection to database with DATAFILE and DATASTRUCTURE tables + * @param dataSource - + * text file datasource to read from + * @param dataDefinition - + * Name of dataDefinition in the DATAFILE table DATAFILE_DESC + * column + * @param delimiter - + * Char the file is delimited By + * @param qualifier - + * Char text is qualified by + * @param ignoreFirstRecord - + * skips the first line that contains data in the file + * @param handleShortLines - + * Adds missing columns as empty's to the DataSet instead of + * logging them as an error * @exception Exception */ - public DataSet(Connection con, File dataSource, String dataDefinition, String delimiter, String qualifier, - boolean ignoreFirstRecord, boolean handleShortLines) throws Exception { - this(con, ParserUtils.createInputStream(dataSource), dataDefinition, delimiter, qualifier, ignoreFirstRecord, handleShortLines); + public DataSet(final Connection con, final File dataSource, final String dataDefinition, final String delimiter, + final String qualifier, final boolean ignoreFirstRecord, final boolean handleShortLines) throws Exception { + this(con, ParserUtils.createInputStream(dataSource), dataDefinition, delimiter, qualifier, ignoreFirstRecord, + handleShortLines); } /** - * New constructor based on 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 <br> \t tab <br> \b backspace <br> \r return <br> \f - * form feed <br> \\ backslash <br> \' single quote <br> \" double quote - * @param con - Connection to database with DATAFILE and DATASTRUCTURE tables - * @param dataSourceStream - text file datasource InputStream to read from - * @param dataDefinition - Name of dataDefinition in the DATAFILE table DATAFILE_DESC column - * @param delimiter - Char the file is delimited By - * @param qualifier - Char text is qualified by - * @param ignoreFirstRecord - skips the first line that contains data in the file - * @param handleShortLines - Adds missing columns as empty's to the DataSet instead of logging - * them as an error + * New constructor based on 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 <br> + * \t tab <br> + * \b backspace <br> + * \r return <br> + * \f form feed <br> \\ backslash <br> \' single quote <br> \" double quote + * + * @param con - + * Connection to database with DATAFILE and DATASTRUCTURE tables + * @param dataSourceStream - + * text file datasource InputStream to read from + * @param dataDefinition - + * Name of dataDefinition in the DATAFILE table DATAFILE_DESC + * column + * @param delimiter - + * Char the file is delimited By + * @param qualifier - + * Char text is qualified by + * @param ignoreFirstRecord - + * skips the first line that contains data in the file + * @param handleShortLines - + * Adds missing columns as empty's to the DataSet instead of + * logging them as an error * @exception Exception */ - public DataSet(Connection con, InputStream dataSourceStream, String dataDefinition, String delimiter, String qualifier, - boolean ignoreFirstRecord, boolean handleShortLines) throws Exception { + public DataSet(final Connection con, final InputStream dataSourceStream, final String dataDefinition, final String delimiter, + final String qualifier, final boolean ignoreFirstRecord, final boolean handleShortLines) throws Exception { super(); this.handleShortLines = handleShortLines; @@ -206,15 +250,14 @@ Statement stmt = null; ColumnMetaData column = null; boolean hasResults = false; - List cmds = new ArrayList(); + final List cmds = new ArrayList(); try { columnMD = new LinkedHashMap(); stmt = con.createStatement(); - sql = "SELECT * FROM DATAFILE INNER JOIN DATASTRUCTURE ON " - + "DATAFILE.DATAFILE_NO = DATASTRUCTURE.DATAFILE_NO " + "WHERE DATAFILE.DATAFILE_DESC = '" - + dataDefinition + "' " + "ORDER BY DATASTRUCTURE_COL_ORDER"; + sql = "SELECT * FROM DATAFILE INNER JOIN DATASTRUCTURE ON " + "DATAFILE.DATAFILE_NO = DATASTRUCTURE.DATAFILE_NO " + + "WHERE DATAFILE.DATAFILE_DESC = '" + dataDefinition + "' " + "ORDER BY DATASTRUCTURE_COL_ORDER"; rs = stmt.executeQuery(sql); @@ -229,9 +272,9 @@ hasResults = true; } - - columnMD.put("detail",cmds); + columnMD.put("detail", cmds); + if (!hasResults) { throw new FileNotFoundException("DATA DEFINITION CAN NOT BE FOUND IN THE DATABASE " + dataDefinition); } @@ -240,49 +283,72 @@ doDelimitedFile(dataSourceStream, delimiter, qualifier, ignoreFirstRecord, false); } finally { - if (rs != null) + if (rs != null) { rs.close(); - if (stmt != null) + } + if (stmt != null) { stmt.close(); + } } } - /** - * Constructs a new DataSet using the PZMAP XML file layout method. This is used for a DELIMITED - * text file. esacpe sequence reference: \n newline <br> \t tab <br> \b backspace <br> \r return <br> \f - * form feed <br> \\ backslash <br> \' single quote <br> \" double quote - * @param pzmapXML - Reference to the xml file holding the pzmap - * @param dataSource - text file datasource to read from - * @param delimiter - Char the file is delimited By - * @param qualifier - Char text is qualified by - * @param ignoreFirstRecord - skips the first line that contains data in the file - * @param handleShortLines - Adds missing columns as empty's to the DataSet instead of logging - * them as an error + * Constructs a new DataSet using the PZMAP XML file layout method. This is + * used for a DELIMITED text file. esacpe sequence reference: \n newline + * <br> + * \t tab <br> + * \b backspace <br> + * \r return <br> + * \f form feed <br> \\ backslash <br> \' single quote <br> \" double quote + * + * @param pzmapXML - + * Reference to the xml file holding the pzmap + * @param dataSource - + * text file datasource to read from + * @param delimiter - + * Char the file is delimited By + * @param qualifier - + * Char text is qualified by + * @param ignoreFirstRecord - + * skips the first line that contains data in the file + * @param handleShortLines - + * Adds missing columns as empty's to the DataSet instead of + * logging them as an error * @exception Exception */ - public DataSet(File pzmapXML, File dataSource, String delimiter, String qualifier, boolean ignoreFirstRecord, - boolean handleShortLines) throws Exception { - this(ParserUtils.createInputStream(pzmapXML), ParserUtils.createInputStream(dataSource), delimiter, qualifier, ignoreFirstRecord, handleShortLines); + public DataSet(final File pzmapXML, final File dataSource, final String delimiter, final String qualifier, + final boolean ignoreFirstRecord, final boolean handleShortLines) throws Exception { + this(ParserUtils.createInputStream(pzmapXML), ParserUtils.createInputStream(dataSource), delimiter, qualifier, + ignoreFirstRecord, handleShortLines); } /** - * 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 <br> \t tab <br> \b backspace <br> \r return <br> \f - * form feed <br> \\ backslash <br> \' single quote <br> \" double quote - * @param pzmapXMLStream - Reference to the xml file holding the pzmap - * @param dataSourceStream - text file datasource InputStream to read from - * @param delimiter - Char the file is delimited By - * @param qualifier - Char text is qualified by - * @param ignoreFirstRecord - skips the first line that contains data in the file - * @param handleShortLines - Adds missing columns as empty's to the DataSet instead of logging - * them as an error + * 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 <br> + * \t tab <br> + * \b backspace <br> + * \r return <br> + * \f form feed <br> \\ backslash <br> \' single quote <br> \" double quote + * + * @param pzmapXMLStream - + * Reference to the xml file holding the pzmap + * @param dataSourceStream - + * text file datasource InputStream to read from + * @param delimiter - + * Char the file is delimited By + * @param qualifier - + * Char text is qualified by + * @param ignoreFirstRecord - + * skips the first line that contains data in the file + * @param handleShortLines - + * Adds missing columns as empty's to the DataSet instead of + * logging them as an error * @exception Exception */ - public DataSet(InputStream pzmapXMLStream, InputStream dataSourceStream, String delimiter, String qualifier, boolean ignoreFirstRecord, - boolean handleShortLines) throws Exception { + public DataSet(final InputStream pzmapXMLStream, final InputStream dataSourceStream, final String delimiter, + final String qualifier, final boolean ignoreFirstRecord, final boolean handleShortLines) throws Exception { this.handleShortLines = handleShortLines; columnMD = PZMapParser.parse(pzmapXMLStream); @@ -292,74 +358,107 @@ } /** - * 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 <br> \t tab <br> \b backspace <br> \r return <br> \f - * form feed <br> \\ backslash <br> \' single quote <br> \" double quote - * @param dataSource - text file datasource to read from - * @param delimiter - Char the file is delimited By - * @param qualifier - Char text is qualified by - * @param handleShortLines - when flaged as true, lines with less columns then the amount of - * column headers will be added as empty's instead of producing an error + * 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 <br> + * \t tab <br> + * \b backspace <br> + * \r return <br> + * \f form feed <br> \\ backslash <br> \' single quote <br> \" double quote + * + * @param dataSource - + * text file datasource to read from + * @param delimiter - + * Char the file is delimited By + * @param qualifier - + * Char text is qualified by + * @param handleShortLines - + * when flaged as true, lines with less columns then the amount + * of column headers will be added as empty's instead of + * producing an error * @exception Exception */ - public DataSet(File dataSource, String delimiter, String qualifier, boolean handleShortLines) throws Exception { + public DataSet(final File dataSource, final String delimiter, final String qualifier, final boolean handleShortLines) + throws Exception { this.handleShortLines = handleShortLines; InputStream dataSourceStream = null; - - try{ - dataSourceStream = ParserUtils.createInputStream(dataSource); - doDelimitedFile(dataSourceStream, delimiter, qualifier, false, true); - }finally{ - if (dataSourceStream != null) dataSourceStream.close(); + + try { + dataSourceStream = ParserUtils.createInputStream(dataSource); + doDelimitedFile(dataSourceStream, delimiter, qualifier, false, true); + } finally { + if (dataSourceStream != null) { + dataSourceStream.close(); + } } } - - /** - * 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 <br> \t tab <br> \b backspace <br> \r return <br> \f - * form feed <br> \\ backslash <br> \' single quote <br> \" double quote - * @param dataSource - text file InputStream to read from - * @param delimiter - Char the file is delimited By - * @param qualifier - Char text is qualified by - * @param handleShortLines - when flaged as true, lines with less columns then the amount of - * column headers will be added as empty's instead of producing an error - * @exception Exception - */ - public DataSet(InputStream dataSource, String delimiter, String qualifier, boolean handleShortLines) throws Exception { - this.handleShortLines = handleShortLines; - - try{ - doDelimitedFile(dataSource, delimiter, qualifier, false, true); - }finally{ - if (dataSource != null) dataSource.close(); - } - } + /** + * 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 <br> + * \t tab <br> + * \b backspace <br> + * \r return <br> + * \f form feed <br> \\ backslash <br> \' single quote <br> \" double quote ... [truncated message content] |
From: <be...@us...> - 2006-10-16 15:33:36
|
Revision: 58 http://svn.sourceforge.net/pzfilereader/?rev=58&view=rev Author: benoitx Date: 2006-10-16 08:32:39 -0700 (Mon, 16 Oct 2006) Log Message: ----------- release 2.2.0 but with maven build. Added Paths: ----------- tags/release_2.2.0/ Copied: tags/release_2.2.0 (from rev 56, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2006-10-16 13:45:10
|
Revision: 57 http://svn.sourceforge.net/pzfilereader/?rev=57&view=rev Author: benoitx Date: 2006-10-16 06:44:42 -0700 (Mon, 16 Oct 2006) Log Message: ----------- Added unit tests in pzfilereader (quite limited). Modified Paths: -------------- trunk/PZFileReader/.classpath trunk/PZFileReader/.project trunk/PZFileReader/project.xml trunk/PZFileReader/qalab.xml trunk/PZFileReader/src/test/java/com/test/AllJunitTests.java trunk/PZFileReader/src/test/java/com/test/delim/columnInFile/DelimitedColumnNamesInFile.java trunk/PZFileReader/src/test/java/com/test/delim/tab/TabDelimited.java trunk/PZFileReaderSamples/.classpath trunk/PZFileReaderSamples/.project Added Paths: ----------- trunk/PZFileReader/src/test/java/com/test/delim/columnInFile/DelimitedColumnNamesInFileTest.java trunk/PZFileReader/src/test/java/com/test/delim/multiLine/TestCSVPerformance.java trunk/PZFileReader/src/test/java/com/test/delim/tab/TabDelimitedTest.java trunk/PZFileReaderSamples/maven.xml trunk/PZFileReaderSamples/project.xml trunk/PZFileReaderSamples/qalab.xml Removed Paths: ------------- trunk/PZFileReader/src/test/java/com/test/delim/columnInFile/TestDelimitedColumnNamesInFile.java trunk/PZFileReader/src/test/java/com/test/delim/multiLine/CSVPerformanceTest.java trunk/PZFileReader/src/test/java/com/test/delim/tab/TestTabDelimited.java Property Changed: ---------------- trunk/PZFileReaderSamples/ Modified: trunk/PZFileReader/.classpath =================================================================== --- trunk/PZFileReader/.classpath 2006-10-16 12:59:13 UTC (rev 56) +++ trunk/PZFileReader/.classpath 2006-10-16 13:44:42 UTC (rev 57) @@ -1,9 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> + <classpath> - <classpathentry kind="src" path=""/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="lib" path="include/jdom.jar"/> - <classpathentry kind="lib" path="include/junit.jar"/> - <classpathentry kind="lib" path="include/jxl.jar"/> - <classpathentry kind="output" path=""/> -</classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"></classpathentry> + <classpathentry excluding="" kind="src" path="src/main/java"></classpathentry> + <classpathentry output="target/test-classes" kind="src" path="src/test/java"></classpathentry> + <classpathentry path="MAVEN_REPO/junit/jars/junit-3.8.2.jar" kind="var"></classpathentry> + <classpathentry path="MAVEN_REPO/jdom/jars/jdom-1.0.jar" kind="var"></classpathentry> + <classpathentry path="MAVEN_REPO/jexcelapi/jars/jxl-2.4.2.jar" kind="var"></classpathentry> + <classpathentry kind="output" path="target/classes"></classpathentry> +</classpath> \ No newline at end of file Modified: trunk/PZFileReader/.project =================================================================== --- trunk/PZFileReader/.project 2006-10-16 12:59:13 UTC (rev 56) +++ trunk/PZFileReader/.project 2006-10-16 13:44:42 UTC (rev 57) @@ -1,22 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> + <projectDescription> - <name>PZFileReader</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>com.ibm.sse.model.structuredbuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> + <name>pzfilereader</name> + <comment>Simple Java delimited and fixed width file parser. Handles CSV, Excel CSV, Tab, Pipe delimiters, just to name a few. Maps column positions in the file to user friendly names via XML. See PZFileReader Feature List under News for complete feature list.</comment> + <projects></projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments></arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> \ No newline at end of file Modified: trunk/PZFileReader/project.xml =================================================================== --- trunk/PZFileReader/project.xml 2006-10-16 12:59:13 UTC (rev 56) +++ trunk/PZFileReader/project.xml 2006-10-16 13:44:42 UTC (rev 57) @@ -47,7 +47,7 @@ <unitTestSourceDirectory>src/test/java</unitTestSourceDirectory> <unitTest> <includes> - <include>**/*NOTest.java</include> + <include>**/*Test.java</include> </includes> <excludes> <exclude>**/Abstract*.java</exclude> Modified: trunk/PZFileReader/qalab.xml =================================================================== --- trunk/PZFileReader/qalab.xml 2006-10-16 12:59:13 UTC (rev 56) +++ trunk/PZFileReader/qalab.xml 2006-10-16 13:44:42 UTC (rev 57) @@ -19,13 +19,17 @@ <summary> <summaryresult date="2006-10-16" filecount="18" statvalue="469" type="checkstyle"/> <summaryresult date="2006-10-16" filecount="2" statvalue="4" type="pmd"/> - <summaryresult date="2006-10-16" filecount="7" statvalue="18" type="findbugs"/> + <summaryresult date="2006-10-16" filecount="7" statvalue="16" type="findbugs"/> <summaryresult date="2006-10-16" filecount="3" statvalue="170" type="simian"/> + <summaryresult date="2006-10-16" filecount="13" statvalue="17" type="cobertura-line"/> + <summaryresult date="2006-10-16" filecount="13" statvalue="26" type="cobertura-branch"/> </summary> <file id="com_pz_reader_util_ParserUtils.java" path="com/pz/reader/util/ParserUtils.java"> <result date="2006-10-16" statvalue="25" type="checkstyle"/> <result date="2006-10-16" statvalue="3" type="pmd"/> <result date="2006-10-16" statvalue="3" type="findbugs"/> + <result date="2006-10-16" statvalue="37" type="cobertura-line"/> + <result date="2006-10-16" statvalue="48" type="cobertura-branch"/> </file> <file id="com_pz_reader_xml_PZMapParser.java" path="com/pz/reader/xml/PZMapParser.java"> <result date="2006-10-16" statvalue="158" type="checkstyle"/> @@ -38,11 +42,13 @@ id="C:_project_pzfilereader_PZFileReader_src_test_java_com_test_delim_tab_TabDelimited.java" path="C:/project/pzfilereader/PZFileReader/src/test/java/com/test/delim/tab/TabDelimited.java"/> <file id="com_pz_reader_DataSet.java" path="com/pz/reader/DataSet.java"> <result date="2006-10-16" statvalue="103" type="checkstyle"/> - <result date="2006-10-16" statvalue="3" type="findbugs"/> + <result date="2006-10-16" statvalue="2" type="findbugs"/> + <result date="2006-10-16" statvalue="20" type="cobertura-line"/> + <result date="2006-10-16" statvalue="25" type="cobertura-branch"/> </file> <file id="com_pz_reader_LargeDataSet.java" path="com/pz/reader/LargeDataSet.java"> <result date="2006-10-16" statvalue="63" type="checkstyle"/> - <result date="2006-10-16" statvalue="3" type="findbugs"/> + <result date="2006-10-16" statvalue="2" type="findbugs"/> </file> <file id="com_pz_reader_ordering_OrderBy.java" path="com/pz/reader/ordering/OrderBy.java"> <result date="2006-10-16" statvalue="12" type="checkstyle"/> @@ -55,6 +61,7 @@ <file id="com_pz_reader_structure_Row.java" path="com/pz/reader/structure/Row.java"> <result date="2006-10-16" statvalue="2" type="checkstyle"/> <result date="2006-10-16" statvalue="1" type="findbugs"/> + <result date="2006-10-16" statvalue="44" type="cobertura-line"/> </file> <file id="com_pz_reader_DataError.java" path="com/pz/reader/DataError.java"> <result date="2006-10-16" statvalue="5" type="checkstyle"/> @@ -65,6 +72,7 @@ </file> <file id="com_pz_reader_structure_ColumnMetaData.java" path="com/pz/reader/structure/ColumnMetaData.java"> <result date="2006-10-16" statvalue="66" type="checkstyle"/> + <result date="2006-10-16" statvalue="50" type="cobertura-line"/> <result date="2006-10-16" statvalue="100" type="cobertura-branch"/> </file> <file id="com_pz_reader_xml_XMLRecordElement.java" path="com/pz/reader/xml/XMLRecordElement.java"> Modified: trunk/PZFileReader/src/test/java/com/test/AllJunitTests.java =================================================================== --- trunk/PZFileReader/src/test/java/com/test/AllJunitTests.java 2006-10-16 12:59:13 UTC (rev 56) +++ trunk/PZFileReader/src/test/java/com/test/AllJunitTests.java 2006-10-16 13:44:42 UTC (rev 57) @@ -16,8 +16,8 @@ public static Test suite() { TestSuite suite = new TestSuite("Test For All PZFileReader Functionality"); //$JUnit-BEGIN$ - suite.addTest(new TestSuite(com.test.delim.columnInFile.TestDelimitedColumnNamesInFile.class)); - suite.addTest(new TestSuite(com.test.delim.tab.TestTabDelimited.class)); + suite.addTest(new TestSuite(com.test.delim.columnInFile.DelimitedColumnNamesInFileTest.class)); + suite.addTest(new TestSuite(com.test.delim.tab.TabDelimitedTest.class)); //$JUnit-END$ return suite; } Modified: trunk/PZFileReader/src/test/java/com/test/delim/columnInFile/DelimitedColumnNamesInFile.java =================================================================== --- trunk/PZFileReader/src/test/java/com/test/delim/columnInFile/DelimitedColumnNamesInFile.java 2006-10-16 12:59:13 UTC (rev 56) +++ trunk/PZFileReader/src/test/java/com/test/delim/columnInFile/DelimitedColumnNamesInFile.java 2006-10-16 13:44:42 UTC (rev 57) @@ -3,7 +3,7 @@ /* * Created on Nov 27, 2005 * - */ + */ import java.io.File; @@ -25,21 +25,21 @@ DataSet ds = null; String[] colNames = null; OrderBy orderby = null; - - + + //delimited by a comma //text qualified by double quotes //ignore first record ds = new DataSet(new File("com/test/delim/columnInFile/PEOPLE-CommaDelimitedWithQualifier.txt"),",","\"",false); - + //re order the data set by last name orderby = new OrderBy(); orderby.addOrderColumn(new OrderColumn("CITY",false)); orderby.addOrderColumn(new OrderColumn("LASTNAME",true)); ds.orderRows(orderby); - + colNames = ds.getColumns(); - + while (ds.next()){ for (int i = 0; i < colNames.length; i++){ System.out.println("COLUMN NAME: " + colNames[i] + " VALUE: " + ds.getString(colNames[i])); @@ -47,8 +47,8 @@ System.out.println("==========================================================================="); } - - + + if (ds.getErrors() != null && ds.getErrors().size() > 0){ System.out.println("FOUND ERRORS IN FILE...."); for (int i = 0; i < ds.getErrors().size(); i++){ @@ -56,16 +56,16 @@ System.out.println("Error: " + de.getErrorDesc() + " Line: " + de.getLineNo()); } } - + //clear out the DataSet object for the JVM to collect ds.freeMemory(); - + } - - + + //used for Junit test - + public DataSet getDsForTest() throws Exception{ - return new DataSet(new File("com/test/delim/columnInFile/PEOPLE-CommaDelimitedWithQualifier.txt"),",","\"",false); + return new DataSet(new File("src/test/java/com/test/delim/columnInFile/PEOPLE-CommaDelimitedWithQualifier.txt"),",","\"",false); } } Copied: trunk/PZFileReader/src/test/java/com/test/delim/columnInFile/DelimitedColumnNamesInFileTest.java (from rev 56, trunk/PZFileReader/src/test/java/com/test/delim/columnInFile/TestDelimitedColumnNamesInFile.java) =================================================================== --- trunk/PZFileReader/src/test/java/com/test/delim/columnInFile/DelimitedColumnNamesInFileTest.java (rev 0) +++ trunk/PZFileReader/src/test/java/com/test/delim/columnInFile/DelimitedColumnNamesInFileTest.java 2006-10-16 13:44:42 UTC (rev 57) @@ -0,0 +1,94 @@ +/* + * Created on Feb 26, 2006 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ +package com.test.delim.columnInFile; + +import com.pz.reader.DataSet; + +import junit.framework.TestCase; + +/** + * @author zepernick + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ +public class DelimitedColumnNamesInFileTest extends TestCase { + public DelimitedColumnNamesInFileTest( + String name) { + super(name); + } + + //tests to make sure we have 0 errors + public void testErrorCount() { + DataSet ds = null; + + try{ + DelimitedColumnNamesInFile testDelimted = new DelimitedColumnNamesInFile(); + + ds = testDelimted.getDsForTest(); + + //check that we had no errors + assertEquals(0, ds.getErrors().size()); + + + }catch(Exception ex){ + ex.printStackTrace(); + }finally{ + if (ds != null) ds.freeMemory(); + } + } + + //test to make sure we parsed the correct number + //of rows in the file + public void testRowCount(){ + DataSet ds = null; + + try{ + DelimitedColumnNamesInFile testDelimted = new DelimitedColumnNamesInFile(); + + ds = testDelimted.getDsForTest(); + + //check that we parsed in the right amount of rows + assertEquals(6, ds.rows.size()); + + + + }catch(Exception ex){ + ex.printStackTrace(); + }finally{ + if (ds != null) ds.freeMemory(); + } + } + + + //test to make sure we have the right number of column names from the file + public void testColumnNameCount(){ + DataSet ds = null; + + try{ + DelimitedColumnNamesInFile testDelimted = new DelimitedColumnNamesInFile(); + + ds = testDelimted.getDsForTest(); + + //check that we parsed in the right amount of column names + assertEquals(6, ds.getColumns().length); + + + + }catch(Exception ex){ + ex.printStackTrace(); + }finally{ + if (ds != null) ds.freeMemory(); + } + } + + + public static void main(String[] args) { + junit.textui.TestRunner.run( + DelimitedColumnNamesInFileTest.class); + } +} Deleted: trunk/PZFileReader/src/test/java/com/test/delim/columnInFile/TestDelimitedColumnNamesInFile.java =================================================================== --- trunk/PZFileReader/src/test/java/com/test/delim/columnInFile/TestDelimitedColumnNamesInFile.java 2006-10-16 12:59:13 UTC (rev 56) +++ trunk/PZFileReader/src/test/java/com/test/delim/columnInFile/TestDelimitedColumnNamesInFile.java 2006-10-16 13:44:42 UTC (rev 57) @@ -1,94 +0,0 @@ -/* - * Created on Feb 26, 2006 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ -package com.test.delim.columnInFile; - -import com.pz.reader.DataSet; - -import junit.framework.TestCase; - -/** - * @author zepernick - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class TestDelimitedColumnNamesInFile extends TestCase { - public TestDelimitedColumnNamesInFile( - String name) { - super(name); - } - - //tests to make sure we have 0 errors - public void testErrorCount() { - DataSet ds = null; - - try{ - DelimitedColumnNamesInFile testDelimted = new DelimitedColumnNamesInFile(); - - ds = testDelimted.getDsForTest(); - - //check that we had no errors - assertEquals(0, ds.getErrors().size()); - - - }catch(Exception ex){ - ex.printStackTrace(); - }finally{ - if (ds != null) ds.freeMemory(); - } - } - - //test to make sure we parsed the correct number - //of rows in the file - public void testRowCount(){ - DataSet ds = null; - - try{ - DelimitedColumnNamesInFile testDelimted = new DelimitedColumnNamesInFile(); - - ds = testDelimted.getDsForTest(); - - //check that we parsed in the right amount of rows - assertEquals(6, ds.rows.size()); - - - - }catch(Exception ex){ - ex.printStackTrace(); - }finally{ - if (ds != null) ds.freeMemory(); - } - } - - - //test to make sure we have the right number of column names from the file - public void testColumnNameCount(){ - DataSet ds = null; - - try{ - DelimitedColumnNamesInFile testDelimted = new DelimitedColumnNamesInFile(); - - ds = testDelimted.getDsForTest(); - - //check that we parsed in the right amount of column names - assertEquals(6, ds.getColumns().length); - - - - }catch(Exception ex){ - ex.printStackTrace(); - }finally{ - if (ds != null) ds.freeMemory(); - } - } - - - public static void main(String[] args) { - junit.textui.TestRunner.run( - TestDelimitedColumnNamesInFile.class); - } -} Deleted: trunk/PZFileReader/src/test/java/com/test/delim/multiLine/CSVPerformanceTest.java =================================================================== --- trunk/PZFileReader/src/test/java/com/test/delim/multiLine/CSVPerformanceTest.java 2006-10-16 12:59:13 UTC (rev 56) +++ trunk/PZFileReader/src/test/java/com/test/delim/multiLine/CSVPerformanceTest.java 2006-10-16 13:44:42 UTC (rev 57) @@ -1,100 +0,0 @@ -package com.test.delim.multiLine; -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.util.HashMap; -import java.util.Map; - -import com.pz.reader.DataError; -import com.pz.reader.LargeDataSet; - - - -/* - * Created on Dec 1, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ - -/** - * @author zepernick - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class CSVPerformanceTest { - - public static void main(String[] args) { - - LargeDataSet ds = null; - String[] colNames = null; - - try{ - - - - //delimited by a comma - //text qualified by double quotes - //ignore first record - long timeStarted = System.currentTimeMillis(); - ds = new LargeDataSet(new File("com/test/delim/multiLine/PEOPLE-CommaDelimitedWithQualifier.txt"),",","\"",false); - long timeFinished = System.currentTimeMillis(); - - - String timeMessage = ""; - - if (timeFinished - timeStarted < 1000){ - timeMessage = (timeFinished - timeStarted) + " Milleseconds..." ; - }else{ - timeMessage = ((timeFinished - timeStarted) / 1000) + " Seconds..."; - } - - System.out.println(""); - System.out.println("********FILE PARSED IN: " + timeMessage + " ******"); - Thread.sleep(2000); //sleep for a couple seconds to the message above can be read - - timeStarted = System.currentTimeMillis(); - - int times = 0; - while (ds.next()) { - colNames = ds.getColumns(); - for (int i = 0; i < colNames.length; i++){ - System.out.println("COLUMN NAME: " + colNames[i] + " VALUE: " + ds.getString(colNames[i])); - } - - System.out.println("==========================================================================="); - times++; - } - timeFinished = System.currentTimeMillis(); - - if (timeFinished - timeStarted < 1000){ - timeMessage = (timeFinished - timeStarted) + " Milleseconds..." ; - }else{ - timeMessage = ((timeFinished - timeStarted) / 1000) + " Seconds..."; - } - - System.out.println(""); - System.out.println("********Displayed Data To Console In: " + timeMessage + " ******"); - - - - if (ds.getErrors() != null && ds.getErrors().size() > 0){ - System.out.println("FOUND ERRORS IN FILE...."); - for (int i = 0; i < ds.getErrors().size(); i++){ - DataError de = (DataError)ds.getErrors().get(i); - System.out.println("Error: " + de.getErrorDesc() + " Line: " + de.getLineNo()); - } - } - - //clear out the DataSet object for the JVM to collect - ds.freeMemory(); - }catch(Exception ex){ - ex.printStackTrace(); - } - - - } - - -} Copied: trunk/PZFileReader/src/test/java/com/test/delim/multiLine/TestCSVPerformance.java (from rev 56, trunk/PZFileReader/src/test/java/com/test/delim/multiLine/CSVPerformanceTest.java) =================================================================== --- trunk/PZFileReader/src/test/java/com/test/delim/multiLine/TestCSVPerformance.java (rev 0) +++ trunk/PZFileReader/src/test/java/com/test/delim/multiLine/TestCSVPerformance.java 2006-10-16 13:44:42 UTC (rev 57) @@ -0,0 +1,96 @@ +package com.test.delim.multiLine; +import java.io.File; + +import com.pz.reader.DataError; +import com.pz.reader.LargeDataSet; + + + +/* + * Created on Dec 1, 2005 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ + +/** + * @author zepernick + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ +public class TestCSVPerformance { + + public static void main(String[] args) { + + LargeDataSet ds = null; + String[] colNames = null; + + try{ + + + + //delimited by a comma + //text qualified by double quotes + //ignore first record + long timeStarted = System.currentTimeMillis(); + ds = new LargeDataSet(new File("com/test/delim/multiLine/PEOPLE-CommaDelimitedWithQualifier.txt"),",","\"",false); + long timeFinished = System.currentTimeMillis(); + + + String timeMessage = ""; + + if (timeFinished - timeStarted < 1000){ + timeMessage = (timeFinished - timeStarted) + " Milleseconds..." ; + }else{ + timeMessage = ((timeFinished - timeStarted) / 1000) + " Seconds..."; + } + + System.out.println(""); + System.out.println("********FILE PARSED IN: " + timeMessage + " ******"); + Thread.sleep(2000); //sleep for a couple seconds to the message above can be read + + timeStarted = System.currentTimeMillis(); + + int times = 0; + while (ds.next()) { + colNames = ds.getColumns(); + for (int i = 0; i < colNames.length; i++){ + System.out.println("COLUMN NAME: " + colNames[i] + " VALUE: " + ds.getString(colNames[i])); + } + + System.out.println("==========================================================================="); + times++; + } + timeFinished = System.currentTimeMillis(); + + if (timeFinished - timeStarted < 1000){ + timeMessage = (timeFinished - timeStarted) + " Milleseconds..." ; + }else{ + timeMessage = ((timeFinished - timeStarted) / 1000) + " Seconds..."; + } + + System.out.println(""); + System.out.println("********Displayed Data To Console In: " + timeMessage + " ******"); + + + + if (ds.getErrors() != null && ds.getErrors().size() > 0){ + System.out.println("FOUND ERRORS IN FILE...."); + for (int i = 0; i < ds.getErrors().size(); i++){ + DataError de = (DataError)ds.getErrors().get(i); + System.out.println("Error: " + de.getErrorDesc() + " Line: " + de.getLineNo()); + } + } + + //clear out the DataSet object for the JVM to collect + ds.freeMemory(); + }catch(Exception ex){ + ex.printStackTrace(); + } + + + } + + +} Modified: trunk/PZFileReader/src/test/java/com/test/delim/tab/TabDelimited.java =================================================================== --- trunk/PZFileReader/src/test/java/com/test/delim/tab/TabDelimited.java 2006-10-16 12:59:13 UTC (rev 56) +++ trunk/PZFileReader/src/test/java/com/test/delim/tab/TabDelimited.java 2006-10-16 13:44:42 UTC (rev 57) @@ -5,12 +5,9 @@ */ import java.io.File; -import java.io.FileInputStream; import com.pz.reader.DataError; import com.pz.reader.DataSet; -import com.pz.reader.ordering.OrderBy; -import com.pz.reader.ordering.OrderColumn; @@ -24,10 +21,9 @@ public static void main(String[] args)throws Exception{ DataSet ds = null; String[] colNames = null; - OrderBy orderby = null; File tmpFile = null; - - + + //delimited by a comma //text qualified by double quotes //ignore first record @@ -35,15 +31,15 @@ System.out.println("tmp file path: " + tmpFile); //ds = new DataSet(new FileInputStream(tmpFile),"\t","",true); ds = new DataSet(tmpFile,"\t","\"",true); - + //re order the data set by last name /* orderby = new OrderBy(); orderby.addOrderColumn(new OrderColumn("CITY",false)); orderby.addOrderColumn(new OrderColumn("LASTNAME",true)); ds.orderRows(orderby);*/ - + colNames = ds.getColumns(); - + while (ds.next()){ for (int i = 0; i < colNames.length; i++){ System.out.println("COLUMN NAME: " + colNames[i] + " VALUE: " + ds.getString(colNames[i])); @@ -51,8 +47,8 @@ System.out.println("==========================================================================="); } - - + + if (ds.getErrors() != null && ds.getErrors().size() > 0){ System.out.println("FOUND ERRORS IN FILE...."); for (int i = 0; i < ds.getErrors().size(); i++){ @@ -60,16 +56,16 @@ System.out.println("Error: " + de.getErrorDesc() + " Line: " + de.getLineNo()); } } - + //clear out the DataSet object for the JVM to collect ds.freeMemory(); - + } - - + + //used for Junit test - + public DataSet getDsForTest() throws Exception{ - return new DataSet(new File("com/test/delim/tab/PEOPLE-TabDelimitedWithQualifier.txt"),"\t","\"",true); + return new DataSet(new File("src/test/java/com/test/delim/tab/PEOPLE-TabDelimitedWithQualifier.txt"),"\t","\"",true); } } Copied: trunk/PZFileReader/src/test/java/com/test/delim/tab/TabDelimitedTest.java (from rev 56, trunk/PZFileReader/src/test/java/com/test/delim/tab/TestTabDelimited.java) =================================================================== --- trunk/PZFileReader/src/test/java/com/test/delim/tab/TabDelimitedTest.java (rev 0) +++ trunk/PZFileReader/src/test/java/com/test/delim/tab/TabDelimitedTest.java 2006-10-16 13:44:42 UTC (rev 57) @@ -0,0 +1,94 @@ +/* + * Created on Feb 26, 2006 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ +package com.test.delim.tab; + +import com.pz.reader.DataSet; + +import junit.framework.TestCase; + +/** + * @author zepernick + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ +public class TabDelimitedTest extends TestCase { + public TabDelimitedTest( + String name) { + super(name); + } + + //tests to make sure we have 0 errors + public void testErrorCount() { + DataSet ds = null; + + try{ + TabDelimited testTab = new TabDelimited(); + + ds = testTab.getDsForTest(); + + //check that we had no errors + assertEquals(0, ds.getErrors().size()); + + + }catch(Exception ex){ + ex.printStackTrace(); + }finally{ + if (ds != null) ds.freeMemory(); + } + } + + //test to make sure we parsed the correct number + //of rows in the file + public void testRowCount(){ + DataSet ds = null; + + try{ + TabDelimited testTab = new TabDelimited(); + + ds = testTab.getDsForTest(); + + //check that we parsed in the right amount of rows + assertEquals(2, ds.rows.size()); + + + + }catch(Exception ex){ + ex.printStackTrace(); + }finally{ + if (ds != null) ds.freeMemory(); + } + } + + + //test to make sure we have the right number of column names from the file + public void testColumnNameCount(){ + DataSet ds = null; + + try{ + TabDelimited testTab = new TabDelimited(); + + ds = testTab.getDsForTest(); + + //check that we parsed in the right amount of column names + assertEquals(5, ds.getColumns().length); + + + + }catch(Exception ex){ + ex.printStackTrace(); + }finally{ + if (ds != null) ds.freeMemory(); + } + } + + + public static void main(String[] args) { + junit.textui.TestRunner.run( + TabDelimitedTest.class); + } +} Deleted: trunk/PZFileReader/src/test/java/com/test/delim/tab/TestTabDelimited.java =================================================================== --- trunk/PZFileReader/src/test/java/com/test/delim/tab/TestTabDelimited.java 2006-10-16 12:59:13 UTC (rev 56) +++ trunk/PZFileReader/src/test/java/com/test/delim/tab/TestTabDelimited.java 2006-10-16 13:44:42 UTC (rev 57) @@ -1,94 +0,0 @@ -/* - * Created on Feb 26, 2006 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ -package com.test.delim.tab; - -import com.pz.reader.DataSet; - -import junit.framework.TestCase; - -/** - * @author zepernick - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class TestTabDelimited extends TestCase { - public TestTabDelimited( - String name) { - super(name); - } - - //tests to make sure we have 0 errors - public void testErrorCount() { - DataSet ds = null; - - try{ - TabDelimited testTab = new TabDelimited(); - - ds = testTab.getDsForTest(); - - //check that we had no errors - assertEquals(0, ds.getErrors().size()); - - - }catch(Exception ex){ - ex.printStackTrace(); - }finally{ - if (ds != null) ds.freeMemory(); - } - } - - //test to make sure we parsed the correct number - //of rows in the file - public void testRowCount(){ - DataSet ds = null; - - try{ - TabDelimited testTab = new TabDelimited(); - - ds = testTab.getDsForTest(); - - //check that we parsed in the right amount of rows - assertEquals(2, ds.rows.size()); - - - - }catch(Exception ex){ - ex.printStackTrace(); - }finally{ - if (ds != null) ds.freeMemory(); - } - } - - - //test to make sure we have the right number of column names from the file - public void testColumnNameCount(){ - DataSet ds = null; - - try{ - TabDelimited testTab = new TabDelimited(); - - ds = testTab.getDsForTest(); - - //check that we parsed in the right amount of column names - assertEquals(5, ds.getColumns().length); - - - - }catch(Exception ex){ - ex.printStackTrace(); - }finally{ - if (ds != null) ds.freeMemory(); - } - } - - - public static void main(String[] args) { - junit.textui.TestRunner.run( - TestTabDelimited.class); - } -} Property changes on: trunk/PZFileReaderSamples ___________________________________________________________________ Name: svn:ignore + target Modified: trunk/PZFileReaderSamples/.classpath =================================================================== --- trunk/PZFileReaderSamples/.classpath 2006-10-16 12:59:13 UTC (rev 56) +++ trunk/PZFileReaderSamples/.classpath 2006-10-16 13:44:42 UTC (rev 57) @@ -1,7 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> + <classpath> - <classpathentry kind="src" path=""/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="src" path="/PZFileReader"/> - <classpathentry kind="output" path=""/> -</classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"></classpathentry> + <classpathentry excluding="" kind="src" path="src/main/java"></classpathentry> + <classpathentry path="MAVEN_REPO/com.pz.reader/jars/pzfilereader-2.2.0.jar" kind="var"></classpathentry> + <classpathentry path="MAVEN_REPO/jdom/jars/jdom-1.0.jar" kind="var"></classpathentry> + <classpathentry path="MAVEN_REPO/jexcelapi/jars/jxl-2.4.2.jar" kind="var"></classpathentry> + <classpathentry kind="output" path="target/classes"></classpathentry> +</classpath> \ No newline at end of file Modified: trunk/PZFileReaderSamples/.project =================================================================== --- trunk/PZFileReaderSamples/.project 2006-10-16 12:59:13 UTC (rev 56) +++ trunk/PZFileReaderSamples/.project 2006-10-16 13:44:42 UTC (rev 57) @@ -1,22 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> + <projectDescription> - <name>PZFileReaderSamples</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>com.ibm.sse.model.structuredbuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> + <name>pzfilereader-examples</name> + <comment>Simple Java delimited and fixed width file parser. Handles CSV, Excel CSV, Tab, Pipe delimiters, just to name a few. Maps column positions in the file to user friendly names via XML. See PZFileReader Feature List under News for complete feature list.</comment> + <projects></projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments></arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> \ No newline at end of file Added: trunk/PZFileReaderSamples/maven.xml =================================================================== --- trunk/PZFileReaderSamples/maven.xml (rev 0) +++ trunk/PZFileReaderSamples/maven.xml 2006-10-16 13:44:42 UTC (rev 57) @@ -0,0 +1,18 @@ +<?xml version="1.0"?> + +<!-- + /* + * ======================================================================== + * ObjectLab Financial Ltd, proud sponsor of PZFileReader. + * ======================================================================== + */ +--> + +<project xmlns:j="jelly:core" xmlns:core="jelly:core" + xmlns:maven="jelly:maven" xmlns:ant="jelly:ant" + xmlns:define="jelly:define" xmlns:doc="doc" xmlns:util="jelly:util" + xmlns:log="jelly:log"> + + <goal name="pz:build" prereqs="jar:install" /> + <goal name="pz:rebuild" prereqs="clean,kit:build" /> +</project> Added: trunk/PZFileReaderSamples/project.xml =================================================================== --- trunk/PZFileReaderSamples/project.xml (rev 0) +++ trunk/PZFileReaderSamples/project.xml 2006-10-16 13:44:42 UTC (rev 57) @@ -0,0 +1,65 @@ +<?xml version="1.0"?> + +<!-- + /* + * ======================================================================== + * $Id: project.xml 167 2006-09-12 15:11:43Z benoitx $ + * + * Copyright 2006 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + * ======================================================================== + */ +--> + +<project> + <extend>../common-build/project.xml</extend> + <name>PZFileReader Examples</name> + <artifactId>pzfilereader-examples</artifactId> + <package>com.pz.reader</package> + <shortDescription>PZFileReader </shortDescription> + <description> + Simple Java delimited and fixed width file parser. Handles CSV, Excel CSV, Tab, Pipe delimiters, just to name a few. + Maps column positions in the file to user friendly names via XML. See PZFileReader Feature List under News for complete feature list. + </description> + <repository> + <connection> + scm:svn:https://svn.sourceforge.net/svnroot/pzfilereader/trunk/PZFileReader + </connection> + <developerConnection> + scm:svn:https://svn.sourceforge.net/svnroot/pzfilereader/trunk/PZFileReader + </developerConnection> + </repository> + <dependencies> + <dependency> + <groupId>com.pz.reader</groupId> + <artifactId>pzfilereader</artifactId> + <version>${pom.currentVersion}</version> + <type>jar</type> + </dependency> + </dependencies> + + <build> + <sourceDirectory>src/main/java</sourceDirectory> + <unitTestSourceDirectory>src/test/java</unitTestSourceDirectory> + <unitTest> + <includes> + <include>**/*NOTest.java</include> + </includes> + <excludes> + <exclude>**/Abstract*.java</exclude> + </excludes> + </unitTest> + </build> + +</project> Added: trunk/PZFileReaderSamples/qalab.xml =================================================================== --- trunk/PZFileReaderSamples/qalab.xml (rev 0) +++ trunk/PZFileReaderSamples/qalab.xml 2006-10-16 13:44:42 UTC (rev 57) @@ -0,0 +1,148 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE qalab [<!ELEMENT qalab (summary,file*)> +<!ATTLIST qalab version CDATA #REQUIRED> +<!ELEMENT summary (summaryresult*)> +<!ELEMENT file (result+)> +<!ATTLIST file id ID #REQUIRED> +<!ATTLIST file path CDATA #REQUIRED> +<!ELEMENT result EMPTY> +<!ATTLIST result date CDATA #REQUIRED> +<!ATTLIST result statvalue CDATA #REQUIRED> +<!ATTLIST result type CDATA #REQUIRED> +<!ELEMENT summaryresult EMPTY> +<!ATTLIST summaryresult date CDATA #REQUIRED> +<!ATTLIST summaryresult statvalue CDATA #REQUIRED> +<!ATTLIST summaryresult filecount CDATA #REQUIRED> +<!ATTLIST summaryresult type CDATA #REQUIRED> +]> +<qalab version="1.1"> + <summary> + <summaryresult date="2006-10-16" filecount="30" statvalue="223" type="checkstyle"/> + <summaryresult date="2006-10-16" filecount="6" statvalue="12" type="pmd"/> + <summaryresult date="2006-10-16" filecount="4" statvalue="5" type="findbugs"/> + <summaryresult date="2006-10-16" filecount="4" statvalue="70" type="simian"/> + </summary> + <file id="com_pz_reader_examples_numericsanddates_package.html" path="com/pz/reader/examples/numericsanddates/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file id="com_pz_reader_examples_exporttoexcel_package.html" path="com/pz/reader/examples/exporttoexcel/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file id="com_pz_reader_examples_csvperformancetest_package.html" path="com/pz/reader/examples/csvperformancetest/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file + id="com_pz_reader_examples_largedataset_fixedlengthdynamiccolumns_package.html" path="com/pz/reader/examples/largedataset/fixedlengthdynamiccolumns/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file id="com_pz_reader_examples_lowlevelparse_package.html" path="com/pz/reader/examples/lowlevelparse/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file + id="com_pz_reader_examples_largedataset_largecsvperformancetest_package.html" path="com/pz/reader/examples/largedataset/largecsvperformancetest/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file + id="com_pz_reader_examples_multilinedelimitedrecord_package.html" path="com/pz/reader/examples/multilinedelimitedrecord/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file + id="com_pz_reader_examples_delimitedcolumnnamesinfile_package.html" path="com/pz/reader/examples/delimitedcolumnnamesinfile/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file id="com_pz_reader_examples_csvheaderandtrailer_package.html" path="com/pz/reader/examples/csvheaderandtrailer/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file + id="com_pz_reader_examples_largedataset_delimiteddynamiccolumns_package.html" path="com/pz/reader/examples/largedataset/delimiteddynamiccolumns/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file + id="com_pz_reader_examples_fixedlengthdynamiccolumns_package.html" path="com/pz/reader/examples/fixedlengthdynamiccolumns/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file id="com_pz_reader_examples_createsamplecsv_package.html" path="com/pz/reader/examples/createsamplecsv/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file + id="com_pz_reader_examples_delimiteddynamiccolumnswitherrors_package.html" path="com/pz/reader/examples/delimiteddynamiccolumnswitherrors/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file + id="com_pz_reader_examples_delimiteddynamiccolumns_package.html" path="com/pz/reader/examples/delimiteddynamiccolumns/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file + id="com_pz_reader_examples_fixedlengthheaderandtrailer_package.html" path="com/pz/reader/examples/fixedlengthheaderandtrailer/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file + id="com_pz_reader_examples_createsamplecsv_CSVTestFileCreator.java" path="com/pz/reader/examples/createsamplecsv/CSVTestFileCreator.java"> + <result date="2006-10-16" statvalue="9" type="checkstyle"/> + <result date="2006-10-16" statvalue="1" type="pmd"/> + <result date="2006-10-16" statvalue="1" type="findbugs"/> + </file> + <file + id="com_pz_reader_examples_csvheaderandtrailer_CSVHeaderAndTrailer.java" path="com/pz/reader/examples/csvheaderandtrailer/CSVHeaderAndTrailer.java"> + <result date="2006-10-16" statvalue="20" type="checkstyle"/> + <result date="2006-10-16" statvalue="3" type="pmd"/> + </file> + <file + id="com_pz_reader_examples_csvperformancetest_CSVPerformanceTest.java" path="com/pz/reader/examples/csvperformancetest/CSVPerformanceTest.java"> + <result date="2006-10-16" statvalue="57" type="checkstyle"/> + <result date="2006-10-16" statvalue="1" type="findbugs"/> + </file> + <file + id="com_pz_reader_examples_delimitedcolumnnamesinfile_DelimitedColumnNamesInFile.java" path="com/pz/reader/examples/delimitedcolumnnamesinfile/DelimitedColumnNamesInFile.java"> + <result date="2006-10-16" statvalue="5" type="checkstyle"/> + </file> + <file + id="com_pz_reader_examples_delimiteddynamiccolumns_DelimitedWithPZMap.java" path="com/pz/reader/examples/delimiteddynamiccolumns/DelimitedWithPZMap.java"> + <result date="2006-10-16" statvalue="4" type="checkstyle"/> + </file> + <file + id="com_pz_reader_examples_delimiteddynamiccolumnswitherrors_DelimitedWithPZMapErrors.java" path="com/pz/reader/examples/delimiteddynamiccolumnswitherrors/DelimitedWithPZMapErrors.java"> + <result date="2006-10-16" statvalue="5" type="checkstyle"/> + </file> + <file + id="com_pz_reader_examples_exporttoexcel_DelimitedFileExportToExcel.java" path="com/pz/reader/examples/exporttoexcel/DelimitedFileExportToExcel.java"> + <result date="2006-10-16" statvalue="2" type="checkstyle"/> + </file> + <file + id="com_pz_reader_examples_fixedlengthdynamiccolumns_FixedLengthWithPZMap.java" path="com/pz/reader/examples/fixedlengthdynamiccolumns/FixedLengthWithPZMap.java"> + <result date="2006-10-16" statvalue="3" type="checkstyle"/> + </file> + <file + id="com_pz_reader_examples_fixedlengthheaderandtrailer_FixedLengthHeaderAndTrailer.java" path="com/pz/reader/examples/fixedlengthheaderandtrailer/FixedLengthHeaderAndTrailer.java"> + <result date="2006-10-16" statvalue="17" type="checkstyle"/> + </file> + <file + id="com_pz_reader_examples_largedataset_delimiteddynamiccolumns_DelimitedWithPZMap.java" path="com/pz/reader/examples/largedataset/delimiteddynamiccolumns/DelimitedWithPZMap.java"> + <result date="2006-10-16" statvalue="9" type="checkstyle"/> + <result date="2006-10-16" statvalue="2" type="pmd"/> + </file> + <file + id="com_pz_reader_examples_largedataset_fixedlengthdynamiccolumns_FixedLengthWithPZMap.java" path="com/pz/reader/examples/largedataset/fixedlengthdynamiccolumns/FixedLengthWithPZMap.java"> + <result date="2006-10-16" statvalue="4" type="checkstyle"/> + </file> + <file + id="com_pz_reader_examples_largedataset_largecsvperformancetest_CSVLarge.java" path="com/pz/reader/examples/largedataset/largecsvperformancetest/CSVLarge.java"> + <result date="2006-10-16" statvalue="33" type="checkstyle"/> + <result date="2006-10-16" statvalue="1" type="findbugs"/> + </file> + <file id="com_pz_reader_examples_lowlevelparse_LowLevelParse.java" path="com/pz/reader/examples/lowlevelparse/LowLevelParse.java"> + <result date="2006-10-16" statvalue="24" type="checkstyle"/> + <result date="2006-10-16" statvalue="2" type="pmd"/> + <result date="2006-10-16" statvalue="2" type="findbugs"/> + </file> + <file + id="com_pz_reader_examples_multilinedelimitedrecord_DelimitedMultiLine.java" path="com/pz/reader/examples/multilinedelimitedrecord/DelimitedMultiLine.java"> + <result date="2006-10-16" statvalue="8" type="checkstyle"/> + <result date="2006-10-16" statvalue="2" type="pmd"/> + </file> + <file + id="com_pz_reader_examples_numericsanddates_NumericsAndDates.java" path="com/pz/reader/examples/numericsanddates/NumericsAndDates.java"> + <result date="2006-10-16" statvalue="8" type="checkstyle"/> + <result date="2006-10-16" statvalue="2" type="pmd"/> + </file> +</qalab> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2006-10-16 13:01:52
|
Revision: 56 http://svn.sourceforge.net/pzfilereader/?rev=56&view=rev Author: benoitx Date: 2006-10-16 05:59:13 -0700 (Mon, 16 Oct 2006) Log Message: ----------- May look a bit scary but there was no code change. I still need to think further about the examples but now the project is split in 2 modules, the main library pzfilereader and the examples pzfilereader-examples. Both follow the same version numbering. Each can be built at their level (e.e the PZFileReader directory or PZFileReaderSamples directory. But preferably at the top level using: maven pz:build maven pz:rebuild maven pz:site maven pz:releasebuild The Site is the generated in target/pzfilereader-site-2.2.0/bin/pzfilereader-2.2.0/docs More to follow... Modified Paths: -------------- trunk/PZFileReader/build.xml Added Paths: ----------- trunk/LICENSE.txt trunk/PZFileReader/maven.xml trunk/PZFileReader/project.xml trunk/PZFileReader/qalab.xml trunk/PZFileReader/src/ trunk/PZFileReader/src/main/ trunk/PZFileReader/src/main/java/ trunk/PZFileReader/src/main/java/com/ trunk/PZFileReader/src/main/java/com/pz/ trunk/PZFileReader/src/main/java/com/pz/reader/ trunk/PZFileReader/src/main/java/com/pz/reader/DataError.java trunk/PZFileReader/src/main/java/com/pz/reader/DataSet.java trunk/PZFileReader/src/main/java/com/pz/reader/LargeDataSet.java trunk/PZFileReader/src/main/java/com/pz/reader/Version.java trunk/PZFileReader/src/main/java/com/pz/reader/ordering/ trunk/PZFileReader/src/main/java/com/pz/reader/ordering/OrderBy.java trunk/PZFileReader/src/main/java/com/pz/reader/ordering/OrderColumn.java trunk/PZFileReader/src/main/java/com/pz/reader/structure/ trunk/PZFileReader/src/main/java/com/pz/reader/structure/ColumnMetaData.java trunk/PZFileReader/src/main/java/com/pz/reader/structure/Row.java trunk/PZFileReader/src/main/java/com/pz/reader/util/ trunk/PZFileReader/src/main/java/com/pz/reader/util/ExcelTransformer.java trunk/PZFileReader/src/main/java/com/pz/reader/util/ParserUtils.java trunk/PZFileReader/src/main/java/com/pz/reader/xml/ trunk/PZFileReader/src/main/java/com/pz/reader/xml/PZMapParser.java trunk/PZFileReader/src/main/java/com/pz/reader/xml/ResolveLocalDTD.java trunk/PZFileReader/src/main/java/com/pz/reader/xml/XMLRecordElement.java trunk/PZFileReader/src/main/java/com/pz/reader/xml/pzfilereader.dtd trunk/PZFileReader/src/site/ trunk/PZFileReader/src/site/index.xml trunk/PZFileReader/src/site/navigation.xml trunk/PZFileReader/src/test/ trunk/PZFileReader/src/test/java/ trunk/PZFileReader/src/test/java/com/ trunk/PZFileReader/src/test/java/com/test/ trunk/PZFileReader/src/test/java/com/test/AllJunitTests.java trunk/PZFileReader/src/test/java/com/test/delim/ trunk/PZFileReader/src/test/java/com/test/delim/columnInFile/ trunk/PZFileReader/src/test/java/com/test/delim/columnInFile/DelimitedColumnNamesInFile.java trunk/PZFileReader/src/test/java/com/test/delim/columnInFile/PEOPLE-CommaDelimitedWithQualifier.txt trunk/PZFileReader/src/test/java/com/test/delim/columnInFile/TestDelimitedColumnNamesInFile.java trunk/PZFileReader/src/test/java/com/test/delim/multiLine/ trunk/PZFileReader/src/test/java/com/test/delim/multiLine/CSVPerformanceTest.java trunk/PZFileReader/src/test/java/com/test/delim/multiLine/PEOPLE-CommaDelimitedWithQualifier.txt trunk/PZFileReader/src/test/java/com/test/delim/tab/ trunk/PZFileReader/src/test/java/com/test/delim/tab/PEOPLE-TabDelimitedWithQualifier.txt trunk/PZFileReader/src/test/java/com/test/delim/tab/TabDelimited.java trunk/PZFileReader/src/test/java/com/test/delim/tab/TestTabDelimited.java trunk/PZFileReaderSamples/src/ trunk/PZFileReaderSamples/src/main/ trunk/PZFileReaderSamples/src/main/java/ trunk/PZFileReaderSamples/src/main/java/com/ trunk/PZFileReaderSamples/src/main/java/com/pz/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/createsamplecsv/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/createsamplecsv/CSVTestFileCreator.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/createsamplecsv/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/createsamplecsv/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvheaderandtrailer/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvheaderandtrailer/CSVHeaderAndTrailer.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvheaderandtrailer/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvheaderandtrailer/PEOPLE-CommaDelimitedWithQualifier.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvheaderandtrailer/PEOPLE-Delimited.pzmap.xml trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvheaderandtrailer/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvperformancetest/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvperformancetest/CSVPerformanceTest.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvperformancetest/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvperformancetest/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvperformancetest/SampleCSV.csv trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/csvperformancetest/settings.properties trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimitedcolumnnamesinfile/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimitedcolumnnamesinfile/DelimitedColumnNamesInFile.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimitedcolumnnamesinfile/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimitedcolumnnamesinfile/PEOPLE-CommaDelimitedWithQualifier.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimitedcolumnnamesinfile/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumns/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumns/DelimitedWithPZMap.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumns/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumns/PEOPLE-CommaDelimitedWithQualifier.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumns/PEOPLE-Delimited.pzmap.xml trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumns/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumnswitherrors/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumnswitherrors/DelimitedWithPZMapErrors.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumnswitherrors/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumnswitherrors/PEOPLE-CommaDelimitedWithQualifier.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumnswitherrors/PEOPLE-Delimited.pzmap.xml trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/delimiteddynamiccolumnswitherrors/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/exporttoexcel/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/exporttoexcel/DelimitedFileExportToExcel.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/exporttoexcel/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/exporttoexcel/PEOPLE-CommaDelimitedWithQualifier.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/exporttoexcel/PEOPLE-Delimited.pzmap.xml trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/exporttoexcel/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthdynamiccolumns/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthdynamiccolumns/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthdynamiccolumns/FixedLengthWithPZMap.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthdynamiccolumns/PEOPLE-FixedLength.pzmap.xml trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthdynamiccolumns/PEOPLE-FixedLength.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthdynamiccolumns/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthheaderandtrailer/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthheaderandtrailer/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthheaderandtrailer/FixedLengthHeaderAndTrailer.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthheaderandtrailer/PEOPLE-FixedLength.pzmap.xml trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthheaderandtrailer/PEOPLE-FixedLength.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/fixedlengthheaderandtrailer/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/jsptableexample/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/jsptableexample/pzfilereaderwebsamples/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/jsptableexample/pzfilereaderwebsamples/PEOPLE.pzmap.xml trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/jsptableexample/pzfilereaderwebsamples/PEOPLE.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/jsptableexample/pzfilereaderwebsamples/WEB-INF/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/jsptableexample/pzfilereaderwebsamples/WEB-INF/classes/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/jsptableexample/pzfilereaderwebsamples/WEB-INF/lib/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/jsptableexample/pzfilereaderwebsamples/WEB-INF/web.xml trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/jsptableexample/pzfilereaderwebsamples/index.jsp trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/jsptableexample/readme.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/delimiteddynamiccolumns/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/delimiteddynamiccolumns/DelimitedWithPZMap.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/delimiteddynamiccolumns/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/delimiteddynamiccolumns/PEOPLE-CommaDelimitedWithQualifier.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/delimiteddynamiccolumns/PEOPLE-Delimited.pzmap.xml trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/delimiteddynamiccolumns/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/fixedlengthdynamiccolumns/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/fixedlengthdynamiccolumns/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/fixedlengthdynamiccolumns/FixedLengthWithPZMap.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/fixedlengthdynamiccolumns/PEOPLE-FixedLength.pzmap.xml trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/fixedlengthdynamiccolumns/PEOPLE-FixedLength.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/fixedlengthdynamiccolumns/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/largecsvperformancetest/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/largecsvperformancetest/CSVLarge.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/largecsvperformancetest/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/largecsvperformancetest/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/largecsvperformancetest/SampleCSV.csv trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/largedataset/largecsvperformancetest/settings.properties trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/lowlevelparse/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/lowlevelparse/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/lowlevelparse/LowLevelParse.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/lowlevelparse/PEOPLE-CommaDelimitedWithQualifier.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/lowlevelparse/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/multilinedelimitedrecord/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/multilinedelimitedrecord/DelimitedMultiLine.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/multilinedelimitedrecord/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/multilinedelimitedrecord/PEOPLE-CommaDelimitedWithQualifier.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/multilinedelimitedrecord/README.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/numericsanddates/ trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/numericsanddates/ExecuteSample.bat trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/numericsanddates/INVENTORY-CommaDelimitedWithQualifier.txt trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/numericsanddates/INVENTORY-Delimited.pzmap.xml trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/numericsanddates/NumericsAndDates.java trunk/PZFileReaderSamples/src/main/java/com/pz/reader/examples/numericsanddates/README.txt trunk/PZFileReaderSamples/src/site/ trunk/PZFileReaderSamples/src/site/index.xml trunk/PZFileReaderSamples/src/site/navigation.xml trunk/common-build/ trunk/common-build/checkstyle_checks.xml trunk/common-build/findbugs-exclude-filter.xml trunk/common-build/objectlab_checks.xml trunk/common-build/project.properties trunk/common-build/project.xml trunk/maven.xml trunk/project.properties trunk/project.xml trunk/src/ trunk/src/site/ trunk/src/site/index.xml trunk/src/site/navigation.xml Removed Paths: ------------- trunk/PZFileReader/com/ trunk/PZFileReaderSamples/CSVHeaderAndTrailer/ trunk/PZFileReaderSamples/CSVPerformanceTest/ trunk/PZFileReaderSamples/CreateSampleCSV/ trunk/PZFileReaderSamples/DelimitedColumnNamesInFile/ trunk/PZFileReaderSamples/DelimitedDynamicColumns/ trunk/PZFileReaderSamples/DelimitedDynamicColumnsWithErrors/ trunk/PZFileReaderSamples/ExportToExcel/ trunk/PZFileReaderSamples/FixedLengthDynamicColumns/ trunk/PZFileReaderSamples/FixedLengthHeaderAndTrailer/ trunk/PZFileReaderSamples/JSPTableExample/ trunk/PZFileReaderSamples/LargeDataSet/ trunk/PZFileReaderSamples/LowLevelParse/ trunk/PZFileReaderSamples/MultilineDelimitedRecord/ trunk/PZFileReaderSamples/NumericsAndDates/ Property Changed: ---------------- trunk/ trunk/PZFileReader/ Property changes on: trunk ___________________________________________________________________ Name: svn:ignore + target Added: trunk/LICENSE.txt =================================================================== --- trunk/LICENSE.txt (rev 0) +++ trunk/LICENSE.txt 2006-10-16 12:59:13 UTC (rev 56) @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. Property changes on: trunk/PZFileReader ___________________________________________________________________ Name: svn:ignore + target Modified: trunk/PZFileReader/build.xml =================================================================== --- trunk/PZFileReader/build.xml 2006-10-16 10:55:08 UTC (rev 55) +++ trunk/PZFileReader/build.xml 2006-10-16 12:59:13 UTC (rev 56) @@ -3,7 +3,7 @@ Disto Build Script For pzFileReader </description> <!-- set global properties for this build --> - <property name="src" location="."/> + <property name="src" location="./src/main/java"/> <property name="build" location="build"/> <!--set this to the target of the build--> <property name="dist" location="c:/pzFileReader/distro"/> Added: trunk/PZFileReader/maven.xml =================================================================== --- trunk/PZFileReader/maven.xml (rev 0) +++ trunk/PZFileReader/maven.xml 2006-10-16 12:59:13 UTC (rev 56) @@ -0,0 +1,18 @@ +<?xml version="1.0"?> + +<!-- + /* + * ======================================================================== + * ObjectLab Financial Ltd, proud sponsor of PZFileReader. + * ======================================================================== + */ +--> + +<project xmlns:j="jelly:core" xmlns:core="jelly:core" + xmlns:maven="jelly:maven" xmlns:ant="jelly:ant" + xmlns:define="jelly:define" xmlns:doc="doc" xmlns:util="jelly:util" + xmlns:log="jelly:log"> + + <goal name="pz:build" prereqs="jar:install" /> + <goal name="pz:rebuild" prereqs="clean,kit:build" /> +</project> Added: trunk/PZFileReader/project.xml =================================================================== --- trunk/PZFileReader/project.xml (rev 0) +++ trunk/PZFileReader/project.xml 2006-10-16 12:59:13 UTC (rev 56) @@ -0,0 +1,58 @@ +<?xml version="1.0"?> + +<!-- + /* + * ======================================================================== + * $Id: project.xml 167 2006-09-12 15:11:43Z benoitx $ + * + * Copyright 2006 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + * ======================================================================== + */ +--> + +<project> + <extend>../common-build/project.xml</extend> + <name>PZFileReader</name> + <artifactId>pzfilereader</artifactId> + <package>com.pz.reader</package> + <shortDescription>PZFileReader </shortDescription> + <description> + Simple Java delimited and fixed width file parser. Handles CSV, Excel CSV, Tab, Pipe delimiters, just to name a few. + Maps column positions in the file to user friendly names via XML. See PZFileReader Feature List under News for complete feature list. + </description> + <repository> + <connection> + scm:svn:https://svn.sourceforge.net/svnroot/pzfilereader/trunk/PZFileReader + </connection> + <developerConnection> + scm:svn:https://svn.sourceforge.net/svnroot/pzfilereader/trunk/PZFileReader + </developerConnection> + </repository> + <dependencies /> + + <build> + <sourceDirectory>src/main/java</sourceDirectory> + <unitTestSourceDirectory>src/test/java</unitTestSourceDirectory> + <unitTest> + <includes> + <include>**/*NOTest.java</include> + </includes> + <excludes> + <exclude>**/Abstract*.java</exclude> + </excludes> + </unitTest> + </build> + +</project> Added: trunk/PZFileReader/qalab.xml =================================================================== --- trunk/PZFileReader/qalab.xml (rev 0) +++ trunk/PZFileReader/qalab.xml 2006-10-16 12:59:13 UTC (rev 56) @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE qalab [<!ELEMENT qalab (summary,file*)> +<!ATTLIST qalab version CDATA #REQUIRED> +<!ELEMENT summary (summaryresult*)> +<!ELEMENT file (result+)> +<!ATTLIST file id ID #REQUIRED> +<!ATTLIST file path CDATA #REQUIRED> +<!ELEMENT result EMPTY> +<!ATTLIST result date CDATA #REQUIRED> +<!ATTLIST result statvalue CDATA #REQUIRED> +<!ATTLIST result type CDATA #REQUIRED> +<!ELEMENT summaryresult EMPTY> +<!ATTLIST summaryresult date CDATA #REQUIRED> +<!ATTLIST summaryresult statvalue CDATA #REQUIRED> +<!ATTLIST summaryresult filecount CDATA #REQUIRED> +<!ATTLIST summaryresult type CDATA #REQUIRED> +]> +<qalab version="1.1"> + <summary> + <summaryresult date="2006-10-16" filecount="18" statvalue="469" type="checkstyle"/> + <summaryresult date="2006-10-16" filecount="2" statvalue="4" type="pmd"/> + <summaryresult date="2006-10-16" filecount="7" statvalue="18" type="findbugs"/> + <summaryresult date="2006-10-16" filecount="3" statvalue="170" type="simian"/> + </summary> + <file id="com_pz_reader_util_ParserUtils.java" path="com/pz/reader/util/ParserUtils.java"> + <result date="2006-10-16" statvalue="25" type="checkstyle"/> + <result date="2006-10-16" statvalue="3" type="pmd"/> + <result date="2006-10-16" statvalue="3" type="findbugs"/> + </file> + <file id="com_pz_reader_xml_PZMapParser.java" path="com/pz/reader/xml/PZMapParser.java"> + <result date="2006-10-16" statvalue="158" type="checkstyle"/> + <result date="2006-10-16" statvalue="1" type="pmd"/> + <result date="2006-10-16" statvalue="1" type="findbugs"/> + </file> + <file + id="C:_project_pzfilereader_PZFileReader_src_test_java_com_test_delim_multiLine_CSVPerformanceTest.java" path="C:/project/pzfilereader/PZFileReader/src/test/java/com/test/delim/multiLine/CSVPerformanceTest.java"/> + <file + id="C:_project_pzfilereader_PZFileReader_src_test_java_com_test_delim_tab_TabDelimited.java" path="C:/project/pzfilereader/PZFileReader/src/test/java/com/test/delim/tab/TabDelimited.java"/> + <file id="com_pz_reader_DataSet.java" path="com/pz/reader/DataSet.java"> + <result date="2006-10-16" statvalue="103" type="checkstyle"/> + <result date="2006-10-16" statvalue="3" type="findbugs"/> + </file> + <file id="com_pz_reader_LargeDataSet.java" path="com/pz/reader/LargeDataSet.java"> + <result date="2006-10-16" statvalue="63" type="checkstyle"/> + <result date="2006-10-16" statvalue="3" type="findbugs"/> + </file> + <file id="com_pz_reader_ordering_OrderBy.java" path="com/pz/reader/ordering/OrderBy.java"> + <result date="2006-10-16" statvalue="12" type="checkstyle"/> + <result date="2006-10-16" statvalue="5" type="findbugs"/> + </file> + <file id="com_pz_reader_xml_ResolveLocalDTD.java" path="com/pz/reader/xml/ResolveLocalDTD.java"> + <result date="2006-10-16" statvalue="16" type="checkstyle"/> + <result date="2006-10-16" statvalue="2" type="findbugs"/> + </file> + <file id="com_pz_reader_structure_Row.java" path="com/pz/reader/structure/Row.java"> + <result date="2006-10-16" statvalue="2" type="checkstyle"/> + <result date="2006-10-16" statvalue="1" type="findbugs"/> + </file> + <file id="com_pz_reader_DataError.java" path="com/pz/reader/DataError.java"> + <result date="2006-10-16" statvalue="5" type="checkstyle"/> + <result date="2006-10-16" statvalue="100" type="cobertura-branch"/> + </file> + <file id="com_pz_reader_Version.java" path="com/pz/reader/Version.java"> + <result date="2006-10-16" statvalue="100" type="cobertura-branch"/> + </file> + <file id="com_pz_reader_structure_ColumnMetaData.java" path="com/pz/reader/structure/ColumnMetaData.java"> + <result date="2006-10-16" statvalue="66" type="checkstyle"/> + <result date="2006-10-16" statvalue="100" type="cobertura-branch"/> + </file> + <file id="com_pz_reader_xml_XMLRecordElement.java" path="com/pz/reader/xml/XMLRecordElement.java"> + <result date="2006-10-16" statvalue="2" type="checkstyle"/> + <result date="2006-10-16" statvalue="100" type="cobertura-branch"/> + </file> + <file id="com_pz_reader_structure_package.html" path="com/pz/reader/structure/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file id="com_pz_reader_util_package.html" path="com/pz/reader/util/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file id="com_pz_reader_ordering_package.html" path="com/pz/reader/ordering/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file id="com_pz_reader_package.html" path="com/pz/reader/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file id="com_pz_reader_xml_package.html" path="com/pz/reader/xml/package.html"> + <result date="2006-10-16" statvalue="1" type="checkstyle"/> + </file> + <file id="com_pz_reader_ordering_OrderColumn.java" path="com/pz/reader/ordering/OrderColumn.java"> + <result date="2006-10-16" statvalue="4" type="checkstyle"/> + </file> + <file id="com_pz_reader_util_ExcelTransformer.java" path="com/pz/reader/util/ExcelTransformer.java"> + <result date="2006-10-16" statvalue="8" type="checkstyle"/> + </file> +</qalab> Added: trunk/PZFileReader/src/main/java/com/pz/reader/DataError.java =================================================================== --- trunk/PZFileReader/src/main/java/com/pz/reader/DataError.java (rev 0) +++ trunk/PZFileReader/src/main/java/com/pz/reader/DataError.java 2006-10-16 12:59:13 UTC (rev 56) @@ -0,0 +1,82 @@ +/* + Copyright 2006 Paul Zepernick + + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + */ +package com.pz.reader; + + +/** + * This class holds errors that occured while parsing or processing a data file. + * @author Paul Zepernick + * @version 2.0 + */ +public class DataError { + + /** Description of error */ + private String errorDesc = null; + /** line number in file error occured on */ + private int lineNo = 0; + /** + * Severity of the error 1 = Warning 2 = Moderate 3 = Severe + */ + private int errorLevel = 0; + + /** default constructor */ + public DataError() { + super(); + } + + /** + * Returns the errorDesc. + * @return String + */ + public String getErrorDesc() { + return errorDesc; + } + + /** + * Returns the errorLevel. + * @return int + */ + public int getErrorLevel() { + return errorLevel; + } + + /** + * Returns the lineNo. + * @return int + */ + public int getLineNo() { + return lineNo; + } + + /** + * Sets the errorDesc. + * @param errorDesc The errorDesc to set + */ + public void setErrorDesc(String errorDesc) { + this.errorDesc = errorDesc; + } + + /** + * Sets the errorLevel. + * @param errorLevel The errorLevel to set + */ + public void setErrorLevel(int errorLevel) { + this.errorLevel = errorLevel; + } + + /** + * Sets the lineNo. + * @param lineNo The lineNo to set + */ + public void setLineNo(int lineNo) { + this.lineNo = lineNo; + } + +} Added: trunk/PZFileReader/src/main/java/com/pz/reader/DataSet.java =================================================================== --- trunk/PZFileReader/src/main/java/com/pz/reader/DataSet.java (rev 0) +++ trunk/PZFileReader/src/main/java/com/pz/reader/DataSet.java 2006-10-16 12:59:13 UTC (rev 56) @@ -0,0 +1,1090 @@ +/* + Copyright 2006 Paul Zepernick + + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + */ +package com.pz.reader; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.NoSuchElementException; + +import com.pz.reader.ordering.OrderBy; +import com.pz.reader.structure.ColumnMetaData; +import com.pz.reader.structure.Row; +import com.pz.reader.util.ExcelTransformer; +import com.pz.reader.util.ParserUtils; +import com.pz.reader.xml.PZMapParser; + + + +/** + * This class parses a datafile and holds methods to scroll back and forth through the datafile + * along with methods to retreive values from columns. + * @author Paul Zepernick + * @version 2.0.1 + */ +public class DataSet { + + /** Array to hold the rows and their values in the text file */ + public List rows = null; + + + /** Array of errors that have occured during processing */ + public List errors = null; + + /** Map of column metadata's */ + public Map columnMD = null; + + /** Pointer for the current row in the array we are on */ + private int pointer = -1; + + /** flag to indicate if data should be pulled as lower case */ + private boolean lowerCase = false; + + /** flag to inidicate if data should be pulled as upper case */ + private boolean upperCase = false; + + /** + * flag to indicate if a strict parse should be used when getting doubles and ints + */ + private boolean strictNumericParse = false; + + /** + * Flag to indicate that we can cope with lines shorter than the required lengh + */ + private boolean handleShortLines = false; + + /** + * empty constructor. THIS SHOULD ONLY BE USED FOR CUSTOM DataSet implementations. It provides + * NO parsing abilities + */ + public DataSet() { + } + + + /** + * Constructs a new DataSet using the database table file layout method. This is used for a + * FIXED LENGTH text file. + * @param con - Connection to database with DATAFILE and DATASTRUCTURE tables + * @param dataSource - Fixed length file to read from + * @param dataDefinition - Name of dataDefinition in the DATAFILE table DATAFILE_DESC column + * @param handleShortLines - Pad lines out to fit the fixed length + * @exception Exception + */ + public DataSet(Connection con, File dataSource, String dataDefinition, boolean handleShortLines) throws Exception { + this(con, ParserUtils.createInputStream(dataSource), dataDefinition, handleShortLines); + } + + /** + * Constructs a new DataSet using the database table file layout method. This is used for a + * FIXED LENGTH text file. + * @param con - Connection to database with DATAFILE and DATASTRUCTURE tables + * @param dataSourceStream - text file datasource InputStream to read from + * @param dataDefinition - Name of dataDefinition in the DATAFILE table DATAFILE_DESC column + * @param handleShortLines - Pad lines out to fit the fixed length + * @exception Exception + */ + public DataSet(Connection con, InputStream dataSourceStream, String dataDefinition, boolean handleShortLines) throws Exception { + super(); + this.handleShortLines = handleShortLines; + + String sql = null; + ResultSet rs = null; + Statement stmt = null; + ColumnMetaData column = null; + boolean hasResults = false; + int recPosition = 1; + List cmds = new ArrayList(); + + try { + columnMD = new LinkedHashMap(); + stmt = con.createStatement(); + + sql = "SELECT * FROM DATAFILE INNER JOIN DATASTRUCTURE ON " + + "DATAFILE.DATAFILE_NO = DATASTRUCTURE.DATAFILE_NO " + "WHERE DATAFILE.DATAFILE_DESC = '" + + dataDefinition + "' " + "ORDER BY DATASTRUCTURE_COL_ORDER"; + + rs = stmt.executeQuery(sql); + + // put array of columns together. These will be used to put together + // the dataset when reading in the file + while (rs.next()) { + + column = new ColumnMetaData(); + column.setColName(rs.getString("DATASTRUCTURE_COLUMN")); + column.setColLength(rs.getInt("DATASTRUCTURE_LENGTH")); + column.setStartPosition(recPosition); + column.setEndPosition(recPosition + (rs.getInt("DATASTRUCTURE_LENGTH") - 1)); + recPosition += rs.getInt("DATASTRUCTURE_LENGTH"); + + cmds.add(column); + + hasResults = true; + } + + columnMD.put("detail",cmds); + + if (!hasResults) { + throw new FileNotFoundException("DATA DEFINITION CAN NOT BE FOUND IN THE DATABASE " + dataDefinition); + } + + // read in the fixed length file and construct the DataSet object + doFixedLengthFile(dataSourceStream); + + } finally { + if (rs != null) + rs.close(); + if (stmt != null) + stmt.close(); + } + + } + + + /** + * Constructs a new DataSet using the database table file layout method. This is used for a + * DELIMITED text file. esacpe sequence reference: \n newline <br> \t tab <br> \b backspace <br> \r return <br> \f + * form feed <br> \\ backslash <br> \' single quote <br> \" double quote + * @param con - Connection to database with DATAFILE and DATASTRUCTURE tables + * @param dataSource - text file datasource to read from + * @param dataDefinition - Name of dataDefinition in the DATAFILE table DATAFILE_DESC column + * @param delimiter - Char the file is delimited By + * @param qualifier - Char text is qualified by + * @param ignoreFirstRecord - skips the first line that contains data in the file + * @param handleShortLines - Adds missing columns as empty's to the DataSet instead of logging + * them as an error + * @exception Exception + */ + public DataSet(Connection con, File dataSource, String dataDefinition, String delimiter, String qualifier, + boolean ignoreFirstRecord, boolean handleShortLines) throws Exception { + this(con, ParserUtils.createInputStream(dataSource), dataDefinition, delimiter, qualifier, ignoreFirstRecord, handleShortLines); + } + + /** + * New constructor based on 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 <br> \t tab <br> \b backspace <br> \r return <br> \f + * form feed <br> \\ backslash <br> \' single quote <br> \" double quote + * @param con - Connection to database with DATAFILE and DATASTRUCTURE tables + * @param dataSourceStream - text file datasource InputStream to read from + * @param dataDefinition - Name of dataDefinition in the DATAFILE table DATAFILE_DESC column + * @param delimiter - Char the file is delimited By + * @param qualifier - Char text is qualified by + * @param ignoreFirstRecord - skips the first line that contains data in the file + * @param handleShortLines - Adds missing columns as empty's to the DataSet instead of logging + * them as an error + * @exception Exception + */ + public DataSet(Connection con, InputStream dataSourceStream, String dataDefinition, String delimiter, String qualifier, + boolean ignoreFirstRecord, boolean handleShortLines) throws Exception { + super(); + + this.handleShortLines = handleShortLines; + + String sql = null; + ResultSet rs = null; + Statement stmt = null; + ColumnMetaData column = null; + boolean hasResults = false; + List cmds = new ArrayList(); + + try { + columnMD = new LinkedHashMap(); + stmt = con.createStatement(); + + sql = "SELECT * FROM DATAFILE INNER JOIN DATASTRUCTURE ON " + + "DATAFILE.DATAFILE_NO = DATASTRUCTURE.DATAFILE_NO " + "WHERE DATAFILE.DATAFILE_DESC = '" + + dataDefinition + "' " + "ORDER BY DATASTRUCTURE_COL_ORDER"; + + rs = stmt.executeQuery(sql); + + // put array of columns together. These will be used to put together + // the dataset when reading in the file + while (rs.next()) { + + column = new ColumnMetaData(); + column.setColName(rs.getString("DATASTRUCTURE_COLUMN")); + column.setColLength(rs.getInt("DATASTRUCTURE_LENGTH")); + cmds.add(column); + + hasResults = true; + } + + columnMD.put("detail",cmds); + + if (!hasResults) { + throw new FileNotFoundException("DATA DEFINITION CAN NOT BE FOUND IN THE DATABASE " + dataDefinition); + } + + // read in the fixed length file and construct the DataSet object + doDelimitedFile(dataSourceStream, delimiter, qualifier, ignoreFirstRecord, false); + + } finally { + if (rs != null) + rs.close(); + if (stmt != null) + stmt.close(); + } + + } + + + /** + * Constructs a new DataSet using the PZMAP XML file layout method. This is used for a DELIMITED + * text file. esacpe sequence reference: \n newline <br> \t tab <br> \b backspace <br> \r return <br> \f + * form feed <br> \\ backslash <br> \' single quote <br> \" double quote + * @param pzmapXML - Reference to the xml file holding the pzmap + * @param dataSource - text file datasource to read from + * @param delimiter - Char the file is delimited By + * @param qualifier - Char text is qualified by + * @param ignoreFirstRecord - skips the first line that contains data in the file + * @param handleShortLines - Adds missing columns as empty's to the DataSet instead of logging + * them as an error + * @exception Exception + */ + public DataSet(File pzmapXML, File dataSource, String delimiter, String qualifier, boolean ignoreFirstRecord, + boolean handleShortLines) throws Exception { + this(ParserUtils.createInputStream(pzmapXML), ParserUtils.createInputStream(dataSource), delimiter, qualifier, ignoreFirstRecord, handleShortLines); + } + + /** + * 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 <br> \t tab <br> \b backspace <br> \r return <br> \f + * form feed <br> \\ backslash <br> \' single quote <br> \" double quote + * @param pzmapXMLStream - Reference to the xml file holding the pzmap + * @param dataSourceStream - text file datasource InputStream to read from + * @param delimiter - Char the file is delimited By + * @param qualifier - Char text is qualified by + * @param ignoreFirstRecord - skips the first line that contains data in the file + * @param handleShortLines - Adds missing columns as empty's to the DataSet instead of logging + * them as an error + * @exception Exception + */ + public DataSet(InputStream pzmapXMLStream, InputStream dataSourceStream, String delimiter, String qualifier, boolean ignoreFirstRecord, + boolean handleShortLines) throws Exception { + + this.handleShortLines = handleShortLines; + columnMD = PZMapParser.parse(pzmapXMLStream); + + doDelimitedFile(dataSourceStream, delimiter, qualifier, ignoreFirstRecord, false); + + } + + /** + * 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 <br> \t tab <br> \b backspace <br> \r return <br> \f + * form feed <br> \\ backslash <br> \' single quote <br> \" double quote + * @param dataSource - text file datasource to read from + * @param delimiter - Char the file is delimited By + * @param qualifier - Char text is qualified by + * @param handleShortLines - when flaged as true, lines with less columns then the amount of + * column headers will be added as empty's instead of producing an error + * @exception Exception + */ + public DataSet(File dataSource, String delimiter, String qualifier, boolean handleShortLines) throws Exception { + + this.handleShortLines = handleShortLines; + InputStream dataSourceStream = null; + + try{ + dataSourceStream = ParserUtils.createInputStream(dataSource); + doDelimitedFile(dataSourceStream, delimiter, qualifier, false, true); + }finally{ + if (dataSourceStream != null) dataSourceStream.close(); + } + } + + /** + * 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 <br> \t tab <br> \b backspace <br> \r return <br> \f + * form feed <br> \\ backslash <br> \' single quote <br> \" double quote + * @param dataSource - text file InputStream to read from + * @param delimiter - Char the file is delimited By + * @param qualifier - Char text is qualified by + * @param handleShortLines - when flaged as true, lines with less columns then the amount of + * column headers will be added as empty's instead of producing an error + * @exception Exception + */ + public DataSet(InputStream dataSource, String delimiter, String qualifier, boolean handleShortLines) throws Exception { + + this.handleShortLines = handleShortLines; + + try{ + doDelimitedFile(dataSource, delimiter, qualifier, false, true); + }finally{ + if (dataSource != null) dataSource.close(); + } + } + + + /** + * Constructs a new DataSet using the PZMAP XML file layout method. This is used for a FIXED + * LENGTH text file. + * @param pzmapXML - Reference to the xml file holding the pzmap + * @param dataSource - Delimited file to read from + * @param handleShortLines - Pad lines out to fit the fixed length + * @exception Exception + */ + public DataSet(File pzmapXML, File dataSource, boolean handleShortLines) throws Exception { + this(ParserUtils.createInputStream(pzmapXML), ParserUtils.createInputStream(dataSource), handleShortLines); + } + + /** + * 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. + * @param pzmapXMLStream - Reference to the xml file InputStream holding the pzmap + * @param dataSourceStream - Delimited file InputStream to read from + * @param handleShortLines - Pad lines out to fit the fixed length + * @exception Exception + */ + public DataSet(InputStream pzmapXMLStream, InputStream dataSourceStream, boolean handleShortLines) throws Exception { + + this.handleShortLines = handleShortLines; + + columnMD = PZMapParser.parse(pzmapXMLStream); + + // read in the fixed length file and construct the DataSet object + doFixedLengthFile(dataSourceStream); + + } + + /* + * This is the new version of doDelimitedFile using InputStrem instead of File. This is more flexible + * especially it is working with WebStart. + * + * puts together the dataset for fixed length file. This is used for PZ XML mappings, and SQL + * table mappings + */ + private void doFixedLengthFile(InputStream dataSource) throws Exception { + String line = null; + InputStreamReader isr = null; + BufferedReader br = null; + Row row = null; + int recordLength = 0; + int lineCount = 0; + int recPosition = 0; + //map of record lengths corrisponding to the ID's in the columnMD array + Map recordLengths = null; + String mdkey = null; + List cmds = null; + + try { + rows = new ArrayList(); + errors = new ArrayList(); + + recordLengths = ParserUtils.calculateRecordLengths(columnMD); + + // Read in the flat file + isr = new InputStreamReader(dataSource); + br = new BufferedReader(isr); + //loop through each line in the file + while ((line = br.readLine()) != null) { + lineCount++; + // empty line skip past it + if (line.trim().length() == 0) { + continue; + } + + + mdkey = ParserUtils.getCMDKeyForFixedLengthFile(columnMD, line); + recordLength = ((Integer)recordLengths.get(mdkey)).intValue(); + cmds = ParserUtils.getColumnMetaData(mdkey, columnMD); + + //Incorrect record length on line log the error. Line will not be included in the + //dataset + if (line.length() > recordLength) { + addError("LINE TOO LONG. LINE IS " + line.length() + " LONG. SHOULD BE " + recordLength, lineCount, + 2); + continue; + } else if (line.length() < recordLength) { + if (handleShortLines) { + // We can pad this line out + while (line.length() < recordLength) { + line = line + " "; + } + + // log a warning + addError("PADDED LINE TO CORRECT RECORD LENGTH", lineCount, 1); + + } else { + addError("LINE TOO SHORT. LINE IS " + line.length() + " LONG. SHOULD BE " + recordLength, + lineCount, 2); + continue; + } + } + + recPosition = 1; + row = new Row(); + row.setMdkey(mdkey.equals("detail") ? null : mdkey); //try to limit the memory use + //Build the columns for the row + for (int i = 0; i < cmds.size(); i++) { + String tempValue = null; + tempValue = line.substring(recPosition - 1, recPosition + + (((ColumnMetaData) cmds.get(i)).getColLength() - 1)); + recPosition += ((ColumnMetaData) cmds.get(i)).getColLength(); + row.addColumn(tempValue.trim()); + } + row.setRowNumber(lineCount); + // add the row to the array + rows.add(row); + } + } finally { + if (isr != null) { + isr.close(); + } + if (b... [truncated message content] |
From: <zep...@us...> - 2006-10-16 10:58:26
|
Revision: 55 http://svn.sourceforge.net/pzfilereader/?rev=55&view=rev Author: zepernick Date: 2006-10-16 03:55:08 -0700 (Mon, 16 Oct 2006) Log Message: ----------- Adding updated examples which are packaged with the current PZFileReader distro Added Paths: ----------- trunk/PZFileReaderSamples/CSVHeaderAndTrailer/ trunk/PZFileReaderSamples/CSVHeaderAndTrailer/CSVHeaderAndTrailer.java trunk/PZFileReaderSamples/CSVHeaderAndTrailer/ExecuteSample.bat trunk/PZFileReaderSamples/CSVHeaderAndTrailer/PEOPLE-CommaDelimitedWithQualifier.txt trunk/PZFileReaderSamples/CSVHeaderAndTrailer/PEOPLE-Delimited.pzmap.xml trunk/PZFileReaderSamples/CSVHeaderAndTrailer/README.txt trunk/PZFileReaderSamples/CSVHeaderAndTrailer/build.bat trunk/PZFileReaderSamples/CSVPerformanceTest/ trunk/PZFileReaderSamples/CSVPerformanceTest/CSVPerformanceTest.java trunk/PZFileReaderSamples/CSVPerformanceTest/ExecuteSample.bat trunk/PZFileReaderSamples/CSVPerformanceTest/README.txt trunk/PZFileReaderSamples/CSVPerformanceTest/SampleCSV.csv trunk/PZFileReaderSamples/CSVPerformanceTest/build.bat trunk/PZFileReaderSamples/CSVPerformanceTest/settings.properties trunk/PZFileReaderSamples/CreateSampleCSV/ trunk/PZFileReaderSamples/CreateSampleCSV/CSVTestFileCreator.java trunk/PZFileReaderSamples/CreateSampleCSV/ExecuteSample.bat trunk/PZFileReaderSamples/CreateSampleCSV/README.txt trunk/PZFileReaderSamples/CreateSampleCSV/build.bat trunk/PZFileReaderSamples/DelimitedColumnNamesInFile/ trunk/PZFileReaderSamples/DelimitedColumnNamesInFile/DelimitedColumnNamesInFile.java trunk/PZFileReaderSamples/DelimitedColumnNamesInFile/ExecuteSample.bat trunk/PZFileReaderSamples/DelimitedColumnNamesInFile/PEOPLE-CommaDelimitedWithQualifier.txt trunk/PZFileReaderSamples/DelimitedColumnNamesInFile/README.txt trunk/PZFileReaderSamples/DelimitedColumnNamesInFile/build.bat trunk/PZFileReaderSamples/DelimitedDynamicColumns/ trunk/PZFileReaderSamples/DelimitedDynamicColumns/DelimitedWithPZMap.java trunk/PZFileReaderSamples/DelimitedDynamicColumns/ExecuteSample.bat trunk/PZFileReaderSamples/DelimitedDynamicColumns/PEOPLE-CommaDelimitedWithQualifier.txt trunk/PZFileReaderSamples/DelimitedDynamicColumns/PEOPLE-Delimited.pzmap.xml trunk/PZFileReaderSamples/DelimitedDynamicColumns/README.txt trunk/PZFileReaderSamples/DelimitedDynamicColumns/build.bat trunk/PZFileReaderSamples/DelimitedDynamicColumnsWithErrors/ trunk/PZFileReaderSamples/DelimitedDynamicColumnsWithErrors/DelimitedWithPZMapErrors.java trunk/PZFileReaderSamples/DelimitedDynamicColumnsWithErrors/ExecuteSample.bat trunk/PZFileReaderSamples/DelimitedDynamicColumnsWithErrors/PEOPLE-CommaDelimitedWithQualifier.txt trunk/PZFileReaderSamples/DelimitedDynamicColumnsWithErrors/PEOPLE-Delimited.pzmap.xml trunk/PZFileReaderSamples/DelimitedDynamicColumnsWithErrors/README.txt trunk/PZFileReaderSamples/DelimitedDynamicColumnsWithErrors/build.bat trunk/PZFileReaderSamples/ExportToExcel/ trunk/PZFileReaderSamples/ExportToExcel/DelimitedFileExportToExcel.java trunk/PZFileReaderSamples/ExportToExcel/ExecuteSample.bat trunk/PZFileReaderSamples/ExportToExcel/PEOPLE-CommaDelimitedWithQualifier.txt trunk/PZFileReaderSamples/ExportToExcel/PEOPLE-Delimited.pzmap.xml trunk/PZFileReaderSamples/ExportToExcel/README.txt trunk/PZFileReaderSamples/ExportToExcel/build.bat trunk/PZFileReaderSamples/FixedLengthDynamicColumns/ trunk/PZFileReaderSamples/FixedLengthDynamicColumns/ExecuteSample.bat trunk/PZFileReaderSamples/FixedLengthDynamicColumns/FixedLengthWithPZMap.java trunk/PZFileReaderSamples/FixedLengthDynamicColumns/PEOPLE-FixedLength.pzmap.xml trunk/PZFileReaderSamples/FixedLengthDynamicColumns/PEOPLE-FixedLength.txt trunk/PZFileReaderSamples/FixedLengthDynamicColumns/README.txt trunk/PZFileReaderSamples/FixedLengthDynamicColumns/build.bat trunk/PZFileReaderSamples/FixedLengthHeaderAndTrailer/ trunk/PZFileReaderSamples/FixedLengthHeaderAndTrailer/ExecuteSample.bat trunk/PZFileReaderSamples/FixedLengthHeaderAndTrailer/FixedLengthHeaderAndTrailer.java trunk/PZFileReaderSamples/FixedLengthHeaderAndTrailer/PEOPLE-FixedLength.pzmap.xml trunk/PZFileReaderSamples/FixedLengthHeaderAndTrailer/PEOPLE-FixedLength.txt trunk/PZFileReaderSamples/FixedLengthHeaderAndTrailer/README.txt trunk/PZFileReaderSamples/FixedLengthHeaderAndTrailer/build.bat trunk/PZFileReaderSamples/JSPTableExample/ trunk/PZFileReaderSamples/JSPTableExample/PZFileReaderWebSamples/ trunk/PZFileReaderSamples/JSPTableExample/PZFileReaderWebSamples/PEOPLE.pzmap.xml trunk/PZFileReaderSamples/JSPTableExample/PZFileReaderWebSamples/PEOPLE.txt trunk/PZFileReaderSamples/JSPTableExample/PZFileReaderWebSamples/WEB-INF/ trunk/PZFileReaderSamples/JSPTableExample/PZFileReaderWebSamples/WEB-INF/classes/ trunk/PZFileReaderSamples/JSPTableExample/PZFileReaderWebSamples/WEB-INF/lib/ trunk/PZFileReaderSamples/JSPTableExample/PZFileReaderWebSamples/WEB-INF/web.xml trunk/PZFileReaderSamples/JSPTableExample/PZFileReaderWebSamples/index.jsp trunk/PZFileReaderSamples/JSPTableExample/readme.txt trunk/PZFileReaderSamples/LargeDataSet/ trunk/PZFileReaderSamples/LargeDataSet/DelimitedDynamicColumns/ trunk/PZFileReaderSamples/LargeDataSet/DelimitedDynamicColumns/DelimitedWithPZMap.java trunk/PZFileReaderSamples/LargeDataSet/DelimitedDynamicColumns/ExecuteSample.bat trunk/PZFileReaderSamples/LargeDataSet/DelimitedDynamicColumns/PEOPLE-CommaDelimitedWithQualifier.txt trunk/PZFileReaderSamples/LargeDataSet/DelimitedDynamicColumns/PEOPLE-Delimited.pzmap.xml trunk/PZFileReaderSamples/LargeDataSet/DelimitedDynamicColumns/README.txt trunk/PZFileReaderSamples/LargeDataSet/DelimitedDynamicColumns/build.bat trunk/PZFileReaderSamples/LargeDataSet/FixedLengthDynamicColumns/ trunk/PZFileReaderSamples/LargeDataSet/FixedLengthDynamicColumns/ExecuteSample.bat trunk/PZFileReaderSamples/LargeDataSet/FixedLengthDynamicColumns/FixedLengthWithPZMap.java trunk/PZFileReaderSamples/LargeDataSet/FixedLengthDynamicColumns/PEOPLE-FixedLength.pzmap.xml trunk/PZFileReaderSamples/LargeDataSet/FixedLengthDynamicColumns/PEOPLE-FixedLength.txt trunk/PZFileReaderSamples/LargeDataSet/FixedLengthDynamicColumns/README.txt trunk/PZFileReaderSamples/LargeDataSet/FixedLengthDynamicColumns/build.bat trunk/PZFileReaderSamples/LargeDataSet/LargeCSVPerformanceTest/ trunk/PZFileReaderSamples/LargeDataSet/LargeCSVPerformanceTest/CSVLarge.java trunk/PZFileReaderSamples/LargeDataSet/LargeCSVPerformanceTest/ExecuteSample.bat trunk/PZFileReaderSamples/LargeDataSet/LargeCSVPerformanceTest/README.txt trunk/PZFileReaderSamples/LargeDataSet/LargeCSVPerformanceTest/SampleCSV.csv trunk/PZFileReaderSamples/LargeDataSet/LargeCSVPerformanceTest/build.bat trunk/PZFileReaderSamples/LargeDataSet/LargeCSVPerformanceTest/settings.properties trunk/PZFileReaderSamples/LowLevelParse/ trunk/PZFileReaderSamples/LowLevelParse/ExecuteSample.bat trunk/PZFileReaderSamples/LowLevelParse/LowLevelParse.java trunk/PZFileReaderSamples/LowLevelParse/PEOPLE-CommaDelimitedWithQualifier.txt trunk/PZFileReaderSamples/LowLevelParse/README.txt trunk/PZFileReaderSamples/LowLevelParse/build.bat trunk/PZFileReaderSamples/MultilineDelimitedRecord/ trunk/PZFileReaderSamples/MultilineDelimitedRecord/DelimitedMultiLine.java trunk/PZFileReaderSamples/MultilineDelimitedRecord/ExecuteSample.bat trunk/PZFileReaderSamples/MultilineDelimitedRecord/PEOPLE-CommaDelimitedWithQualifier.txt trunk/PZFileReaderSamples/MultilineDelimitedRecord/README.txt trunk/PZFileReaderSamples/MultilineDelimitedRecord/build.bat trunk/PZFileReaderSamples/NumericsAndDates/ trunk/PZFileReaderSamples/NumericsAndDates/ExecuteSample.bat trunk/PZFileReaderSamples/NumericsAndDates/INVENTORY-CommaDelimitedWithQualifier.txt trunk/PZFileReaderSamples/NumericsAndDates/INVENTORY-Delimited.pzmap.xml trunk/PZFileReaderSamples/NumericsAndDates/NumericsAndDates.java trunk/PZFileReaderSamples/NumericsAndDates/README.txt trunk/PZFileReaderSamples/NumericsAndDates/build.bat Added: trunk/PZFileReaderSamples/CSVHeaderAndTrailer/CSVHeaderAndTrailer.java =================================================================== --- trunk/PZFileReaderSamples/CSVHeaderAndTrailer/CSVHeaderAndTrailer.java (rev 0) +++ trunk/PZFileReaderSamples/CSVHeaderAndTrailer/CSVHeaderAndTrailer.java 2006-10-16 10:55:08 UTC (rev 55) @@ -0,0 +1,69 @@ +/* + * Created on Dec 31, 2004 + * + */ + +import java.io.File; + +import com.pz.reader.DataSet; +import com.pz.reader.ordering.OrderBy; +import com.pz.reader.ordering.OrderColumn; +import com.pz.reader.xml.PZMapParser; + +/** + * @author zepernick + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ +public class CSVHeaderAndTrailer { + public static void main(String[] args)throws Exception{ + DataSet ds = null; + String[] colNames = null; + + //turn on the debuging for the XML parser + // PZMapParser.setDebug(true); + + //delimited by a comma + //text qualified by double quotes + //ignore first record + ds = new DataSet(new File("PEOPLE-Delimited.pzmap.xml"),new File("PEOPLE-CommaDelimitedWithQualifier.txt"),",","\"",true, false); + + + while (ds.next()){ + + if (ds.isRecordID("header")){ + System.out.println(">>>>>>Found Header Record"); + System.out.println("COLUMN NAME: RECORDINDICATOR VALUE: " + ds.getString("RECORDINDICATOR")); + System.out.println("COLUMN NAME: HEADERDATA VALUE: " + ds.getString("HEADERDATA")); + System.out.println("==========================================================================="); + continue; + } + + if (ds.isRecordID("trailer")){ + System.out.println(">>>>>>Found Trailer Record"); + System.out.println("COLUMN NAME: RECORDINDICATOR VALUE: " + ds.getString("RECORDINDICATOR")); + System.out.println("COLUMN NAME: TRAILERDATA VALUE: " + ds.getString("TRAILERDATA")); + System.out.println("==========================================================================="); + continue; + } + + System.out.println("COLUMN NAME: FIRSTNAME VALUE: " + ds.getString("FIRSTNAME")); + System.out.println("COLUMN NAME: LASTNAME VALUE: " + ds.getString("LASTNAME")); + System.out.println("COLUMN NAME: ADDRESS VALUE: " + ds.getString("ADDRESS")); + System.out.println("COLUMN NAME: CITY VALUE: " + ds.getString("CITY")); + System.out.println("COLUMN NAME: STATE VALUE: " + ds.getString("STATE")); + System.out.println("COLUMN NAME: ZIP VALUE: " + ds.getString("ZIP")); + System.out.println("==========================================================================="); + } + + + if (ds.getErrors() != null && ds.getErrors().size() > 0){ + System.out.println("FOUND ERRORS IN FILE"); + } + + //clear out the DataSet object for the JVM to collect + ds.freeMemory(); + + } +} Added: trunk/PZFileReaderSamples/CSVHeaderAndTrailer/ExecuteSample.bat =================================================================== --- trunk/PZFileReaderSamples/CSVHeaderAndTrailer/ExecuteSample.bat (rev 0) +++ trunk/PZFileReaderSamples/CSVHeaderAndTrailer/ExecuteSample.bat 2006-10-16 10:55:08 UTC (rev 55) @@ -0,0 +1,2 @@ +java -cp ./;../../pzFileReader2_2_2.jar;../../lib/jdom.jar CSVHeaderAndTrailer +pause \ No newline at end of file Added: trunk/PZFileReaderSamples/CSVHeaderAndTrailer/PEOPLE-CommaDelimitedWithQualifier.txt =================================================================== --- trunk/PZFileReaderSamples/CSVHeaderAndTrailer/PEOPLE-CommaDelimitedWithQualifier.txt (rev 0) +++ trunk/PZFileReaderSamples/CSVHeaderAndTrailer/PEOPLE-CommaDelimitedWithQualifier.txt 2006-10-16 10:55:08 UTC (rev 55) @@ -0,0 +1,9 @@ +"FIRSTNAME","LASTNAME","ADDRESS","CITY","STATE","ZIP" +"H","Some Header Data Here" +"JOHN","ANAME","1234 CIRCLE CT","ELYRIA","OH","44035" +"JIMMY","ZNAME","180 SOME ST","AVON","OH","44011" +"JANE","ANAME","111 MILKY WY","AVON","OH","44001" +"FRED","ZNAME","123 ROCKY WY","ELYRIA","OH","12345" +"FRED","ZNAME","123 ROCKY WY","ELYRIA","OH","12345" +"FRED","ZNAME","Text Qualifier " and seperator, in string","ELYRIA","OH","" +"T","Some Trailer Data Here" Added: trunk/PZFileReaderSamples/CSVHeaderAndTrailer/PEOPLE-Delimited.pzmap.xml =================================================================== --- trunk/PZFileReaderSamples/CSVHeaderAndTrailer/PEOPLE-Delimited.pzmap.xml (rev 0) +++ trunk/PZFileReaderSamples/CSVHeaderAndTrailer/PEOPLE-Delimited.pzmap.xml 2006-10-16 10:55:08 UTC (rev 55) @@ -0,0 +1,21 @@ +<?xml version='1.0'?> +<!-- DTD can be pulled from the Jar or over the web--> +<!DOCTYPE PZMAP SYSTEM "pzfilereader.dtd" > +<!--<!DOCTYPE PZMAP SYSTEM "http://pzfilereader.sourceforge.net/pzfilereader.dtd" >--> +<PZMAP> + <RECORD id="header" indicator="H" elementNumber="1"> + <COLUMN name="RECORDINDICATOR" /> + <COLUMN name="HEADERDATA" /> + </RECORD> + <COLUMN name="FIRSTNAME" /> + <COLUMN name="LASTNAME" /> + <COLUMN name="ADDRESS" /> + <COLUMN name="CITY" /> + <COLUMN name="STATE" /> + <COLUMN name="ZIP" /> + <RECORD id="trailer" indicator="T" elementNumber="1"> + <COLUMN name="RECORDINDICATOR" /> + <COLUMN name="TRAILERDATA" /> + </RECORD> + +</PZMAP> Added: trunk/PZFileReaderSamples/CSVHeaderAndTrailer/README.txt =================================================================== --- trunk/PZFileReaderSamples/CSVHeaderAndTrailer/README.txt (rev 0) +++ trunk/PZFileReaderSamples/CSVHeaderAndTrailer/README.txt 2006-10-16 10:55:08 UTC (rev 55) @@ -0,0 +1,4 @@ +File Type: Comma Delimted With Text Qualified By "'s + + +This shows the ability to parse header and trailer records out of a file. Added: trunk/PZFileReaderSamples/CSVHeaderAndTrailer/build.bat =================================================================== --- trunk/PZFileReaderSamples/CSVHeaderAndTrailer/build.bat (rev 0) +++ trunk/PZFileReaderSamples/CSVHeaderAndTrailer/build.bat 2006-10-16 10:55:08 UTC (rev 55) @@ -0,0 +1,2 @@ +javac -classpath ./;../../pzFileReader2_2_2.jar;../../lib/jdom.jar CSVHeaderAndTrailer.java +pause \ No newline at end of file Added: trunk/PZFileReaderSamples/CSVPerformanceTest/CSVPerformanceTest.java =================================================================== --- trunk/PZFileReaderSamples/CSVPerformanceTest/CSVPerformanceTest.java (rev 0) +++ trunk/PZFileReaderSamples/CSVPerformanceTest/CSVPerformanceTest.java 2006-10-16 10:55:08 UTC (rev 55) @@ -0,0 +1,128 @@ +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.util.HashMap; +import java.util.Map; + +import com.pz.reader.DataError; +import com.pz.reader.DataSet; + +/* + * Created on Dec 1, 2005 + * + * TODO To change the template for this generated file go to + * Window - Preferences - Java - Code Style - Code Templates + */ + +/** + * @author zepernick + * + * TODO To change the template for this generated type comment go to + * Window - Preferences - Java - Code Style - Code Templates + */ +public class CSVPerformanceTest { + + public static void main(String[] args) { + + DataSet ds = null; + String[] colNames = null; + Map settings = null; + + try{ + + + settings = readSettings(); + + //delimited by a comma + //text qualified by double quotes + //ignore first record + long timeStarted = System.currentTimeMillis(); + ds = new DataSet(new File((String)settings.get("csvFile")),",","\"",false); + long timeFinished = System.currentTimeMillis(); + + + String timeMessage = ""; + + if (timeFinished - timeStarted < 1000){ + timeMessage = (timeFinished - timeStarted) + " Milleseconds..." ; + }else{ + timeMessage = ((timeFinished - timeStarted) / 1000) + " Seconds..."; + } + + System.out.println(""); + System.out.println("********FILE PARSED IN: " + timeMessage + " ******"); + Thread.sleep(2000); //sleep for a couple seconds to the message above can be read + + + + if (Boolean.valueOf((String)settings.get("verbose")).booleanValue()){ + timeStarted = System.currentTimeMillis(); + colNames = ds.getColumns(); + + while (ds.next()){ + for (int i = 0; i < colNames.length; i++){ + System.out.println("COLUMN NAME: " + colNames[i] + " VALUE: " + ds.getString(colNames[i])); + } + + System.out.println("==========================================================================="); + } + timeFinished = System.currentTimeMillis(); + + if (timeFinished - timeStarted < 1000){ + timeMessage = (timeFinished - timeStarted) + " Milleseconds..." ; + }else{ + timeMessage = ((timeFinished - timeStarted) / 1000) + " Seconds..."; + } + + System.out.println(""); + System.out.println("********Displayed Data To Console In: " + timeMessage + " ******"); + + } + + + if (ds.getErrors() != null && ds.getErrors().size() > 0){ + System.out.println("FOUND ERRORS IN FILE...."); + for (int i = 0; i < ds.getErrors().size(); i++){ + DataError de = (DataError)ds.getErrors().get(i); + System.out.println("Error: " + de.getErrorDesc() + " Line: " + de.getLineNo()); + } + } + + //clear out the DataSet object for the JVM to collect + ds.freeMemory(); + }catch(Exception ex){ + ex.printStackTrace(); + } + + + } + + + + private static Map readSettings() throws Exception{ + Map result = new HashMap(); + FileReader fr = null; + BufferedReader br = null; + String line = null; + + try{ + fr = new FileReader("settings.properties"); + br = new BufferedReader(fr); + + while ((line = br.readLine()) != null){ + if (line.trim().length() == 0 || line.startsWith("#") || line.indexOf("=") == -1){ + continue; + } + + result.put(line.substring(0,line.indexOf("=")), line.substring(line.indexOf("=") + 1)); + } + }finally{ + if (fr != null) fr.close(); + if (br != null) br.close(); + } + + return result; + + } + +} Added: trunk/PZFileReaderSamples/CSVPerformanceTest/ExecuteSample.bat =================================================================== --- trunk/PZFileReaderSamples/CSVPerformanceTest/ExecuteSample.bat (rev 0) +++ trunk/PZFileReaderSamples/CSVPerformanceTest/ExecuteSample.bat 2006-10-16 10:55:08 UTC (rev 55) @@ -0,0 +1,2 @@ +java -Xmx712m -Xms712m -cp ./;../../pzFileReader2_2_2.jar;../../lib/jdom.jar;../../lib/jxl.jar CSVPerformanceTest +pause \ No newline at end of file Added: trunk/PZFileReaderSamples/CSVPerformanceTest/README.txt =================================================================== --- trunk/PZFileReaderSamples/CSVPerformanceTest/README.txt (rev 0) +++ trunk/PZFileReaderSamples/CSVPerformanceTest/README.txt 2006-10-16 10:55:08 UTC (rev 55) @@ -0,0 +1,30 @@ +File Type: Must Be A CSV file + +This is meant to be a performance test. The sample file contains 10 columns and 100,000 rows. + + +Performance Tests +------------------------------ + Machine Specs: P4 1.7 GHZ 256MB RAM | Parse Time: 45-48 secs. + Machine Specs: P4 2.9 GHZ 1 GB RAM | Parse Time: 23-25 secs. + +Feel free to post additional performance tests in the SF forums :) + + +There is a settings.properties file in this directory. This file has 2 different options: + +verbose - can be set to true/false. If set to true, the data in the file will be ran to the screen +after the parse. There is a 2 second pause before data start to get spit to the screen. This is +to allow the user to see the total time it took to parse the file. + +csvFile - set this to the path of the CSV file to be read in. Feel free to test this against your own +CSV files. + + +This particular example uses the first record in the file for the column names. + +Depending on the size of the file being parsed, the -Xmx parameter may need to be adjusted. This +is the max memory setting for the JVM to use. This parameter is set in the ExecuteSample.bat file +and is currently set to 128mb. This needs to be adjusted if OutOfMemory errors occur. + + Added: trunk/PZFileReaderSamples/CSVPerformanceTest/SampleCSV.csv =================================================================== --- trunk/PZFileReaderSamples/CSVPerformanceTest/SampleCSV.csv (rev 0) +++ trunk/PZFileReaderSamples/CSVPerformanceTest/SampleCSV.csv 2006-10-16 10:55:08 UTC (rev 55) @@ -0,0 +1,100001 @@ +"column 1","column 2","column 3","column 4","column 5","column 6","column 7","column 8","column 9","column 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 10" +"data 1","data 2","data 3","data 4","data 5","data 6","data 7","data 8","data 9","data 1... [truncated message content] |
From: <zep...@us...> - 2006-10-16 10:53:40
|
Revision: 54 http://svn.sourceforge.net/pzfilereader/?rev=54&view=rev Author: zepernick Date: 2006-10-16 03:53:30 -0700 (Mon, 16 Oct 2006) Log Message: ----------- Removing out of date examples Removed Paths: ------------- trunk/PZFileReaderSamples/CSVPerformanceTest.java trunk/PZFileReaderSamples/CSVTestFileCreator.java trunk/PZFileReaderSamples/DelimitedColumnNamesInFile.java trunk/PZFileReaderSamples/DelimitedFileExportToExcel.java trunk/PZFileReaderSamples/DelimitedWithPZMap.java trunk/PZFileReaderSamples/DelimitedWithPZMapErrors.java trunk/PZFileReaderSamples/FixedLengthWithPZMap.java trunk/PZFileReaderSamples/LowLevelParse.java trunk/PZFileReaderSamples/NumericsAndDates.java Deleted: trunk/PZFileReaderSamples/CSVPerformanceTest.java =================================================================== --- trunk/PZFileReaderSamples/CSVPerformanceTest.java 2006-10-15 19:52:37 UTC (rev 53) +++ trunk/PZFileReaderSamples/CSVPerformanceTest.java 2006-10-16 10:53:30 UTC (rev 54) @@ -1,126 +0,0 @@ -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.util.HashMap; -import java.util.Map; - -import com.pz.reader.DataError; -import com.pz.reader.DataSet; - -/* - * Created on Dec 1, 2005 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Style - Code Templates - */ - -/** - * @author zepernick - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class CSVPerformanceTest { - - public static void main(String[] args) { - - DataSet ds = null; - String[] colNames = null; - Map settings = null; - - try{ - - - settings = readSettings(); - - //delimited by a comma - //text qualified by double quotes - //ignore first record - long timeStarted = System.currentTimeMillis(); - ds = new DataSet(new File((String)settings.get("csvFile")),",","\"",false); - long timeFinished = System.currentTimeMillis(); - - - String timeMessage = ""; - - if (timeFinished - timeStarted < 1000){ - timeMessage = (timeFinished - timeStarted) + " Milleseconds..." ; - }else{ - timeMessage = ((timeFinished - timeStarted) / 1000) + " Seconds..."; - } - - System.out.println(""); - System.out.println("********FILE PARSED IN: " + timeMessage + " ******"); - Thread.sleep(2000); //sleep for a couple seconds to the message above can be read - - if (Boolean.valueOf((String)settings.get("verbose")).booleanValue()){ - timeStarted = System.currentTimeMillis(); - colNames = ds.getColumns(); - - while (ds.next()){ - for (int i = 0; i < colNames.length; i++){ - System.out.println("COLUMN NAME: " + colNames[i] + " VALUE: " + ds.getString(colNames[i])); - } - - System.out.println("==========================================================================="); - } - timeFinished = System.currentTimeMillis(); - - if (timeFinished - timeStarted < 1000){ - timeMessage = (timeFinished - timeStarted) + " Milleseconds..." ; - }else{ - timeMessage = ((timeFinished - timeStarted) / 1000) + " Seconds..."; - } - - System.out.println(""); - System.out.println("********Displayed Data To Console In: " + timeMessage + " ******"); - - } - - - if (ds.getErrors() != null && ds.getErrors().size() > 0){ - System.out.println("FOUND ERRORS IN FILE...."); - for (int i = 0; i < ds.getErrors().size(); i++){ - DataError de = (DataError)ds.getErrors().get(i); - System.out.println("Error: " + de.getErrorDesc() + " Line: " + de.getLineNo()); - } - } - - //clear out the DataSet object for the JVM to collect - ds.freeMemory(); - }catch(Exception ex){ - ex.printStackTrace(); - } - - - } - - - - private static Map readSettings() throws Exception{ - Map result = new HashMap(); - FileReader fr = null; - BufferedReader br = null; - String line = null; - - try{ - fr = new FileReader("settings.properties"); - br = new BufferedReader(fr); - - while ((line = br.readLine()) != null){ - if (line.trim().length() == 0 || line.startsWith("#") || line.indexOf("=") == -1){ - continue; - } - - result.put(line.substring(0,line.indexOf("=")), line.substring(line.indexOf("=") + 1)); - } - }finally{ - if (fr != null) fr.close(); - if (br != null) br.close(); - } - - return result; - - } - -} Deleted: trunk/PZFileReaderSamples/CSVTestFileCreator.java =================================================================== --- trunk/PZFileReaderSamples/CSVTestFileCreator.java 2006-10-15 19:52:37 UTC (rev 53) +++ trunk/PZFileReaderSamples/CSVTestFileCreator.java 2006-10-16 10:53:30 UTC (rev 54) @@ -1,86 +0,0 @@ -import java.io.FileWriter; -import java.io.PrintWriter; - -/* - * Created on Nov 30, 2005 - * - */ - -/** - * @author zepernick - * - * Creates a sample csv file with the specified number of columns and rows - */ -public class CSVTestFileCreator { - - public static void main(String[] args) { - int cols = 0; - int rows = 0; - FileWriter fw = null; - PrintWriter out = null; - - if (args.length != 2){ - printUsage(); - return; - } - - try{ - cols = Integer.parseInt(args[0]); - rows = Integer.parseInt(args[1]); - }catch(Exception ex){ - printUsage(); - return; - } - - try{ - - fw = new FileWriter("SampleCSV.csv"); - out = new PrintWriter(fw); - - - //write the column names across the top of the file - for (int i = 1; i <= cols; i++){ - if (i > 1){ - out.write(","); - } - out.write("\"column " + i + "\""); - } - out.write("\r\n"); - out.flush(); - - - //write the rows - for (int i = 1; i <= rows; i++){ - for (int j = 1; j <= cols; j++){ - if (j > 1){ - out.write(","); - } - out.write("\"data " + j + "\""); - } - - out.write("\r\n"); - out.flush(); - } - - - }catch(Exception ex){ - ex.printStackTrace(); - }finally{ - try{ - if (out != null) out.close(); - if (fw != null) fw.close(); - }catch(Exception ignore){} - - - } - - - } - - private static void printUsage(){ - System.out.println("INVALID USAGE..."); - System.out.println("PARAMETER 1 = # OF COLUMNS"); - System.out.println("PARAMETER 2 = # OF ROWS"); - System.out.println("Example - java CSVTestFileCreator 10 100"); - } -} Deleted: trunk/PZFileReaderSamples/DelimitedColumnNamesInFile.java =================================================================== --- trunk/PZFileReaderSamples/DelimitedColumnNamesInFile.java 2006-10-15 19:52:37 UTC (rev 53) +++ trunk/PZFileReaderSamples/DelimitedColumnNamesInFile.java 2006-10-16 10:53:30 UTC (rev 54) @@ -1,60 +0,0 @@ -/* - * Created on Nov 27, 2005 - * - */ - -import java.io.File; - -import com.pz.reader.DataError; -import com.pz.reader.DataSet; -import com.pz.reader.ordering.OrderBy; -import com.pz.reader.ordering.OrderColumn; - -/** - * @author zepernick - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class DelimitedColumnNamesInFile { - public static void main(String[] args)throws Exception{ - DataSet ds = null; - String[] colNames = null; - OrderBy orderby = null; - - - //delimited by a comma - //text qualified by double quotes - //ignore first record - ds = new DataSet(new File("PEOPLE-CommaDelimitedWithQualifier.txt"),",","\"",false); - - //re order the data set by last name - orderby = new OrderBy(); - orderby.addOrderColumn(new OrderColumn("CITY",false)); - orderby.addOrderColumn(new OrderColumn("LASTNAME",true)); - ds.orderRows(orderby); - - colNames = ds.getColumns(); - - while (ds.next()){ - for (int i = 0; i < colNames.length; i++){ - System.out.println("COLUMN NAME: " + colNames[i] + " VALUE: " + ds.getString(colNames[i])); - } - - System.out.println("==========================================================================="); - } - - - if (ds.getErrors() != null && ds.getErrors().size() > 0){ - System.out.println("FOUND ERRORS IN FILE...."); - for (int i = 0; i < ds.getErrors().size(); i++){ - DataError de = (DataError)ds.getErrors().get(i); - System.out.println("Error: " + de.getErrorDesc() + " Line: " + de.getLineNo()); - } - } - - //clear out the DataSet object for the JVM to collect - ds.freeMemory(); - - } -} Deleted: trunk/PZFileReaderSamples/DelimitedFileExportToExcel.java =================================================================== --- trunk/PZFileReaderSamples/DelimitedFileExportToExcel.java 2006-10-15 19:52:37 UTC (rev 53) +++ trunk/PZFileReaderSamples/DelimitedFileExportToExcel.java 2006-10-16 10:53:30 UTC (rev 54) @@ -1,50 +0,0 @@ -/* - * Created on Dec 31, 2004 - * - */ - -import java.io.File; - -import com.pz.reader.DataSet; -import com.pz.reader.ordering.OrderBy; -import com.pz.reader.ordering.OrderColumn; - -/** - * @author zepernick - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class DelimitedFileExportToExcel { - public static void main(String[] args)throws Exception{ - DataSet ds = null; - OrderBy orderby = null; - - - //delimited by a comma - //text qualified by double quotes - //ignore first record - ds = new DataSet(new File("PEOPLE-Delimited.pzmap.xml"),new File("PEOPLE-CommaDelimitedWithQualifier.txt"),",","\"",true, false); - - //re order the data set by last name - orderby = new OrderBy(); - orderby.addOrderColumn(new OrderColumn("CITY",false)); - orderby.addOrderColumn(new OrderColumn("LASTNAME",true)); - ds.orderRows(orderby); - - - if (ds.getErrors() != null && ds.getErrors().size() > 0){ - System.out.println("FOUND ERRORS IN FILE"); - } - - - //lets write this file out to excel :) - ds.writeToExcel(new File("MyExcelExport.xls")); - - - - //clear out the DataSet object for the JVM to collect - ds.freeMemory(); - - } -} Deleted: trunk/PZFileReaderSamples/DelimitedWithPZMap.java =================================================================== --- trunk/PZFileReaderSamples/DelimitedWithPZMap.java 2006-10-15 19:52:37 UTC (rev 53) +++ trunk/PZFileReaderSamples/DelimitedWithPZMap.java 2006-10-16 10:53:30 UTC (rev 54) @@ -1,55 +0,0 @@ -/* - * Created on Dec 31, 2004 - * - */ - -import java.io.File; - -import com.pz.reader.DataSet; -import com.pz.reader.ordering.OrderBy; -import com.pz.reader.ordering.OrderColumn; - -/** - * @author zepernick - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class DelimitedWithPZMap { - public static void main(String[] args)throws Exception{ - DataSet ds = null; - String[] colNames = null; - OrderBy orderby = null; - - - //delimited by a comma - //text qualified by double quotes - //ignore first record - ds = new DataSet(new File("PEOPLE-Delimited.pzmap.xml"),new File("PEOPLE-CommaDelimitedWithQualifier.txt"),",","\"",true, false); - - //re order the data set by last name - orderby = new OrderBy(); - orderby.addOrderColumn(new OrderColumn("CITY",false)); - orderby.addOrderColumn(new OrderColumn("LASTNAME",true)); - // ds.orderRows(orderby); - - colNames = ds.getColumns(); - - while (ds.next()){ - for (int i = 0; i < colNames.length; i++){ - System.out.println("COLUMN NAME: " + colNames[i] + " VALUE: " + ds.getString(colNames[i])); - } - - System.out.println("==========================================================================="); - } - - - if (ds.getErrors() != null && ds.getErrors().size() > 0){ - System.out.println("FOUND ERRORS IN FILE"); - } - - //clear out the DataSet object for the JVM to collect - ds.freeMemory(); - - } -} Deleted: trunk/PZFileReaderSamples/DelimitedWithPZMapErrors.java =================================================================== --- trunk/PZFileReaderSamples/DelimitedWithPZMapErrors.java 2006-10-15 19:52:37 UTC (rev 53) +++ trunk/PZFileReaderSamples/DelimitedWithPZMapErrors.java 2006-10-16 10:53:30 UTC (rev 54) @@ -1,63 +0,0 @@ -/* - * Created on Dec 31, 2004 - * - */ - -import java.io.File; -import java.util.Iterator; - -import com.pz.reader.DataError; -import com.pz.reader.DataSet; -import com.pz.reader.ordering.OrderBy; -import com.pz.reader.ordering.OrderColumn; - -/** - * @author zepernick - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class DelimitedWithPZMapErrors { - public static void main(String[] args)throws Exception{ - DataSet ds = null; - String[] colNames = null; - OrderBy orderby = null; - Iterator errors = null; - DataError dataError = null; - - - //delimited by a comma - //text qualified by double quotes - //ignore first record - ds = new DataSet(new File("PEOPLE-Delimited.pzmap.xml"),new File("PEOPLE-CommaDelimitedWithQualifier.txt"),",","\"",true); - - //re order the data set by last name - orderby = new OrderBy(); - orderby.addOrderColumn(new OrderColumn("CITY",false)); - orderby.addOrderColumn(new OrderColumn("LASTNAME",true)); - ds.orderRows(orderby); - - colNames = ds.getColumns(); - - while (ds.next()){ - for (int i = 0; i < colNames.length; i++){ - System.out.println("COLUMN NAME: " + colNames[i] + " VALUE: " + ds.getString(colNames[i])); - } - - System.out.println("==========================================================================="); - } - - System.out.println(">>>>>>ERRORS!!!"); - errors = ds.getErrors().iterator(); - - while (errors.hasNext()){ - dataError = (DataError)errors.next(); - - System.out.println("ERROR: " + dataError.getErrorDesc() + " LINE NUMBER: " + dataError.getLineNo()); - } - -// clear out the DataSet object for the JVM to collect - ds.freeMemory(); - - } -} Deleted: trunk/PZFileReaderSamples/FixedLengthWithPZMap.java =================================================================== --- trunk/PZFileReaderSamples/FixedLengthWithPZMap.java 2006-10-15 19:52:37 UTC (rev 53) +++ trunk/PZFileReaderSamples/FixedLengthWithPZMap.java 2006-10-16 10:53:30 UTC (rev 54) @@ -1,38 +0,0 @@ -/* - * Created on Dec 31, 2004 - * - */ - - -import java.io.File; - -import com.pz.reader.DataSet; - -/** - * @author zepernick - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class FixedLengthWithPZMap { - public static void main(String[] args)throws Exception{ - DataSet ds = null; - String[] colNames = null; - - ds = new DataSet(new File("PEOPLE-FixedLength.pzmap.xml"),new File("PEOPLE-FixedLength.txt"), false); - - colNames = ds.getColumns(); - - while (ds.next()){ - for (int i = 0; i < colNames.length; i++){ - System.out.println("COLUMN NAME: " + colNames[i] + " VALUE: " + ds.getString(colNames[i])); - } - - System.out.println("==========================================================================="); - } - - //clear out the DataSet object for the JVM to collect - ds.freeMemory(); - - } -} Deleted: trunk/PZFileReaderSamples/LowLevelParse.java =================================================================== --- trunk/PZFileReaderSamples/LowLevelParse.java 2006-10-15 19:52:37 UTC (rev 53) +++ trunk/PZFileReaderSamples/LowLevelParse.java 2006-10-16 10:53:30 UTC (rev 54) @@ -1,61 +0,0 @@ -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.util.ArrayList; -import java.util.List; - -import com.pz.reader.util.ParserUtils; - -/* - * Created on Nov 27, 2005 - * - */ - -/** - * @author zepernick - * - */ -public class LowLevelParse { - - public static void main(String[] args) { - BufferedReader br = null; - FileReader fr = null; - File textFile = new File("PEOPLE-CommaDelimitedWithQualifier.txt"); - String line = null; - List elements = null; - - try{ - fr = new FileReader(textFile); - br = new BufferedReader(fr); - - - while ((line = br.readLine()) != null){ - if (line.trim().length() == 0){ - continue; - } - - //tell the parser to split using a comma delimiter with a " - // text qualifier. The text qualifier is optional, it can be null - // or empty - elements = ParserUtils.splitLine(line, "," , "\""); - - - for (int i = 0; i < elements.size(); i++){ - System.out.println("Column " + i + ": " + (String)elements.get(i)); - } - - System.out.println("==========================================================================="); - - } - - }catch (Exception ex){ - ex.printStackTrace(); - }finally{ - try{ - if (br != null) br.close(); - if (fr != null) fr.close(); - }catch(Exception ignore){} - } - - } -} Deleted: trunk/PZFileReaderSamples/NumericsAndDates.java =================================================================== --- trunk/PZFileReaderSamples/NumericsAndDates.java 2006-10-15 19:52:37 UTC (rev 53) +++ trunk/PZFileReaderSamples/NumericsAndDates.java 2006-10-16 10:53:30 UTC (rev 54) @@ -1,43 +0,0 @@ -/* - * Created on Dec 31, 2004 - * - */ - -import java.io.File; -import java.text.SimpleDateFormat; - -import com.pz.reader.DataSet; -import com.pz.reader.ordering.OrderBy; -import com.pz.reader.ordering.OrderColumn; - -/** - * @author zepernick - * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates - */ -public class NumericsAndDates { - public static void main(String[] args)throws Exception{ - DataSet ds = null; - //wll provide a clean format for printing the date to the screen - SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy"); - - //delimited by a comma - //text qualified by double quotes - //ignore first record - ds = new DataSet(new File("INVENTORY-Delimited.pzmap.xml"),new File("INVENTORY-CommaDelimitedWithQualifier.txt"),",","\"",true); - - //demonstrates the casting abilities of PZFileReader - while (ds.next()){ - System.out.println("Item Desc: " + ds.getString("ITEM_DESC") + " (String)"); - System.out.println("In Stock: " + ds.getInt("IN_STOCK") + " (int)"); - System.out.println("Price: " + ds.getDouble("PRICE") + " (double)"); - System.out.println("Received Dt: " + sdf.format(ds.getDate("LAST_RECV_DT")) + " (Date)"); - System.out.println("==========================================================================="); - } - - //clear out the DataSet object for the JVM to collect - ds.freeMemory(); - - } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |