Debian Codegraph @

README

raw
1 NAME
2 MARC::Crosswalk::DublinCore - Convert data between MARC and Dublin Core
3
4 SYNOPSIS
5 my $crosswalk = MARC::Crosswalk::DublinCore->new;
6
7 # Convert a MARC record to Dublin Core (simple)
8 my $marc = MARC::Record->new_from_usmarc( $blob );
9 my $dc = $crosswalk->as_dublincore( $marc );
10
11 # Convert simple DC to MARC
12 $marc = $crosswalk->as_marc( $dc );
13
14 # Convert MARC to qualified DC instead
15 $crosswalk->qualified( 1 );
16 $dc = $crosswalk->as_dublincore( $marc );
17
18 DESCRIPTION
19 This module provides an implentation of the LOC's spec on how to convert
20 metadata between MARC and Dublin Core format. The spec for converting
21 MARC to Dublin Core is available at:
22 http://www.loc.gov/marc/marc2dc.html, and from DC to MARC:
23 http://www.loc.gov/marc/dccross.html.
24
25 NB: The conversion cannot be done in a round-trip manner. i.e. Doing a
26 conversion from MARC to DC, then trying to go back to MARC will not
27 yield the original record.
28
29 INSTALLATION
30 To install this module via Module::Build:
31
32 perl Build.PL
33 ./Build # or `perl Build`
34 ./Build test # or `perl Build test`
35 ./Build install # or `perl Build install`
36
37 To install this module via ExtUtils::MakeMaker:
38
39 perl Makefile.PL
40 make
41 make test
42 make install
43
44 METHODS
45 new( %options )
46 Creates a new crosswalk object. You can pass the "qualified" option
47 (true/false) as well.
48
49 # DC Simple
50 $crosswalk = MARC::Crosswalk::DublinCore->new;
51
52 # DC Qualified
53 $crosswalk = MARC::Crosswalk::DublinCore->new( qualified => 1 );
54
55 qualified( $qualified )
56 Allows you to specify if qualified Dublin Core should be used in the
57 input or output. Defaults to false (DC simple).
58
59 # DC Simple
60 $crosswalk->qualified( 0 );
61
62 # DC Qualified
63 $crosswalk->qualified( 1 );
64
65 as_dublincore( $marc )
66 convert a MARC::Record to a DublinCore::Record.
67
68 as_marc( $dublincore )
69 convert a DublinCore::Record to a MARC::Record. NB: Not yet implemented.
70
71 TODO
72 * Implement as_marc()
73 * add tests
74
75 SEE ALSO
76 * http://www.loc.gov/marc/marc2dc.html
77 * http://www.loc.gov/marc/dccross.html
78 * MARC::Record
79 * DublinCore::Record
80
81 AUTHOR
82 * Brian Cassidy <[email protected]>
83
84 COPYRIGHT AND LICENSE
85 Copyright 2005 by Brian Cassidy
86
87 This library is free software; you can redistribute it and/or modify it
88 under the same terms as Perl itself.
89