Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

marc::crosswalk::dublincore(3pm) [debian man page]

MARC::Crosswalk::DublinCore(3pm)			User Contributed Perl Documentation			  MARC::Crosswalk::DublinCore(3pm)

NAME
MARC::Crosswalk::DublinCore - Convert data between MARC and Dublin Core SYNOPSIS
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 ); DESCRIPTION
This module provides an implentation of the LOC's spec on how to convert metadata between MARC and Dublin Core format. The spec for con- verting 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 SEE ALSO
* http://www.loc.gov/marc/marc2dc.html * http://www.loc.gov/marc/dccross.html * MARC::Record * DublinCore::Record AUTHOR
* Brian Cassidy <bricas@cpan.org> COPYRIGHT AND LICENSE
Copyright 2005 by Brian Cassidy This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.8.8 2007-11-24 MARC::Crosswalk::DublinCore(3pm)

Check Out this Related Man Page

MARC::Charset::Table(3pm)				User Contributed Perl Documentation				 MARC::Charset::Table(3pm)

NAME
MARC::Charset::Table - character mapping db SYNOPSIS
use MARC::Charset::Table; use MARC::Charset::Constants qw(:all); # create the table object my $table = MARC::Charset::Table->new(); # get a code using the marc8 character set code and the character my $code = $table->lookup_by_marc8(CYRILLIC_BASIC, 'K'); # get a code using the utf8 value $code = $table->lookup_by_utf8(chr(0x043A)); DESCRIPTION
MARC::Charset::Table is a wrapper around the character mapping database, which is implemented as a tied hash on disk. This database gets generated by Makefile.PL on installation of MARC::Charset using MARC::Charset::Compiler. The database is essentially a key/value mapping where a key is a MARC-8 character set code + a MARC-8 character, or an integer representing the UCS code point. These keys map to a serialized MARC::Charset::Code object. new() The consturctor. add_code() Add a MARC::Charset::Code to the table. get_code() Retrieve a code using a hash key. lookup_by_marc8() Looks up MARC::Charset::Code entry using a character set code and a MARC-8 value. use MARC::Charset::Constants qw(HEBREW); $code = $table->lookup_by_marc8(HEBREW, chr(0x60)); lookup_by_utf8() Looks up a MARC::Charset::Code object using a utf8 value. db() Returns a reference to a tied character database. MARC::Charset::Table wraps access to the db, but you can get at it if you want. db_path() Returns the path to the character encoding database. Can be called statically too: print MARC::Charset::Table->db_path(); brand_new() An alternate constructor which removes the existing database and starts afresh. Be careful with this one, it's really only used on MARC::Charset installation. perl v5.12.4 2010-09-09 MARC::Charset::Table(3pm)
Man Page