X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy%2FTest%2FSearch%2FBath.pm;h=ebc54185bd74a13bdbc79b257c075fd1aa6190f2;hp=14db53e18d0b613a256007473b225767b1b2db51;hb=eb8cee029f8782050f33846673ffda1d8508dff5;hpb=d037bf00831b9f1845651412c02fe4139c0c218f diff --git a/lib/ZOOM/IRSpy/Test/Search/Bath.pm b/lib/ZOOM/IRSpy/Test/Search/Bath.pm index 14db53e..ebc5418 100644 --- a/lib/ZOOM/IRSpy/Test/Search/Bath.pm +++ b/lib/ZOOM/IRSpy/Test/Search/Bath.pm @@ -3,6 +3,10 @@ # Specifically section 5.A.0 ("Functional Area A: Level 0 Basic # Bibliographic Search and Retrieval") and its subsections: # http://www.collectionscanada.gc.ca/bath/tp-bath2.7-e.htm#a +# And section 5.A.1 ("Functional Area A: Level 1 Bibliographic Search +# and Retrieval") and subsections 14 (Standard Identifier Search) and +# 15 (Date of Publication Search): +# http://www.collectionscanada.gc.ca/bath/tp-bath2.10-e.htm#b # # The Bath Level 0 searches have different access-points, but share: # Relation (2) 3 equal @@ -34,10 +38,13 @@ use ZOOM::IRSpy::Utils qw(isodate); my @bath_queries = ( - [ author => 1003 ], # 5.A.0.1 - [ title => 4 ], # 5.A.0.2 - [ subject => 21 ], # 5.A.0.3 - [ any => 1016 ], # 5.A.0.4 + # Name => use, rel, pos, str, tru, com + [ author => 1003, 3, 3, 2, 100, 1 ], # 5.A.0.1 + [ title => 4, 3, 3, 2, 100, 1 ], # 5.A.0.2 + [ subject => 21, 3, 3, 2, 100, 1 ], # 5.A.0.3 + [ any => 1016, 3, 3, 2, 100, 1 ], # 5.A.0.4 + [ ident => 1007, 3, 1, 1, 100, 1 ], # 5.A.1.14 + [ date => 31, 3, 1, 4, 100, 1 ], # 5.A.1.15 ); @@ -56,9 +63,9 @@ sub start_search { if $qindex >= @bath_queries; my $ref = $bath_queries[$qindex]; - my($name, $use_attr) = @$ref; + my($name, @attrs) = @$ref; - my $query = "\@attr 1=$use_attr \@attr 2=3 \@attr 3=3 \@attr 4=2 \@attr 5=100 \@attr 6=1 the"; + my $query = join(" ", map { "\@attr $_=" . $attrs[$_-1] } (1..6)) . " the"; $conn->irspy_search_pqf($query, { qindex => $qindex }, {}, ZOOM::Event::ZEND, \&search_complete, "exception", \&search_complete); @@ -72,7 +79,7 @@ sub search_complete { my $qindex = $udata->{qindex}; my $ref = $bath_queries[$qindex]; - my($name, $use_attr) = @$ref; + my($name) = @$ref; my $n = $task->{rs}->size();