[open-ils-commits] r1330 - conifer/branches/rel_2_0/src/perlmods/OpenILS/Application (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Apr 12 09:13:18 EDT 2011
Author: dbs
Date: 2011-04-12 09:13:16 -0400 (Tue, 12 Apr 2011)
New Revision: 1330
Modified:
conifer/branches/rel_2_0/src/perlmods/OpenILS/Application/ResolverResolver.pm
Log:
Update to trunk version of ResolverResolver
Modified: conifer/branches/rel_2_0/src/perlmods/OpenILS/Application/ResolverResolver.pm
===================================================================
--- conifer/branches/rel_2_0/src/perlmods/OpenILS/Application/ResolverResolver.pm 2011-04-12 13:08:22 UTC (rev 1329)
+++ conifer/branches/rel_2_0/src/perlmods/OpenILS/Application/ResolverResolver.pm 2011-04-12 13:13:16 UTC (rev 1330)
@@ -123,7 +123,7 @@
# Big ugly SFX OpenURL request
my $url_args = '?url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&'
- . 'ctx_enc=UTF-8&ctx_ver=Z39.88-2004&rfr_id=info:sid/conifer&'
+ . 'ctx_enc=UTF-8&ctx_ver=Z39.88-2004&rfr_id=info:sid/evergreen&'
. 'sfx.ignore_date_threshold=1&'
. 'sfx.response_type=multi_obj_detailed_xml&__service_type=getFullTxt';
@@ -158,19 +158,27 @@
my @sfx_result;
foreach my $target (@targets) {
+ my %full_txt;
+
+ # Ensure we have a name and especially URL to return
+ $full_txt{'name'} = $target->findvalue('./target_public_name') || next;
+ $full_txt{'url'} = $target->findvalue('.//target_url') || next;
+ $full_txt{'coverage'} = $target->findvalue('.//coverage_statement') || '';
+ $full_txt{'embargo'} = $target->findvalue('.//embargo_statement') || '';
+
if ($format eq 'raw') {
push @sfx_result, {
- public_name => $target->findvalue('./target_public_name'),
- target_url => $target->findvalue('.//target_url'),
- target_coverage => $target->findvalue('.//coverage_statement'),
- target_embargo => $target->findvalue('.//embargo_statement'),
+ public_name => $full_txt{'name'},
+ target_url => $full_txt{'url'},
+ target_coverage => $full_txt{'coverage'},
+ target_embargo => $full_txt{'embargo'},
};
} else {
my $rhr = Fieldmapper::resolver::holdings_record->new;
- $rhr->public_name($target->findvalue('./target_public_name'));
- $rhr->target_url($target->findvalue('.//target_url'));
- $rhr->target_coverage($target->findvalue('.//coverage_statement'));
- $rhr->target_embargo($target->findvalue('.//embargo_statement'));
+ $rhr->public_name($full_txt{'name'});
+ $rhr->target_url($full_txt{'url'});
+ $rhr->target_coverage($full_txt{'coverage'});
+ $rhr->target_embargo($full_txt{'embargo'});
push @sfx_result, $rhr;
}
}
@@ -271,7 +279,7 @@
}
__PACKAGE__->register_method(
- method => 'delete_holdings_cache',
+ method => 'delete_cached_holdings',
api_name => 'open-ils.resolver.delete_cached_holdings',
api_level => 1,
argc => 3,
More information about the open-ils-commits
mailing list