DLESE Tools
v1.6.0

Package org.dlese.dpc.xml

Contains Interfaces and APIs for working with XML including XML parsing, validation and transformations.

See:
          Description

Interface Summary
XMLDocumentFormatConverter Implementations of this interface are used by the XMLConversionService to convert content from one format to another.
XMLFormatConverter Implementations of this interface are used by the XMLConversionService to convert XML from one format to another.
XMLMap Provides a hashmap-like interface into an XML-based metadata file, hashed by user-defined named keys.
 

Class Summary
ADNToBriefMetaFormatConverter Converts from ADN format to the BriefMeta format.
ADNToLocalizedFormatConverter Converts from ADN format to a localized ADN format, which contains no namespace declarations.
ADNToNSDLDCFormatConverter Converts from ADN format to the NSDL DC format.
ADNToOAIDCFormatConverter Converts from ADN format to the OAI DC format.
DLESEAnnoToLocalizedFormatConverter Converts from DLESE Anno format to a localized DLESE Anno format, which contains no namespace declarations.
DLESECollectToLocalizedFormatConverter Converts from DLESE Collect format to a localized DLESE Collect format, which contains no namespace declarations.
Dom4jNodeListComparator Compares two dom4j nodes using an xPath.
Dom4jUtils Utility methods for working with dom4j Documents.
LIBRARY_DCToNSDL_DCFormatConverter EXPERIMENTAL (and low fidelity) converter for library_dc to nsdl_dc.
NCS_COLLECTToNSDL_DCFormatConverter Converts from ADN format to the OAI DC format.
NCS_ITEMToNSDL_DCFormatConverter Converts from NCS_ITEM to NSDL_DC format.
NewsOppsToLocalizedFormatConverter Converts from news_opps format to a localized news_opps format, which contains no namespace declarations.
NSDL_DCToNCS_COLLECTFormatConverter Converts from NSDL_DC format to the NCS_COLLECT format.
NSDL_DCToNCS_ITEMFormatConverter Converts from NSDL_DC format to the NCS_ITEM format.
SimpleErrorHandler A simple XML error handler that catches XML errors and warnings and saves them to StringBuffers so the errors can be extracted and displayed.
SimpleXMLFormatConverter A simple demonstraion implementation of the XMLFormatConverter interface.
XMLConversionService Manages the conversion of XML files from one format to another using XSL or Java classes.
XMLDoc Reads and parses an XML document.
XMLFileFilter A FileFilter for xml files.
XMLNode Creates an object wrapper for JDOM XML elements and for accessing their content.
XMLRecord Creates a wrapper implementation for accessing a JDOM XML document and for mapping the JDOM elements to a local HashMap.
XMLUtils This class holds static methods for use in XML processing.
XMLValidator XMLValidator uses Xerces to parse and validate xml files in a directory or an individual xml file you specify.
XMLWriter Subclassed from JDOM's XMLOutputter, in order to tweak output.
XPathUtils Utilities for testing and manipulating XPaths, represented as String.
XSLTransformer Transforms files or Strings using XSL stylesheets.
XSLUtils Utilities for working with XSL.
 

Exception Summary
XMLException Simply wraps Exception.
 

Package org.dlese.dpc.xml Description

Contains Interfaces and APIs for working with XML including XML parsing, validation and transformations.

From Dave Deniman:

Note: The following information from Dave Deniman pertains to a subset of classes currently found in this package. These classes are no longer being used.

Provides a simple API for reading XML files and directories. The elements and attributes of the XML file are hashed as needed to produce an easy mapping between user-defined names and the desired value or object. This first release requires a mapping class be constructed to implement the XMLMap interface. The mapping is relatively easy to produce and once created makes accessing values trivial. Any number of mappings can be provided. Work is in progress to abstract the mapping using an XML metadata-definition file, which will eliminate the need to manually create mapping classes.

Two classes, XMLNode and XMLRecord, are used to abstract the actual XML parsing. JDOM is the parser used for this implementation. It would not be hard however to implement these two classes as interfaces and thus allow other parsers to be utilized.

Two interactive test programs are provided, TestMapper and TestDirectory, as demos. These prompt for the XML file or directory to map and the type of mapping to use. Three mappings are provided: DLESE IMS, DLESE Review Status, and unqualified Dublin Core. Custom mappers can be easily added, but the appropriate allocation will need to be added to XMLMapFactory. (Running TestDirectory on a large directory can take several minutes.)

See XMLNode for a description of how the actual mappings are implemented. The "key" structure needs to be understood when creating a mapping class. The next release will abstract this using the aforementioned metadata-defintion file.

This is an early release. A subsequent release will provide XML editing support as well.

 

Provides the classes to abstract XML parsing and to implement the name:value mapping between user-defined names and actual XML.

Implementations generally utilize metadata for defining information in user-relevant terminology. These metadata "objects" can and do consist of XML elements and their attributes, singularly or in combination with other elements/attributes.

The mapping interface provided by this package takes advantage of a hashmap implementation that provides "keys" to individual elements of an XML DOM. See XMLNode method


DLESE Tools
v1.6.0