MARC::Crosswalk::DublinCore(3pm)

MARC::Crosswalk::DublinCore3pm

Convert data between marc and dublin core

Usage

        my $crosswalk = MARC::Crosswalk::DublinCore->new;
        
        # Convert a MARC record to Dublin Core (simple)
        my $marc = MARC::Record->new_from_usmarc( $blob );
        my $dc   = $crosswalk->as_dublincore( $marc );
        # Convert simple DC to MARC
        $marc = $crosswalk->as_marc( $dc );
        
        # Convert MARC to qualified DC instead
        $crosswalk->qualified( 1 );
        $dc = $crosswalk->as_dublincore( $marc );

Overview

This module provides an implentation of the LOC's spec on how to convert metadata between MARC and Dublin Core format. The spec for converting MARC to Dublin Core is available at: http://www.loc.gov/marc/marc2dc.html, and from DC to MARC: http://www.loc.gov/marc/dccross.html.

NB: The conversion cannot be done in a round-trip manner. i.e. Doing a conversion from MARC to DC, then trying to go back to MARC will not yield the original record.

Installation

To install this module via Module::Build:

        perl Build.PL
        ./Build         # or `perl Build`
        ./Build test    # or `perl Build test`
        ./Build install # or `perl Build install`

To install this module via ExtUtils::MakeMaker:

        perl Makefile.PL
        make
        make test
        make install

Methods

new( %options )

Creates a new crosswalk object. You can pass the "qualified" option (true/false) as well.

        # DC Simple
        $crosswalk = MARC::Crosswalk::DublinCore->new;
        # DC Qualified
        $crosswalk = MARC::Crosswalk::DublinCore->new( qualified => 1 );

qualified( $qualified )

Allows you to specify if qualified Dublin Core should be used in the input or output. Defaults to false (DC simple).

        # DC Simple
        $crosswalk->qualified( 0 );
        # DC Qualified
        $crosswalk->qualified( 1 );

as_dublincore( $marc )

convert a MARC::Record to a DublinCore::Record.

as_marc( $dublincore )

convert a DublinCore::Record to a MARC::Record. NB: Not yet implemented.

Todo

•

Implement as_marc()

•

add tests

Releases

9 releases since Debian 5.0 (Lenny); the text changed 4 times.

  1. 5.0–7
  2. 8
  3. 9–10
  4. 11
  5. 12–13

Author

•

Brian Cassidy <[email protected]>

From libmarc-crosswalk-dublincore-perl 0.02-4 in Debian 13 (Trixie). Parsed by carta from the page's man source.