[open-ils-commits] r9068 - in branches/rel_1_2/Open-ILS: examples src/perlmods/OpenILS/Application/Search

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Mar 18 10:57:31 EDT 2008


Author: erickson
Date: 2008-03-18 10:23:20 -0400 (Tue, 18 Mar 2008)
New Revision: 9068

Modified:
   branches/rel_1_2/Open-ILS/examples/opensrf.xml.example
   branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
Log:
added config option for defining the downloaded record format for each Z source

Modified: branches/rel_1_2/Open-ILS/examples/opensrf.xml.example
===================================================================
--- branches/rel_1_2/Open-ILS/examples/opensrf.xml.example	2008-03-18 13:46:17 UTC (rev 9067)
+++ branches/rel_1_2/Open-ILS/examples/opensrf.xml.example	2008-03-18 14:23:20 UTC (rev 9068)
@@ -93,6 +93,8 @@
                     <host>z3950.loc.gov</host>
                     <port>7090</port>
                     <db>Voyager</db>
+                    <!-- fetch the full record with no holdings. FI is the default -->
+                    <record_format>FI</record_format> 
                     <attrs>
                         <tcn><code>12</code><format>1</format></tcn>
                         <isbn><code>7</code><format>6</format></isbn>

Modified: branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
===================================================================
--- branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm	2008-03-18 13:46:17 UTC (rev 9067)
+++ branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm	2008-03-18 14:23:20 UTC (rev 9068)
@@ -195,7 +195,7 @@
 
 	$logger->info("z3950: search [$query] took ".(time - $start)." seconds");
 
-	my $munged = process_results($results, $limit, $offset);
+	my $munged = process_results($results, $limit, $offset, $$args{service});
 	$munged->{query} = $query;
 
 	return $munged;
@@ -210,8 +210,11 @@
 	my $results	= shift;
 	my $limit	= shift;
 	my $offset	= shift;
+    my $service = shift;
 
-	$results->option(elementSetName => "FI"); # full records with no holdings
+    my $rformat = $services{$service}->{record_format} || 'FI';
+	$results->option(elementSetName => $rformat);
+    $logger->info("z3950: using record format '$rformat'");
 
 	my @records;
 	my $res = {};



More information about the open-ils-commits mailing list