Simple Object String Extractor (previously called Parsernate) is a tool for plain-text messages processing, that contains information that can be stored as property values in a Java class.
Let's see an example:

Where the first 4 characters represents an application ID, the next 15 characters the Firstname, the other 15 characters represents the Lastname, then 9 characters for a personal ID, other 9 characters for phone number and the lasta 20 characters for Job Title.
So typically, you could use the famous String.subString() method, and get all those values and set it in a Java object for application porpouses... but if you have to set more than one message type, the work makes more complicated. And this gets worst if you have to make updates on your code in order to handle message changes.
Now imagine you need to work with the ISO 8583 and parse several messages, well may be SOSE is for you.
When I did this library on the first time, I did a lot of type handling and I divided the property in three groups: Simple, Complex and Container properties. The Simple properties were Java primitives as class properties. Complex properties, refers to property class that are User-made classes. And the last one are Container properties, that can be List or Maps.
Since Java 5 release and above, I did a lot of changes on my code, so right now, and for this beta , I'm just handling simple and complex properties. I'll probably release a new one with this functionality soon. I also want to provide a documentation about how to use it and create a web page (at the first time hosted at SourceForge) for this.
SOSE is available at SourceForge: http://sourceforge.net/projects/sose/


0 comments:
Post a Comment