wiki:ebXMLObjectModel

Version 5 (modified by heikki, 16 years ago) ( diff )

--

ebXML Object Model

This page describes GeoNetwork's implementation of the ebXML Object Model.


Introduction

The ebXML Object Model is specified in "ebXML Registry Information Model Version 3.0" wich can be found here. It defines the types of metadata and content that can be stored in an ebXML Registry. The specification is the basis for an XML Schema for this model, which you can find inside this zip file.

GeoNetwork has implemented this information model in Java. The implementation is capable of marshalling, unmarshalling and validating XML documents that conform to the XSD mentioned above. The implementation will be loosely coupled to the Data Layer for storage and retrieval.


Implementation

The implementation of the Information Model is referred to as ebXML Object Model. It consists of a set of Java Beans representing the objects in the specification mentioned above. Where there are discrepancies between the specification and the XSD mentioned above, preference was given to the definition in the XSD. See here for a list of these.

The implementation is structured in the following packages, largely corresponding to the specification:

  • org.geonetwork.ebxml.informationmodel.association
  • org.geonetwork.ebxml.informationmodel.classification
  • org.geonetwork.ebxml.informationmodel.cooperatingregistries
  • org.geonetwork.ebxml.informationmodel.core
  • org.geonetwork.ebxml.informationmodel.core.datatype
  • org.geonetwork.ebxml.informationmodel.event
  • org.geonetwork.ebxml.informationmodel.provenance
  • org.geonetwork.ebxml.informationmodel.service
  • org.geonetwork.ebxml.informationmodel.xsd

All of these packages correspond to a section in the specification except the org.geonetwork.ebxml.informationmodel.xsd package, which contains Java Beans to assist in representing XSD datatypes that have no equivalent in the Java language, such as xsd:duration.

Note: the Access Control section of the Information Model specification is not (yet) part of the implementation.

The implementation is complemented with a set of unit tests, for each of the objects that may be used as a top-level element in an ebXML document. The unit tests are written in the well-known Junit framework. The testcases are for each of these objects, a test for marshalling, and a test for unmarshalling. As we're dealing with XML the tests use the complimentary test library XML Unit. This allows o.a. to ignore differences in whitespace and the order of elements in the XML where that should be ignored.


XML binding


Note: See TracWiki for help on using the wiki.