[jdom-interest] I added JDOM support to OpenAdaptor

Scott Smith ssmith at summitlogic.com
Wed Feb 28 05:08:13 PST 2001

Details of what I did:

OpenAdaptor (OA) can read data in a variety of formats (fixed width,
delimited, XML) from a variety of sources (JMS, Socket, JDBC, file),
manipulate the data, and write the data in a variety of formats to a variety
of sinks.  They supported their own version of XML, but it was very limited.

Internally, all data gets transformed into their proprietary DataObjects
data structure for its trip down the "pipe".  (Much like a JDOM document,
DataObject is a self-describing data structure.) Their DataObjects (DO) API
is simple and does a decent job - except for handling XML.  That's where
JDOM comes in.

It was a natural fit to replace their DO with a JDOM document object when
representing XML data.  I actually did not "replace", but added capability.
I added the ability to "tunnel" JDOM documents through a DO by wrapping the
doc in a DO.  It was the easiest solution.  I first looked at replacing DOs
entirely with JDOM docs, but that was too big of an effort.  What I did
gives practically the same effect with a fraction of the work and does not
break any existing behavior.

The JDOMStreamReader object I added to OA reads XML into a JDOM doc with the
option to do a JAXP XSL transformation to the XML before it is read.  The
JDOMStringWriter object writes XML and has an option to do a JAXP XSL
transformation on the data before it's written out.

I plan on added JDOM-based capabilities to OA.  OA supports "pipe"
components that can manipulate the data in the pipe and perform control
operations based on data in the pipe.  Their current pipes cannot work with
my JDOM doc tunneling, so I either need to extend the existing pipes or add
new ones to work with the JDOM docs inside the DO.


More information about the jdom-interest mailing list