<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments for Ancient Programming</title>
	<link>http://www.ancientprogramming.com</link>
	<description>What I encounter in my software part of life is in danger of being commented upon here</description>
	<pubDate>Fri, 05 Sep 2008 14:54:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>Comment on Fixedformat4j 1.2.0 released by jeyben</title>
		<link>http://www.ancientprogramming.com/2008/06/12/fixedformat4j-120-released/#comment-61</link>
		<dc:creator>jeyben</dc:creator>
		<pubDate>Sat, 14 Jun 2008 14:30:46 +0000</pubDate>
		<guid>http://www.ancientprogramming.com/2008/06/12/fixedformat4j-120-released/#comment-61</guid>
		<description>@Daniele: I have requested the 1.2.0 to be uploaded to ibiblio two days ago. It usually takes a week for them to process the jira upload request.
In the meantime you can download the jar manually and put it in your project repository. 

About your custom formatter request it is already possible. I just haven't made thorough documentation on this topic yet.

But what you have to do is implement the FixedFormatter interface (you could extend the StringFormatter and override the asString asObject methods with your validation code). Each formatter will have all the annotated data available through a FormatInstructions object.

The current StringFormatter implementation looks like this and you can access the pattern through the FormatInstructions object:
&lt;pre name="code" class="java"&gt;
public String asString(String string, FormatInstructions instructions) {
  String result = null;
  if (string != null) {
    result = string;
  }
  return result;
}
&lt;/pre&gt;

You can use your custom formatter by adding it to the Field annotation like this:
&lt;pre name="code" class="java"&gt;
@Field(offset = 50, length = 10, align = Align.RIGHT, paddingChar = '0', formatter = CustomFormatter.class)
&lt;/pre&gt;

I hope that helped you.

