jCIM Home

Welcome to jCIM/XML™

First version-0.95 available!
jCIM may be downloaded right here.

What is it?

jCIM is a XSLT and Ant based build tool that inputs the CIM_Schema27.xml file and produces a strongly typed Java interface and class hierarchy, along with supporting javadoc and jar files. If you have any suggestions or would like to contribute, please feel free to contact me.

Why?

A couple of years ago a bunch of us were sitting around at work and someone mentioned that, in addition to MOF files, CIM was now available in XML format. Someone else mentioned that, with a little XSL code and some Java to wrap it we could produce Java source code from the XML. Well four hours later we had a working prototype but as fortune would have it, we didn't get to use the fruits of our labor. Fast forward a couple of years to the present. My new employer is interested in supporting CIM in a new hardware project. Toss out the Java wrapper, write some (more complete) xslt code, and an Ant build file and magic. BigCIM.xsl breaks up the CIM_Schema27.xml file into individual xml files, one for each class. CIM.xsl transforms a little xml file into a java source file. CIMIntf.xsl transforms a little xml file into a java interface file. CIMImpl.xsl transforms a little xml file into a java source file that implements the interface defined by the Intf transform. The Ant build file then compiles, javadocs, and jars the results.

Here's an example of the output code for CIM_MediaAccessDevice.

Installation

  1. Unzip the jCIM.zip file into an appropriate directory on your harddrive.
  2. Download the Ant build tool from the Apache Ant Project web site at http://ant.apache.org/ and install into the ThirdParty directory.
  3. Download the Java SDK from java.sun.com and install into the ThirdParty directory.
  4. Download the Xalan tool from the Apache Xalan Project web site at xml.apache.org and install into the ThirdParty directory.
  5. Download the CIM Schema XML file from the DMTF web site at dmtf.org and install into the Source/xml directory.
  6. Modify the setupjCIM.bat file in the Build/bin directory. (I only have a Windows bat file and would appreciate a Unix script.)

Run

  1. Open a command window in the Build/bin directory
  2. setupjCIM.bat
  3. cd ..\..\Source
  4. ant all

Documentation

You're looking at it. There is, of course, the javadoc output from the tool.

Enhancements

  1. Support toCIMInstance() and fromCIMInstance() methods to convert to and from CIMInstance objects.
  2. Support Jakarta Commons Validator.
  3. Support a validate() method on the classes.
  4. Javabean support.

Contact Information

You can contact me with suggestions and/or bug reports at michael@cimnavigator.com You can also email me if you want a CD with the build completed with all the supporting javadoc and jar files.


© 2003 Michael Kearney. All rights reserved.