Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dublincore::element(3pm) [debian man page]

DublinCore::Element(3pm)				User Contributed Perl Documentation				  DublinCore::Element(3pm)

NAME
DublinCore::Element - Class for representing a Dublin Core element SYNOPSIS
my $element = DublinCore::Element->new( \%info ); print "content: ", $element->content(), " "; print "qualifier: ", $element->qualifier(), " "; print "language: ", $element->language(), " "; print "scheme: ", $element->scheme(), " "; DESCRIPTION
DublinCore::Record methods such as element(), elements(), title(), etc return DublinCore::Element objects as their result. These can be queried further to extract an elements content, qualifier, language, and schema. For a definition of these attributes please see RFC 2731 and <http://www.dublincore.org>. METHODS
new() The constructor. Take a hashref of input arguments. content() Gets and sets the content of the element. ## extract the element my $title = $record->element( 'title' ); print $title->content(); ## or you can chain them together print $record->element( 'title' )->content(); qualifier() Gets and sets the qualifier used by the element. language() Gets and sets the language of the content in element. scheme() Gets and sets the scheme used by the element. name() Gets and sets the element name (title, creator, date, etc). is_empty() Gets and sets the "empty" status of an element. This is useful when using DublinCore::Record's element() method. To see if the record has an creator elements: if( $record->element( 'creator' )->is_empty ) { # no creators } set() This function overrides the default set() behavior in order to remove the is_empty flag. SEE ALSO
* DublinCore::Record AUTHOR
* Ed Summers <ehs@pobox.com> * Brian Cassidy <bricas@cpan.org> COPYRIGHT AND LICENSE
Copyright 2007 by Ed Summers, 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 DublinCore::Element(3pm)

Check Out this Related 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)
Man Page