|
From: <be...@us...> - 2006-10-17 20:09:53
|
Revision: 86
http://svn.sourceforge.net/pzfilereader/?rev=86&view=rev
Author: benoitx
Date: 2006-10-17 13:09:22 -0700 (Tue, 17 Oct 2006)
Log Message:
-----------
Couple of changes for website.
Modified Paths:
--------------
trunk/PZFileReader/src/main/java/net/sf/pzfilereader/DataSet.java
trunk/PZFileReaderSamples/src/main/java/net/sf/pzfilereader/examples/ConsoleMenu.java
trunk/src/site/history.xml
trunk/src/site/index.xml
Modified: trunk/PZFileReader/src/main/java/net/sf/pzfilereader/DataSet.java
===================================================================
--- trunk/PZFileReader/src/main/java/net/sf/pzfilereader/DataSet.java 2006-10-17 19:36:41 UTC (rev 85)
+++ trunk/PZFileReader/src/main/java/net/sf/pzfilereader/DataSet.java 2006-10-17 20:09:22 UTC (rev 86)
@@ -46,6 +46,7 @@
*
* @author Paul Zepernick
* @version 2.0.1
+ * @todo Ought to implement an interface for the access to data.
*/
public class DataSet {
@@ -1198,7 +1199,7 @@
}
/**
- * erases the dataset and releases memory for the JVM to reclaim
+ * Erases the dataset early and releases memory for the JVM to reclaim
*/
public void freeMemory() {
if (rows != null) {
Modified: trunk/PZFileReaderSamples/src/main/java/net/sf/pzfilereader/examples/ConsoleMenu.java
===================================================================
--- trunk/PZFileReaderSamples/src/main/java/net/sf/pzfilereader/examples/ConsoleMenu.java 2006-10-17 19:36:41 UTC (rev 85)
+++ trunk/PZFileReaderSamples/src/main/java/net/sf/pzfilereader/examples/ConsoleMenu.java 2006-10-17 20:09:22 UTC (rev 86)
@@ -57,7 +57,7 @@
* how the entry will be displayed in the menu
* @param methodName
* name of the public method
- * @parem askForRepeat call back for repeat
+ * @param askForRepeat call back for repeat
*/
public void addMenuItem(final String menuDisplay, final String methodName, final boolean repeat) {
menu.add(menuDisplay);
Modified: trunk/src/site/history.xml
===================================================================
--- trunk/src/site/history.xml 2006-10-17 19:36:41 UTC (rev 85)
+++ trunk/src/site/history.xml 2006-10-17 20:09:22 UTC (rev 86)
@@ -5,7 +5,7 @@
</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."
+ content="How did we here and why?"
/>
<meta name="keywords" content="CSV, Fixed length file parser" />
@@ -41,7 +41,7 @@
If you have a good experience with this project, and it has benefited you in some way, please spread the word.</p>
<p>Recently, <a href="http://www.objectlab.co.uk">ObjectLab</a> from the UK has decided to offer some support to PZFileReader.
- PZFileReader is part of the ObjectLab Kit family, a 'support' group for useful open source projects.
+ PZFileReader is now "kind of" part of the ObjectLab Kit family, a 'support' group for useful open source projects.
They developed the Maven build, the website and are active members of this project. They are world leaders in the design
and development of bespoke applications for the Securities Finance Industry.</p>
Modified: trunk/src/site/index.xml
===================================================================
--- trunk/src/site/index.xml 2006-10-17 19:36:41 UTC (rev 85)
+++ trunk/src/site/index.xml 2006-10-17 20:09:22 UTC (rev 86)
@@ -29,26 +29,28 @@
<p>Substrings in a <strong>fixed width parse</strong> can be daunting to deal with when trying to analyze what existing code is doing,
and what about when you have no comments...</p>
- <p>We also provide <strong>delimited file parsing</strong>; works with any delimiter / qualifier, multiline records, delimiter or qualifier allowed in column value
- This is released under the business-friendly Apache 2.0 license. <a href="http://digg.com/submit?phase=2&url=objectlabkit.sourceforge.net&title=Paul%20Zepernick%20and%20ObjectLab%20have%20released%20version%202%2E3%2E0%20of%20PZFileReader%2E&bodytext=PZFileReader%20on%20SourceForge%3A%20a%20Java%20(1%2E4%2B)%20flat%20file%20parser%20that%20handles%20CSV,%20fixed%20length%20and%20custom%20delimiters%2E%20The%20formats%20are%20configured%20in%20XML%20or%20in%20DB%2E%20Once%20parsed%20the%20data%20is%20easily%20accessible%20record%20by%20record%20and%20via%20a%20column%20name,%20regardless%20of%20order%2E%20%20It%20is%20fast%20and%20released%20under%20Apache%20license%202%2E0%2E&topic=programming">
-
- <img src="http://digg.com/img/badges/91x17-digg-button.png" width="91" height="17" alt="Digg!" style="vertical-align:middle" /></a></p>
+ <p>We also provide <strong>delimited file parsing</strong>; works with any delimiter / qualifier, multiline records, delimiter or qualifier allowed in column value.</p>
- <p>PZFileReader is part of the ObjectLab Kit family.</p>
+ <p>PZFileReader is part of the ObjectLab Kit family.<a href="http://digg.com/submit?phase=2&url=objectlabkit.sourceforge.net&title=Paul%20Zepernick%20and%20ObjectLab%20have%20released%20version%202%2E3%2E0%20of%20PZFileReader%2E&bodytext=PZFileReader%20on%20SourceForge%3A%20a%20Java%20(1%2E4%2B)%20flat%20file%20parser%20that%20handles%20CSV,%20fixed%20length%20and%20custom%20delimiters%2E%20The%20formats%20are%20configured%20in%20XML%20or%20in%20DB%2E%20Once%20parsed%20the%20data%20is%20easily%20accessible%20record%20by%20record%20and%20via%20a%20column%20name,%20regardless%20of%20order%2E%20%20It%20is%20fast%20and%20released%20under%20Apache%20license%202%2E0%2E&topic=programming">
+ <img src="http://digg.com/img/badges/91x17-digg-button.png" width="91" height="17" alt="Digg!" style="vertical-align:middle" /></a></p>
- <subsection name="Problem Sorting Data Prior To File Processing?">
- <p>PZFileReader provides a sorting mechanism for your flat files. This allows for your data to be properly sorted before processing your business logic.</p>
- </subsection>
+ <subsection name="Why should you use PZFileParser?">
+
+ <p>There is more to it than one could imagine at first sight:</p>
+ <ul>
+
+ <li><strong>Problem Sorting Data Prior To File Processing?</strong></li>
+ <ul><li>PZFileReader provides a sorting mechanism for your flat files. This allows for your data to be properly sorted before processing your business logic.</li></ul>
+
- <subsection name ="Bad Numeric Data?">
- <p> Do often receive numeric data with dollar signs, or commas? PZFileReader has the ability to strip these out and return as a double or int.
- Even empty elements or hard spaces can be converted to a numeric without issue.</p>
- </subsection>
+ <li><strong>Bad Numeric Data?</strong></li>
+ <ul><li>Do you often receive numeric data with dollar signs, or commas? PZFileReader has the ability to strip these out and return as a double or int.
+ Even empty elements or hard spaces can be converted to a numeric without issue.</li></ul>
-
- <subsection name ="Problems With One Bad Record Blowing Up The Entire Parse?">
- <p>Bad records get excluded from the DataSet and added to an error collection. This error collection can be checked at the end of the parse to
- report on bad records. A description of the error and the line number in the file is provided. Why blow up an entire import for one bad record?</p>
+ <li><strong>Problems With One Bad Record Blowing Up The Entire Parse?</strong></li>
+ <ul><li>Bad records get excluded from the DataSet and added to an error collection. This error collection can be checked at the end of the parse to
+ report on bad records. A description of the error and the line number in the file is provided. Why blow up an entire import for one bad record?</li></ul>
+ </ul>
</subsection>
<subsection name="Which JDK?">
@@ -67,21 +69,19 @@
<section name="How do I use it?">
<p>Basic Steps</p>
- <ul>
- <li>Construct DataSet()</li>
+ <ol>
+ <li>Construct DataSet() with a File, a InputStream or a Reader (soon)</li>
<li>Call DataSet.next() to advance record pointer</li>
<li>Process columns; DataSet.getString("colname"), getInt("colname"), getDouble("colname"), getDate("colname"), etc</li>
<li>Check for parse errors; DataSet.getErrors()</li>
- <li>Release memmory; DataSet.freeMemory()</li>
- </ul>
+ <li>Release memory early; DataSet.freeMemory()</li>
+ </ol>
<subsection name="Reading Delimited File">
<div class="source"><pre>
- DataSet ds = null;
-
//construct DataSet
- ds = new DataSet(new File("ColumnMappings.pzmap.xml"), //xml mapping file
+ DataSet ds = new DataSet(new File("ColumnMappings.pzmap.xml"), //xml mapping file
new File("delimitedfile.txt"), //text file to parse
",", //delimiter
"\"", //text qualifier (can be null or empty)
@@ -91,7 +91,7 @@
ds.getString("mycolumnName");
}
- ds.freeMemory();
+ ds.freeMemory(); // probably should be in a finally.
</pre></div>
</subsection>
@@ -99,10 +99,8 @@
<subsection name="Reading Fixed Width File">
<div class="source"><pre>
- DataSet ds = null;
-
//construct DataSet
- ds = new DataSet(new File("PEOPLE-FixedLength.pzmap.xml"), //xml mapping file
+ DataSet ds = new DataSet(new File("PEOPLE-FixedLength.pzmap.xml"), //xml mapping file
new File("PEOPLE-FixedLength.txt")); //text file to parse
while (ds.next()){ //loop through file
@@ -114,6 +112,16 @@
</subsection>
+ <subsection name="Reading a Message of Fixed Width">
+
+ <div class="source"><pre>
+
+... coming soon
+
+ </pre></div>
+
+ </subsection>
+
</section>
</body>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|