Wednesday, May 23, 2007

Bridge GLUE LDAP schema and GLUE XML schema

GLUE is an information model to describe Grid resources. It has both an LDAP schema and an XML schema as its concrete data models. Usually GLUE data is in LDAP DIT in Grids. I need to read the LDAP data, convert to XML data according to GLUE schema, and then publish into Grimoires registry. What I am doing is:

  1. Use JAXB to generate Java bean classes according to GLUE XML schema;
  2. Parse GLUE LDAP schema with the help of an ANTLR-based LDAP schema parser, and generate Java code that converts LDAP entries to Java beans using the classes generated in step 1;
  3. Use JNDI to read GLUE LDAP DIT, call the code generated in step 2 to create beans that are further serialized to XML (in GLUE schema) by JAXB;
  4. Publish GLUE XML to Grimoires through the XMLView interface, which takes the configuration of XSLT between GLUE schema and Grimoires schema.

No comments: