<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Fixedformat4j 1.2.0 released</title>
	<atom:link href="http://www.ancientprogramming.com/2008/06/12/fixedformat4j-120-released/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ancientprogramming.com/2008/06/12/fixedformat4j-120-released/</link>
	<description>What I encounter in my software part of life is in danger of being commented upon here</description>
	<pubDate>Thu, 20 Nov 2008 21:33:13 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: jeyben</title>
		<link>http://www.ancientprogramming.com/2008/06/12/fixedformat4j-120-released/#comment-68</link>
		<dc:creator>jeyben</dc:creator>
		<pubDate>Tue, 21 Oct 2008 05:02:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.ancientprogramming.com/2008/06/12/fixedformat4j-120-released/#comment-68</guid>
		<description>@Agusti Sanchez: Thanks for your feedback!

I have created issues on the two (for me:-) most interesting suggestions you came with. You can see and follow them &lt;a href="http://code.google.com/p/fixedformat4j/issues/list" rel="nofollow"&gt;here&lt;/a&gt; as well as you can create new issues.</description>
		<content:encoded><![CDATA[<p>@Agusti Sanchez: Thanks for your feedback!</p>
<p>I have created issues on the two (for me:-) most interesting suggestions you came with. You can see and follow them <a href="http://code.google.com/p/fixedformat4j/issues/list" rel="nofollow">here</a> as well as you can create new issues.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Agusti</title>
		<link>http://www.ancientprogramming.com/2008/06/12/fixedformat4j-120-released/#comment-67</link>
		<dc:creator>Agusti</dc:creator>
		<pubDate>Sun, 19 Oct 2008 23:34:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.ancientprogramming.com/2008/06/12/fixedformat4j-120-released/#comment-67</guid>
		<description>Hi Jeyben,

   Congratulations for this API. It's really useful.

I have some suggestions.

&lt;b&gt;ParseException&lt;/b&gt;

The message contains lots of information, but I wished to choose what information to show the user and the format of the message.

So it would be a great idea if you kept the data that you pass into the constructor as class fields and make them available by getter methods. So that client code would be able to catch the ParseException, retrieve the pieces of information it has interest in and build a custom error message in a convenient way.

&lt;b&gt;Unparsed Chunks&lt;/b&gt;

Sometimes some columns should be handled like constants; ie, they are skipped at parsing time and formatted with a constant value at serializing time. It could be nice to be able to mark an attribute as "skippable" at parsing time.

&lt;b&gt;Order instead of Offset&lt;/b&gt;

For programming convenience it would be handy sometimes to be able to define the attributes by order instead of offset. Offset-defined and order-defined attributs should not be mixed together in the same class, so the Record annotation should include a flag to tell whether offset or order is going to be used in the record definition.

&lt;b&gt;Variable length / trailing columns&lt;/b&gt;

Smetimes the last column is optional or of variable length. From the previous comment I infer the API already handles this feature. I'll recheck.

&lt;b&gt;Strict/Loose validation&lt;/b&gt;

The Record annotation could include a flag to tell how strict validation should be; for example fail if actual record length does not exactly match the expected record length or try to parse as fields as possible.

Congratutalions, again, for your work.

Best Regards,

Agusti Sanchez</description>
		<content:encoded><![CDATA[<p>Hi Jeyben,</p>
<p>   Congratulations for this API. It&#8217;s really useful.</p>
<p>I have some suggestions.</p>
<p><b>ParseException</b></p>
<p>The message contains lots of information, but I wished to choose what information to show the user and the format of the message.</p>
<p>So it would be a great idea if you kept the data that you pass into the constructor as class fields and make them available by getter methods. So that client code would be able to catch the ParseException, retrieve the pieces of information it has interest in and build a custom error message in a convenient way.</p>
<p><b>Unparsed Chunks</b></p>
<p>Sometimes some columns should be handled like constants; ie, they are skipped at parsing time and formatted with a constant value at serializing time. It could be nice to be able to mark an attribute as &#8220;skippable&#8221; at parsing time.</p>
<p><b>Order instead of Offset</b></p>
<p>For programming convenience it would be handy sometimes to be able to define the attributes by order instead of offset. Offset-defined and order-defined attributs should not be mixed together in the same class, so the Record annotation should include a flag to tell whether offset or order is going to be used in the record definition.</p>
<p><b>Variable length / trailing columns</b></p>
<p>Smetimes the last column is optional or of variable length. From the previous comment I infer the API already handles this feature. I&#8217;ll recheck.</p>
<p><b>Strict/Loose validation</b></p>
<p>The Record annotation could include a flag to tell how strict validation should be; for example fail if actual record length does not exactly match the expected record length or try to parse as fields as possible.</p>
<p>Congratutalions, again, for your work.</p>
<p>Best Regards,</p>
<p>Agusti Sanchez</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jeyben</title>
		<link>http://www.ancientprogramming.com/2008/06/12/fixedformat4j-120-released/#comment-65</link>
		<dc:creator>jeyben</dc:creator>
		<pubDate>Fri, 17 Oct 2008 21:23:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.ancientprogramming.com/2008/06/12/fixedformat4j-120-released/#comment-65</guid>
		<description>@Sam: I have corrected the bug in the 1.2.2 release. If you stumble upon other bugs or features you would like, feel free to write an &lt;a href="http://code.google.com/p/fixedformat4j/issues/list" rel="nofollow"&gt;issue&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>@Sam: I have corrected the bug in the 1.2.2 release. If you stumble upon other bugs or features you would like, feel free to write an <a href="http://code.google.com/p/fixedformat4j/issues/list" rel="nofollow">issue</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://www.ancientprogramming.com/2008/06/12/fixedformat4j-120-released/#comment-63</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Fri, 26 Sep 2008 21:12:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.ancientprogramming.com/2008/06/12/fixedformat4j-120-released/#comment-63</guid>
		<description>Hi Jacob, 

We are quite happy with fixed formatter except for this bug.

In our flat file , the last column's length is 30 (and offset is 120)
but the length of the values passed is sometimes less than 30.

In this case, the parser ignores the last column and shows the value as 'null'.

We tried paddingChar=' ' to pad with spaces , but it didn't help.

Is it a bug /limitation in present release ?

-Sam</description>
		<content:encoded><![CDATA[<p>Hi Jacob, </p>
<p>We are quite happy with fixed formatter except for this bug.</p>
<p>In our flat file , the last column&#8217;s length is 30 (and offset is 120)<br />
but the length of the values passed is sometimes less than 30.</p>
<p>In this case, the parser ignores the last column and shows the value as &#8216;null&#8217;.</p>
<p>We tried paddingChar=&#8217; &#8216; to pad with spaces , but it didn&#8217;t help.</p>
<p>Is it a bug /limitation in present release ?</p>
<p>-Sam</p>
]]></content:encoded>
	</item>
	<item>
		<title>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 isPermaLink="false">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>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 isPermaLink="false">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>
</channel>
</rss>
