initial (perl-side) authority support
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 30 Aug 2005 15:14:08 +0000 (15:14 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 30 Aug 2005 15:14:08 +0000 (15:14 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1770 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm
Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/authority.pm [new file with mode: 0644]
Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/dbi.pm

index 6fcf59c..7ec18e0 100644 (file)
@@ -6,6 +6,7 @@ use Class::DBI::AbstractSearch;
 use OpenILS::Application::Storage::CDBI::actor;
 use OpenILS::Application::Storage::CDBI::action;
 use OpenILS::Application::Storage::CDBI::asset;
+use OpenILS::Application::Storage::CDBI::authority;
 use OpenILS::Application::Storage::CDBI::biblio;
 use OpenILS::Application::Storage::CDBI::config;
 use OpenILS::Application::Storage::CDBI::metabib;
@@ -393,15 +394,20 @@ sub modify_from_fieldmapper {
        asset::call_number->has_a( creator => 'actor::user' );
        asset::call_number->has_a( editor => 'actor::user' );
 
+       authority::record_note->has_a( record => 'authority::record_entry' );
        biblio::record_note->has_a( record => 'biblio::record_entry' );
        
+       authority::record_entry->has_a( creator => 'actor::user' );
+       authority::record_entry->has_a( editor => 'actor::user' );
        biblio::record_entry->has_a( creator => 'actor::user' );
        biblio::record_entry->has_a( editor => 'actor::user' );
        
        metabib::metarecord->has_a( master_record => 'biblio::record_entry' );
        
+       authority::record_descriptor->has_a( record => 'authority::record_entry' );
        metabib::record_descriptor->has_a( record => 'biblio::record_entry' );
        
+       authority::full_rec->has_a( record => 'authority::record_entry' );
        metabib::full_rec->has_a( record => 'biblio::record_entry' );
        
        metabib::title_field_entry->has_a( source => 'biblio::record_entry' );
@@ -449,6 +455,9 @@ sub modify_from_fieldmapper {
        asset::call_number->has_many( copies => 'asset::copy' );
        asset::call_number->has_many( notes => 'asset::call_number_note' );
 
+       authority::record_entry->has_many( record_descriptor => 'authority::record_descriptor' );
+       authority::record_entry->has_many( notes => 'authority::record_note' );
+
        biblio::record_entry->has_many( record_descriptor => 'metabib::record_descriptor' );
        biblio::record_entry->has_many( notes => 'biblio::record_note' );
        biblio::record_entry->has_many( call_numbers => 'asset::call_number' );
diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/authority.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/authority.pm
new file mode 100644 (file)
index 0000000..d5e4499
--- /dev/null
@@ -0,0 +1,45 @@
+package OpenILS::Application::Storage::CDBI::authority;
+our $VERSION = 1;
+
+#-------------------------------------------------------------------------------
+package authority;
+use base qw/OpenILS::Application::Storage::CDBI/;
+#-------------------------------------------------------------------------------
+package authority::record_entry;
+use base qw/authority/;
+
+authority::record_entry->table( 'authority_record_entry' );
+authority::record_entry->columns( All => qw/id arn_source arn_value creator editor
+                                     create_date edit_date source active
+                                     deleted marc last_xact_id/ );
+
+#-------------------------------------------------------------------------------
+package authority::record_note;
+use base qw/authority/;
+
+authority::record_note->table( 'authority_record_note' );
+authority::record_note->columns( All => qw/id record value creator
+                                       editor create_date edit_date/ );
+#-------------------------------------------------------------------------------
+package authority::full_rec;
+use base qw/authority/;
+
+authority::full_rec->table( 'authority_full_rec' );
+authority::full_rec->columns( Primary => qw/id/ );
+authority::full_rec->columns( Essential => qw/record tag ind1 ind2 subfield value/ );
+
+#-------------------------------------------------------------------------------
+package authority::record_descriptor;
+use base qw/authority/;
+#use OpenILS::Application::Storage::CDBI::asset;
+
+authority::record_descriptor->table( 'authority_rec_descriptor' );
+authority::record_descriptor->columns( Primary => qw/id/ );
+authority::record_descriptor->columns( Essential => qw/record record_status
+                                                   char_encoding/ );
+
+#-------------------------------------------------------------------------------
+
+
+1;
+
index 8d36c58..a3678aa 100644 (file)
        asset::stat_cat_entry_copy_map->sequence( 'asset.stat_cat_entry_copy_map_id_seq' );
        
        #---------------------------------------------------------------------
+       package authority::record_entry;
+       
+       authority::record_entry->table( 'authority.record_entry' );
+       authority::record_entry->sequence( 'authority.record_entry_id_seq' );
+
+       #---------------------------------------------------------------------
        package biblio::record_entry;
        
        biblio::record_entry->table( 'biblio.record_entry' );
        #biblio::record_marc->sequence( 'biblio.record_marc_id_seq' );
        #
        #---------------------------------------------------------------------
+       package authority::record_note;
+       
+       authority::record_note->table( 'authority.record_note' );
+       authority::record_note->sequence( 'authority.record_note_id_seq' );
+
+       #---------------------------------------------------------------------
        package biblio::record_note;
        
        biblio::record_note->table( 'biblio.record_note' );
 
 
        #-------------------------------------------------------------------------------
+       package authority::record_descriptor;
+
+       authority::record_descriptor->table( 'authority.rec_descriptor' );
+       authority::record_descriptor->sequence( 'authority.rec_descriptor_id_seq' );
+
+       OpenILS::Application::Storage->register_method(
+               api_name        => 'open-ils.storage.direct.authority.record_descriptor.batch.create',
+               method          => 'copy_create',
+               api_level       => 1,
+               'package'       => 'OpenILS::Application::Storage',
+               cdbi            => 'authority::record_descriptor',
+       );
+
+       #-------------------------------------------------------------------------------
        package metabib::record_descriptor;
 
        metabib::record_descriptor->table( 'metabib.rec_descriptor' );
 
 
        #-------------------------------------------------------------------------------
+       package authority::full_rec;
+
+       authority::full_rec->table( 'authority.full_rec' );
+       authority::full_rec->sequence( 'authority.full_rec_id_seq' );
+       authority::full_rec->columns( 'FTS' => 'index_vector' );
+
+       OpenILS::Application::Storage->register_method(
+               api_name        => 'open-ils.storage.direct.authority.full_rec.batch.create',
+               method          => 'copy_create',
+               api_level       => 1,
+               'package'       => 'OpenILS::Application::Storage',
+               cdbi            => 'authority::full_rec',
+       );
+
+
+       #-------------------------------------------------------------------------------
        package metabib::full_rec;
 
        metabib::full_rec->table( 'metabib.full_rec' );