]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm
adding metabib interface. Also, testing possible doxygen stuff
[Evergreen.git] / Open-ILS / src / perlmods / OpenILS / Application / Storage / Publisher / metabib.pm
1 package OpenILS::Application::Storage::Publisher::metabib;
2 use base qw/OpenILS::Application::Storage/;
3 use vars qw/$VERSION/;
4 use OpenSRF::EX qw/:try/;
5 use OpenILS::Application::Storage::CDBI::metabib;
6 use OpenILS::Utils::Fieldmapper;
7
8 $VERSION = 1;
9
10 sub create_full_rec {
11         my $self = shift;
12         my $client = shift;
13         my $metadata = shift;
14
15         try {
16                 my $rec = biblio::record_entry->create($metadata);
17                 $client->respond( $rec->id );
18         } catch Error with {
19                 $client->respond( 0 );
20         };
21
22         return undef;
23 }
24 __PACKAGE__->register_method(
25         method          => 'create_full_rec',
26         api_name        => 'open-ils.storage.metabib.record_entry.create',
27         api_level       => 1,
28         argc            => 1,
29         doxy            => <<TEXT
30 /** Method to create a "full_rec" (Koha) nodeset in the DB.
31   * ....
32   */
33 int open-ils.storage.metabib.record_entry.create ( full_rec_nodeset* );
34
35 TEXT
36 );