Difference between revisions of "API:EPrints/OpenArchives"

From EPrints Documentation
Jump to: navigation, search
(New page: <!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost. -...)
 
(Removing all content from page)
 
Line 1: Line 1:
<!-- Pod2Wiki=_preamble_
 
This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost.
 
-->{{Pod2Wiki}}{{API:Source|file=EPrints/OpenArchives.pm|package_name=EPrints::OpenArchives}}[[Category:API|OpenArchives]]<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_name -->=NAME=
 
'''EPrints::OpenArchives''' - Methods for open archives support in EPrints.
 
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_description -->=DESCRIPTION=
 
This module contains methods used by the EPrints OAI interface.  See http://www.openarchives.org/ for more information.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_methods -->=METHODS =
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_make_header -->==make_header==
 
 
  $xml = EPrints::OpenArchives::make_header( $session, $eprint, $oai2 )
 
 
Return a DOM tree containing the generic &lt;header&gt; part of a OAI response describing an EPrint.
 
 
Return the OAI2 version if $oai2 is true.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_make_record -->==make_record==
 
 
  $xml = EPrints::OpenArchives::make_record( $session, $eprint, $fn, $oai2 )
 
 
Return XML DOM describing the entire OAI &lt;record&gt; for a single eprint.
 
 
If $oai2 is true return the XML suitable for OAI v2.0
 
 
$fn is a pointer to a function which takes ( $eprint, $session ) and returns an XML DOM tree describing the metadata in the desired format.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_to_oai_identifier -->==to_oai_identifier==
 
 
  $oai_id EPrints::OpenArchives::to_oai_identifier( $archive_id, $eprintid )
 
 
Give the full OAI identifier of an eprint, given the local eprint id.
 
 
$archive_id is the ID used for OAI, which may be different from that used by EPrints.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_from_oai_identifier -->==from_oai_identifier==
 
 
  $eprintid = EPrints::OpenArchives::from_oai_identifier( $session, $oai_identifier )
 
 
Return the local eprint id of an oai eprint identifier.
 
 
Return undef if this does not match a possible eprint.
 
 
This does not check the eprint actually exists, just that the OAI identifier is suitable.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_encode_setspec -->==encode_setspec==
 
 
  $encoded = EPrints::OpenArchives::encode_setspec( @bits )
 
 
This encodes a list of values in such a way that it is a legal  OAI setspec, even if it contains non-ascii characters etc.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_decode_setspec -->==decode_setspec==
 
 
  @decoded = EPrints::OpenArchives::decode_setspec( $encoded )
 
 
This decodes a list of parameters encoded by encode_setspec
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_text2bytestring -->==text2bytestring==
 
 
  $encoded = EPrints::OpenArchives::text2bytestring( $string )
 
 
Converts a string into hex. eg. "A" becomes "41".
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_bytestring2text -->==bytestring2text==
 
 
  $decoded = EPrints::OpenArchives::bytestring2text( $encstring )
 
 
Does the reverse of text2bytestring.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=_postamble_ --><!-- End of Pod2Wiki -->
 

Latest revision as of 15:41, 12 August 2009