Sometime back I posted about Java Text Table Formatter. As I worked on that, I realized that most of the data export model could be reused to export the content in various formats, like Xml, Html or Json etc.,
To that end, I started to refactor the code base to support various formats and I’m releasing it as new project data-exporter. It is very simple and flexible library to export the data in various formats. Check out the features and try it out. Let me know if you want some specific feature.
If you have worked with Salesforce WebService API or Metadata API from within Java environment, then it is possible that you might have used Salesforce WSC. This is a all inclusive high performance WebService stack, designed to access the Salesforce APIs easily.
I have been using that for a tool I have been working on and it has been working great.
One issue I found with this library is that it generates two getters for boolean variables (Both get and is variant). Some tools (like Jackson) doesn’t like this fact and complain about it.
org.codehaus.jackson.map.JsonMappingException: Conflicting getter definitions for property "booleanVariable"
Fortunately, it is easy fix this issue. WSC uses templates to generate the Java files. These templates are there in com.sforce.ws.tools. Template which generates the type source files is type.template. In this template, replace the following,
public <%=gen.javaType(el)%> <%=gen.getMethod(el)%>() {
return <%=gen.fieldName(el)%>;
}
with
<% if(!"boolean".equals(gen.javaType(el))) { %>
public <%=gen.javaType(el)%> <%=gen.getMethod(el)%>() {
return <%=gen.fieldName(el)%>;
}
<%}/**end if()*/%>
This should avoid generating the duplicate getters for boolean variables.
You might have experienced this. You want to see an article in some site. When you navigate using your smart phone to read the article, instead of showing the article, site would show you the mobile version of their home page with assumption that they are providing you the enhanced service
. It just freaks me out and I wonder why they do that.
Well, Xkcd, says it well.

If you know the Cricket game, you would sure to be aware of the on going Cricket World Cup 2011 hosted by India, Bangladesh and Sri Lanka.
Usually Google Chrome team releases a extension to make it easy for people to see the details like Fixtures, Teams etc. But not sure why, they haven’t done anything like it this year.
So I thought of writing an extension to do just that. And here is first version. Cricket World Cup 2011
Take a look, try it and let me know what you think (you can post comments in the chrome page itself). If you like it, don’t forget to rate it as you feel appropriate.
For one of the open source project I was working on, I wanted a library which would format the given data set in text table format. Even though I found a library which sort of provides this feature (http://trac.inamik.com/trac/jtable_format) but features were not good enough. More over from the example it looked very complicated to construct the data set as it was not possible to hook up directly into the existing data set (like beans or list).
So I decided to write one and after four days of night coding, I’m releasing the Text-Table-Formatter at Google code. I dedicate this to Madhu. Happy anniversary. Check it out and let me know your feedback.
Recent Comments