MARC4J API

The goal of MARC4J is to provide an easy to use Application Programming Interface (API) for working with MARC and MARC XML in Java.

See:
          Description

Packages
org.marc4j Classes to read and write MARC and MARCXML records.
org.marc4j.converter Interfaces for character conversions.
org.marc4j.converter.impl Classes for byte and character conversions.
org.marc4j.marc Interfaces for the record object model.
org.marc4j.marc.impl Default implementation of the MARC record object model.
org.marc4j.util Provides some basic command-line utilities for converting MARC and MARCXML records.

 

The goal of MARC4J is to provide an easy to use Application Programming Interface (API) for working with MARC and MARC XML in Java. MARC stands for MAchine Readable Cataloguing and is a widely used exchange format for bibliographic data. MARC XML provides a loss-less conversion between MARC (MARC21 but also other formats like UNIMARC) and XML.

The structure of a MARC record is defined in the ISO 2709:1996 (Format for Information Exchange) standard (or ANSI/NISO Z39.2-1994, available online from NISO). The MARC4J API is not a full implementation of the ISO 2709:1996 standard. The standard is implemented as it is used in the MARC formats.

MARC4J provides readers and writers for MARC and MARC XML. A MarcReader implementation parses input data and provides an iterator over a collection of Record objects. The record object model is also suitable for in-memory editing of MARC records, just as DOM is used for XML editing purposes. Using a MarcWriter implementation it is possible to create MARC or MARC XML. Once MARC data has been converted to XML you can further process the result with XSLT, for example to convert MARC to MODS.

Although MARC4J is primarily designed for Java development you can use the command-line utilities MarcXmlDriver and XmlMarcDriver to convert between MARC and MARCXML. It is also possible to pre or post process the result using XSLT, for example to convert directly from MODS to MARC or from MARC to MODS.

The source code is published under version 2.1 of the GNU Lesser General Public License. In brief, this means there's no warranty and you can do anything you like with it. The text of the license is included in the distribution. If you make changes to MARC4J and redistribute those changes, then you must publish your modified version under the LGPL.

For more information about the MARC4J project visit http://marc4j.tigris.org.



Copyright © 2002-2006 Bas Peters. All Rights Reserved.