« blib/lib/Keystone/Resolver/plugins/ID/info/doi.pm
↑ Summary
blib/lib/Keystone/Resolver/plugins/ServiceType/bookstore.pm »
| 1 | # $Id: isbn.pm,v 1.2 2007-01-26 13:53:48 mike Exp $ | ||
| 2 | |||
| 3 | package Keystone::Resolver::plugins::ID::urn::isbn; | ||
| 4 | |||
| 5 | use strict; | ||
| 6 | use warnings; | ||
| 7 | |||
| 8 | |||
| 9 | sub data { | ||
| 10 | my $class = shift(); | ||
| 11 | my($openurl, $isbn) = @_; | ||
| 12 | |||
| 13 | ### There are a number of different approaches we could take here, | ||
| 14 | # including: | ||
| 15 | # 1. Resolve the ISBN to a unique page, e.g. from Amazon. | ||
| 16 | # 2. Look up the ISBN in a catalogue service such as the Library | ||
| 17 | # of Congress's Z39.50 server, and populate the referent with | ||
| 18 | # the metadata obtained that way. | ||
| 19 | # 3. Just shove the ISBN into the metadata, if it's not there | ||
| 20 | # already. | ||
| 21 | # 4. Any or all of the above, as specified either by a run-time | ||
| 22 | # option or a "config" element in the resource database. | ||
| 23 | # Unsuprisingly, we go for option 3, at least for now. | ||
| 24 | |||
| 25 | my $extraMetaData = {}; | ||
| 26 | $extraMetaData->{isbn} = $isbn | ||
| 27 | if !defined $openurl->rft("isbn"); | ||
| 28 | |||
| 29 | return (undef, undef, $extraMetaData); | ||
| 30 | } | ||
| 31 | |||
| 32 | |||
| 33 | 1; |