Harvard University Library - Library Digital Initiative
  Home 
  METS 
  JAXB 
  Toolkit 
  Procedural Construction 
  Validation 
  Marshalling / Unmarshalling 
  Implementation 
  Papers and Presentations 
 
  Printer-Friendly Version of Site 

  Harvard University Library 
 
  Office for Information Systems 
 
  Library Digital Initiative 

METS Java Toolkit / The JAXB Framework
Draft Version 1.0 (alpha) 2002/03/15

In creating an API for the METS toolkit we had two options:

  1. Define a new API
  2. Use an existing API specification
In an increasingly balkanized software environment, the decision to define yet another new API should be made sparingly, and only if no existing specification is found to be appropriate. We selected the JAXB specification as the basis for the METS API due to its functional completeness as well as its anticipated market acceptance as a key component of Sun's Java XML Pack bundle.

The JAXB product is comprised of a set of base classes (the javax.xml.bind package); a schema-driven compiler for generating schema-specific binding classes, which are sub-classed from the JAXB base classes; and a set of run-time marshalling classes (the javax.xml.marshal package) invokable by the derived binding classes. JAXB provides mechanisms for local and global type and structural validation, and for marshalling to and from binding class instatiations and XML instance documents.

The organization of JAXB is presented graphically in the following figure:

The JAXB specification is still in early pre-release development. Although a preliminary early version implementation of the class generator has been released, it only accepts as input a subset of the XML DTD language; XML schema is not supported at all. Thus, all of the base classes as well as the METS schema-specific class used in the toolkit were constructed manually, following the JAXB API specification.

Note: Sun has announced that the future production release of the JAXB specification may be incompatible with the current pre-release version. The question of whether to stay with the current format of the METS toolkit or whether to migrate it into compliance with subsequent JAXB specification at some future time remains under discussion.


Stephen Abrams
Harvard University Library, Office for Information Systems
1280 Massachusetts Avenue, Suite 404
Cambridge, MA 02138
stephen_abrams@harvard.edu
Copyright © 2002 by the President and Fellows of Harvard College.
This information about the METS Java Toolkit is provided for evaluation purposes only.

The METS specification was developed as an initiative of the Digital Library Federation and is maintained by the Network Development and MARC Standards Office of the Library of Congress.
The toolkit is compliant with the JAXB API specification, copyright © 2001 Sun Microsystems, Inc.
The toolkit uses the XP parser, copyright © 1997,1998 James Clark.