This enables libraries to display multiple MFHD records per bib record, for example if
a library has serial holdings for a given journal in microfiche, microfilm, and print,
the holdings can be represented separately.
Note that we are not currently identifying which MFHD record is providing the
holdings coverage; the likely short-term plan will be to display location information
such as 852 $c.
git-svn-id: svn://svn.open-ils.org/ILS/trunk@13224
dcc99617-32d9-48b4-a31d-
7c20da2025e4
note => "Given a bibliographic record ID, return MFHD holdings"
);
+sub bib_to_mfhd {
+ my ($self, $client, $bib) = @_;
+
+ my $mfhd;
+
+ my $e = OpenILS::Utils::CStoreEditor->new();
+ my $serials = $e->search_serial_record_entry({ record => $bib });
+ if (!ref $serials) {
+ return undef;
+ }
+
+ my $u = OpenILS::Utils::MFHDParser->new();
+ foreach (@$serials) {
+ push(@$mfhd, $u->generate_svr($_->marc));
+ }
+
+ return $mfhd;
+}
+
+__PACKAGE__->register_method(
+ method => "bib_to_mfhd",
+ api_name => "open-ils.search.serial.record.bib.retrieve",
+ argc => 1,
+ note => "Given a bibliographic record ID, return MFHD holdings"
+);
+
1;