Alignment: Chaotic Java

Tuesday, January 03, 2006

When a framework uses itself

I think the most fun part of using a framework, except for having others use it, is when the framework or producing company is using the framework itself for some task.

Just like the Apache site running on an Apache HTTP Server, Atlassian's JIRA having their JIRA issues tracked by JIRA, and so on.

Soon I will be facing Feature Requests 1380359 and 1380356, namely generating XSD from Java classes and vice versa. Thinking about the task ahead, as I usually try to do, I realised that it should be fairly simple, at least from parsing the XSD document perspective.

You see, I could bind the XSD document schema to POJOs using X2J, read the XSD document into Java classes using X2JReader, and use these Java classes to create Java annotated code.

On the other way around, I could just use the already existing Analyser class to fill up the information in those Java classes describing the XSD, and then just write them down using the X2JWriter.

Ah... I love simplicity..

Related Topics
XML to POJOs: Alpha 0.1
XML to POJOs: Repeating Types
XML to POJOs Example: Contacts List

0 Comments:

Post a Comment

<< Home