Your validation idea is good. I will find a way to implement it in the 1.3.0 release. Feel free to send me your implementation thoughts.</description>
		<content:encoded><![CDATA[<p>@Daniele: I have requested the 1.2.0 to be uploaded to ibiblio two days ago. It usually takes a week for them to process the jira upload request.<br />
In the meantime you can download the jar manually and put it in your project repository. </p>
<p>About your custom formatter request it is already possible. I just haven&#8217;t made thorough documentation on this topic yet.</p>
<p>But what you have to do is implement the FixedFormatter interface (you could extend the StringFormatter and override the asString asObject methods with your validation code). Each formatter will have all the annotated data available through a FormatInstructions object.</p>
<p>The current StringFormatter implementation looks like this and you can access the pattern through the FormatInstructions object:</p>
<pre name="code" class="java">
public String asString(String string, FormatInstructions instructions) {
  String result = null;
  if (string != null) {
    result = string;
  }
  return result;
}
</pre>
<p>You can use your custom formatter by adding it to the Field annotation like this:</p>
<pre name="code" class="java">
@Field(offset = 50, length = 10, align = Align.RIGHT, paddingChar = '0', formatter = CustomFormatter.class)
</pre>
<p>I hope that helped you.</p>
<p>Your validation idea is good. I will find a way to implement it in the 1.3.0 release. Feel free to send me your implementation thoughts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fixedformat4j 1.2.0 released by Daniele</title>
		<link>http://www.ancientprogramming.com/2008/06/12/fixedformat4j-120-released/#comment-60</link>
		<dc:creator>Daniele</dc:creator>
		<pubDate>Fri, 13 Jun 2008 13:56:17 +0000</pubDate>
		<guid>http://www.ancientprogramming.com/2008/06/12/fixedformat4j-120-released/#comment-60</guid>
		<description>Hi. I have found and tried Fixedformat4j 1.1.1 today (no 1.2.0 on maven2 repo to date...)

I really like the api and I would like to integrate in the simple mechanism it provides to read field, also my custom validation. 

To say: I would like to have a string validator that check that the strings does not contains character like points and such. Or, that a Date is valid and a day 99 is not accepted (while JDK DateFormatter accept it and just updates the month). 

I would Like to write my custom annotation, or use FixedFormatPattern that could accept a regex and validate it in the StringFormatter implementation. 

What I am asking are not new features but if there is a way to add a custom Formatter. Here we have tried to find some entry point without any success. You have any advice?

Thanks and congratulation for nice work.</description>
		<content:encoded><![CDATA[<p>Hi. I have found and tried Fixedformat4j 1.1.1 today (no 1.2.0 on maven2 repo to date&#8230;)</p>
<p>I really like the api and I would like to integrate in the simple mechanism it provides to read field, also my custom validation. </p>
<p>To say: I would like to have a string validator that check that the strings does not contains character like points and such. Or, that a Date is valid and a day 99 is not accepted (while JDK DateFormatter accept it and just updates the month). </p>
<p>I would Like to write my custom annotation, or use FixedFormatPattern that could accept a regex and validate it in the StringFormatter implementation. </p>
<p>What I am asking are not new features but if there is a way to add a custom Formatter. Here we have tried to find some entry point without any success. You have any advice?</p>
<p>Thanks and congratulation for nice work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Manipulating fixed formatted text files by Felipe Gonçalves Coury</title>
		<link>http://www.ancientprogramming.com/2008/03/01/manipulating-fixed-formatted-text-files/#comment-51</link>
		<dc:creator>Felipe Gonçalves Coury</dc:creator>
		<pubDate>Sat, 07 Jun 2008 20:59:54 +0000</pubDate>
		<guid>http://www.ancientprogramming.com/2008/03/01/manipulating-fixed-formatted-text-files/#comment-51</guid>
		<description>I have just created the website for JFileHelpers, so if you are interested on joining forces:

&lt;a href="http://www.jfilehelpers.com" rel="nofollow"&gt;http://www.jfilehelpers.com&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>I have just created the website for JFileHelpers, so if you are interested on joining forces:</p>
<p><a href="http://www.jfilehelpers.com" rel="nofollow">http://www.jfilehelpers.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fixedformat4j released! by jeyben</title>
		<link>http://www.ancientprogramming.com/2008/05/25/fixedformat4j-released/#comment-48</link>
		<dc:creator>jeyben</dc:creator>
		<pubDate>Sun, 01 Jun 2008 16:07:56 +0000</pubDate>
		<guid>http://www.ancientprogramming.com/2008/05/25/fixedformat4j-released/#comment-48</guid>
		<description>@Andries Inzé

Thanks for your feedback.

Currently my focus has been on parsing/formatting one single line. I have not dived into a general way for reading/writing larger files.

At the project where we use the framework we have build a, what we call RecordModel as a view on a file.

Each line in our file is recognized by a combination of characters in the beginning of the file.
Ex. We have a line type called A0, because it startes with an A and a zero. We have created the boilerplate code you talk about and it would be natural to have something doing the hardwork in fixedformat4j.

I am still thinking on how I could load a complete file without being to domain specific and your suggestion could be a solution. On the otherhand I would like it to integrate with the fixedformatmanager and the Records somehow.</description>
		<content:encoded><![CDATA[<p>@Andries Inzé</p>
<p>Thanks for your feedback.</p>
<p>Currently my focus has been on parsing/formatting one single line. I have not dived into a general way for reading/writing larger files.</p>
<p>At the project where we use the framework we have build a, what we call RecordModel as a view on a file.</p>
<p>Each line in our file is recognized by a combination of characters in the beginning of the file.<br />
Ex. We have a line type called A0, because it startes with an A and a zero. We have created the boilerplate code you talk about and it would be natural to have something doing the hardwork in fixedformat4j.</p>
<p>I am still thinking on how I could load a complete file without being to domain specific and your suggestion could be a solution. On the otherhand I would like it to integrate with the fixedformatmanager and the Records somehow.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Fixedformat4j released! by Andries Inzé</title>
		<link>http://www.ancientprogramming.com/2008/05/25/fixedformat4j-released/#comment-47</link>
		<dc:creator>Andries Inzé</dc:creator>
		<pubDate>Sun, 01 Jun 2008 11:27:05 +0000</pubDate>
		<guid>http://www.ancientprogramming.com/2008/05/25/fixedformat4j-released/#comment-47</guid>
		<description>Nice framework.
I'm curious, it there any support for handling very large files? Something like an iterator so I could read one line at a time.
It would help with boilerplate code for reading the lines (using a Scanner for instance).</description>
		<content:encoded><![CDATA[<p>Nice framework.<br />
I&#8217;m curious, it there any support for handling very large files? Something like an iterator so I could read one line at a time.<br />
It would help with boilerplate code for reading the lines (using a Scanner for instance).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on fixedformat4j api - bring on your feedback! by jeyben</title>
		<link>http://www.ancientprogramming.com/2008/03/17/fixedformat4j-api-bring-on-your-feedback/#comment-43</link>
		<dc:creator>jeyben</dc:creator>
		<pubDate>Fri, 30 May 2008 16:00:45 +0000</pubDate>
		<guid>http://www.ancientprogramming.com/2008/03/17/fixedformat4j-api-bring-on-your-feedback/#comment-43</guid>
		<description>Att: Shakir.

You get the exception because you do not have the required dependencies for using fixedformat4j.

Fixedformat4j depends on commons-lang and commons-logging at runtime.
See the list of the dependencies here: http://fixedformat4j.ancientprogramming.com/dependencies.html

If you aren't building with maven, you can download both from here:
commons-lang: http://commons.apache.org/lang/
commons-logging: http://commons.apache.org/logging/

And remember to use the latest release of fixedformat4j as various bugs was found and fixed in 1.1.1:
http://code.google.com/p/fixedformat4j/downloads/list</description>
		<content:encoded><![CDATA[<p>Att: Shakir.</p>
<p>You get the exception because you do not have the required dependencies for using fixedformat4j.</p>
<p>Fixedformat4j depends on commons-lang and commons-logging at runtime.<br />
See the list of the dependencies here: <a href="http://fixedformat4j.ancientprogramming.com/dependencies.html" rel="nofollow">http://fixedformat4j.ancientprogramming.com/dependencies.html</a></p>
<p>If you aren&#8217;t building with maven, you can download both from here:<br />
commons-lang: <a href="http://commons.apache.org/lang/" rel="nofollow">http://commons.apache.org/lang/</a><br />
commons-logging: <a href="http://commons.apache.org/logging/" rel="nofollow">http://commons.apache.org/logging/</a></p>
<p>And remember to use the latest release of fixedformat4j as various bugs was found and fixed in 1.1.1:<br />
<a href="http://code.google.com/p/fixedformat4j/downloads/list" rel="nofollow">http://code.google.com/p/fixedformat4j/downloads/list</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on fixedformat4j api - bring on your feedback! by Shakir Gusaroff</title>
		<link>http://www.ancientprogramming.com/2008/03/17/fixedformat4j-api-bring-on-your-feedback/#comment-42</link>
		<dc:creator>Shakir Gusaroff</dc:creator>
		<pubDate>Fri, 30 May 2008 14:58:28 +0000</pubDate>
		<guid>http://www.ancientprogramming.com/2008/03/17/fixedformat4j-api-bring-on-your-feedback/#comment-42</guid>
		<description>Hey jeyben, I have got the following run time exception when I run your tutorial:



C:\Documents and Settings\gusaros\Desktop\fixformat&#62;java FixedTesting
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lo
gging/LogFactory
        at com.ancientprogramming.fixedformat4j.format.impl.FixedFormatManagerIm
pl.(FixedFormatManagerImpl.java:48)
        at FixedTesting.main(FixedTesting.java:30)


Thank you.</description>
		<content:encoded><![CDATA[<p>Hey jeyben, I have got the following run time exception when I run your tutorial:</p>
<p>C:\Documents and Settings\gusaros\Desktop\fixformat&gt;java FixedTesting<br />
Exception in thread &#8220;main&#8221; java.lang.NoClassDefFoundError: org/apache/commons/lo<br />
gging/LogFactory<br />
        at com.ancientprogramming.fixedformat4j.format.impl.FixedFormatManagerIm<br />
pl.(FixedFormatManagerImpl.java:48)<br />
        at FixedTesting.main(FixedTesting.java:30)</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on fixedformat4j api - bring on your feedback! by Ancient Programming &#187; Blog Archive &#187; Fixedformat4j released!</title>
		<link>http://www.ancientprogramming.com/2008/03/17/fixedformat4j-api-bring-on-your-feedback/#comment-40</link>
		<dc:creator>Ancient Programming &#187; Blog Archive &#187; Fixedformat4j released!</dc:creator>
		<pubDate>Sun, 25 May 2008 21:11:00 +0000</pubDate>
		<guid>http://www.ancientprogramming.com/2008/03/17/fixedformat4j-api-bring-on-your-feedback/#comment-40</guid>
		<description>[...] fixedformat4j api - bring on your feedback! [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] fixedformat4j api - bring on your feedback! [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on fixedformat4j api - bring on your feedback! by Felipe Gonçalves Coury</title>
		<link>http://www.ancientprogramming.com/2008/03/17/fixedformat4j-api-bring-on-your-feedback/#comment-25</link>
		<dc:creator>Felipe Gonçalves Coury</dc:creator>
		<pubDate>Thu, 20 Mar 2008 23:31:35 +0000</pubDate>
		<guid>http://www.ancientprogramming.com/2008/03/17/fixedformat4j-api-bring-on-your-feedback/#comment-25</guid>
		<description>Hey jeyben,

I have a great, working library that does what you intend on doing with your library. Wouldn't you like to join forces instead or splitting in two different ways?

Take a look:
http://tinyurl.com/32cybz

And for code refer the original version, in Portuguese:
http://blog.felipecoury.com/jep/2008/02/java-text-import-export.html

Please e-mail me if you think it's a good idea to join forces.

Best regards,
Felipe Coury.</description>
		<content:encoded><![CDATA[<p>Hey jeyben,</p>
<p>I have a great, working library that does what you intend on doing with your library. Wouldn&#8217;t you like to join forces instead or splitting in two different ways?</p>
<p>Take a look:<br />
<a href="http://tinyurl.com/32cybz" rel="nofollow">http://tinyurl.com/32cybz</a></p>
<p>And for code refer the original version, in Portuguese:<br />
<a href="http://blog.felipecoury.com/jep/2008/02/java-text-import-export.html" rel="nofollow">http://blog.felipecoury.com/jep/2008/02/java-text-import-export.html</a></p>
<p>Please e-mail me if you think it&#8217;s a good idea to join forces.</p>
<p>Best regards,<br />
Felipe Coury.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on fixedformat4j api - bring on your feedback! by Jonathan O'Connor</title>
		<link>http://www.ancientprogramming.com/2008/03/17/fixedformat4j-api-bring-on-your-feedback/#comment-24</link>
		<dc:creator>Jonathan O'Connor</dc:creator>
		<pubDate>Thu, 20 Mar 2008 11:32:35 +0000</pubDate>
		<guid>http://www.ancientprogramming.com/2008/03/17/fixedformat4j-api-bring-on-your-feedback/#comment-24</guid>
		<description>Many years ago I worked on &lt;a href="http://www.jpos.org" rel="nofollow"&gt;jPOS&lt;/a&gt;. This library processes ISO-8583 records. This format has all sorts of interesting ideas. It would be great if your library could parse these types of records. Some ideas:
1. Allow conditional fields. E.g. If field1 has value x, then field 2 exists.
2. Support inheritance ala discriminator fields in JPA. This is a different way to support conditional fields.
3. Your idea of annotating fields is a great idea. How about using the same idea to support reading fixed-column CSV files.

Have fun!</description>
		<content:encoded><![CDATA[<p>Many years ago I worked on <a href="http://www.jpos.org" rel="nofollow">jPOS</a>. This library processes ISO-8583 records. This format has all sorts of interesting ideas. It would be great if your library could parse these types of records. Some ideas:<br />
1. Allow conditional fields. E.g. If field1 has value x, then field 2 exists.<br />
2. Support inheritance ala discriminator fields in JPA. This is a different way to support conditional fields.<br />
3. Your idea of annotating fields is a great idea. How about using the same idea to support reading fixed-column CSV files.</p>
<p>Have fun!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
