-%# $Id: full.mc,v 1.30 2007-07-03 13:10:50 mike Exp $
<%args>
$id
</%args>
<%perl>
-my $conn = new ZOOM::Connection("localhost:8018/IR-Explain---1");
+my $db = ZOOM::IRSpy::connect_to_registry();
+my $conn = new ZOOM::Connection($db);
$conn->option(elementSetName => "zeerex");
my $query = cql_target($id);
my $rs = $conn->search(new ZOOM::Query::CQL($query));
[ Host => "e:serverInfo/e:host" ],
[ Port => "e:serverInfo/e:port" ],
[ "Database Name" => "e:serverInfo/e:database" ],
+ [ "Access Name (Unique DB)" => "e:databaseInfo/i:udb" ],
[ "Type of Library" => "i:status/i:libraryType" ],
# [ "Username (if needed)" => "e:serverInfo/e:authentication/e:user" ],
# [ "Password (if needed)" => "e:serverInfo/e:authentication/e:password" ],
[ "Services" => \&calc_init_options, $xc ],
[ "Bib-1 Use attributes" => \&calc_ap, $xc, "bib-1" ],
[ "Dan-1 Use attributes" => \&calc_ap, $xc, "dan-1" ],
+ [ "Bath Profile searches" => \&calc_bath, $xc ],
[ "Operators" => \&calc_boolean, $xc ],
[ "Named Result Sets" => \&calc_nrs, $xc ],
[ "Record syntaxes" => \&calc_recsyn, $xc ],
[ "Explain" => \&calc_explain, $xc ],
+ [ "Multiple OPAC records" => \&calc_mor, $xc ],
+ [ "Piggyback searching" => \&calc_piggyback, $xc ],
);
my $title = $xc->find("e:databaseInfo/e:title");
</%perl>
sub calc_reliability_wrapper {
my($id, $xc) = @_;
- return calc_reliability($xc);
+ return calc_reliability_string($xc);
}
sub calc_init_options {
return sort { $a <=> $b } map { $_->findvalue(".") } @nodes;
}
+sub calc_bath {
+ my($id, $xc) = @_;
+
+ my @nodes = $xc->findnodes('i:status/i:search_bath[@ok = "1"]');
+ my $res = join(", ", map { $_->findvalue('@name') } @nodes);
+ $res = "[none]" if $res eq "";
+ return $res;
+}
+
sub calc_boolean {
my($id, $xc) = @_;
return $res;
}
-sub calc_nrs {
- my($id, $xc) = @_;
+sub calc_nrs { _calc_boolean(@_, 'i:status/i:named_resultset[@ok = "1"]') }
+sub calc_mor { _calc_boolean(@_, 'i:status/i:multiple_opac[@ok = "1"]') }
+sub calc_piggyback { _calc_boolean(@_, 'i:status/i:piggyback[@ok = "1"]') }
+
+sub _calc_boolean {
+ my($id, $xc, $xpath) = @_;
- my @nodes = $xc->findnodes('i:status/i:named_resultset[@ok = "1"]');
+ my @nodes = $xc->findnodes($xpath);
return @nodes ? "Yes" : "No";
}