Skip to main content

Visualize your schema dependencies

Posted by kirillcool on July 24, 2005 at 2:42 PM PDT

One of the questions i have been asked at our BoF at the last JavaOne was whether i was aware of some application that can show dependencies between schema files as a graph. At that moment, and still now, I am unaware of any such open-source application. However, i promised that it wouldn't take long for such a feature to make its way into JAXB Workshop next release, and 29 days later, it's officially available.

First, a couple of nice screenshots from the application itself (all window controls have been removed for the sake of clarity). Here is a graph for JXDM (Department of Justice) schema set:

The next schema set comes from FpML (Financial Products):

The third schema set comes from VoiceXML:

And the last ungodly creature comes from one of the schemas in HR-XML (Human Resources). This graph has 30 vertices (schemas) and 104 edges (includes / imports / redefines), making each vertex connected to an average of almost 7 other vertices:

In order to run the application by yourself, you can either WebStart it (it needs permissions to access local schema files to read them), or download the bundle from the project download section and run drop/explorer.bat on your favourite flavour of Windows (for other OSes you will have to run the batch yourself). In any case, you'll need JDK 5.0+. In order to view a graph for your favourite set of schemas, wait for the application to come up, press Ctrl+L (or go to Actions menu), choose your schema, let it be processed and go to the Schema graph tab.

The magic of drawing, layout and mouse activity (zoom, pan, tooltip) is provided completely by the JUNG library.

Be prepared to wait for a while until the application loads up, it uses a few heavy third-party jars to make it work. And the last thing - don't even think of loading schemas from IRS, unless you want to stare at a graph with 400+ vertices.