[Koha-bugs] [Bug 6440] Koha's OAI-PMH does not support sets

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Feb 14 16:06:40 CET 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6440

Magnus Enger <magnus at enger.priv.no> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Failed QA

--- Comment #8 from Magnus Enger <magnus at enger.priv.no> 2012-02-14 15:06:40 UTC ---
1) updatedatabase.pl

I have not seen this construct in updatadatabase.pl before, and it gave me an
error, probably because I'm on a dev install and this would only work for a
normal install? 

+$DBversion = "XXX";
+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+    my $installer = C4::Installer->new();
+    my $full_path = C4::Context->config('intranetdir') .
"/installer/data/$installer->{dbms}/atomicupdate/oai_sets.sql";
+    my $error     = $installer->load_sql($full_path);
+    warn $error if $error;
+    print "Upgrade to $DBversion done (Add OAI SETs tables)\n";
+    SetVersion($DBversion);
+}

I guess the RM will take care of this anyway, though...

2) Online documentation

When I'm on admin/oai_sets.pl and click on [?] in the top right corner I get an
error saying that ...help/admin/oai_sets.tt does not exist. 

3) Deleting a set does not work

The Delete link does not have a value for the "id" parameter. 

4) How is the value in mappings handled?

I can't see that this has been mentioned in the comments anywhere, but here is
what I have found:

Is it case sensitive? Yes
Does it look for substrings within a subfield? No, complete subfields

This would be nice to have in the online documentation.

5) No POD/documentation for misc/migration_tools/build_oai_sets.pl

The script doesn't actually have any options to document, but one comment at
the top saying what it does might be good. Being able to run the script with
the -h option to get a short description would also be nice. 

This script needs a licence statement too. 

6) Item level data

Will this work with 952 and its subfields? Probably not, since the MARC data is
gotten at by doing "SELECT biblionumber, marcxml FROM biblioitems" and as far
as I can tell the item data is not pulled in later. I'm thinking there are
several subfields to 952 that might be interesting to match against, like which
library a record "belongs to" (in the sense that the library owns an item
connected to the record), item type etc

7) OAI-PMH verbs

- verb=ListSets - OK
- verb=ListRecords&metadataPrefix=oai_dc&set=<setSpec> - OK (In Firefox I had
to view source to see the setSpec)
- verb=ListIdentifiers&metadataPrefix=oai_dc&set=<setSpec> - OK
- verb=GetRecord&metadataPrefix=oai_dc&identifier=<identifier> - OK (In Firefox
I had to view source to see the setSpec)

As far as I can tell, the data returned for all these requests looks good. Yay!
:-) 

8) Some thoughts on the implementation

In general, I think the implementation method for generating the sets is sound.
Having to build the sets with a script might seem cumbersome, but if you have
e.g. 300000 records and want to match on some subfield you can't really do it
in real time. Especially since you might be getting a lot of requests. 

On the other hand, doing one big request for every record in the databse will
be heavy for large collections. Could it be possible to "chunk it", and not do
all records at once? I'll leave the judgement of that to cleverer heads than
mine, though. 

9) Possible enhancements

- Matching on values in the datafields (000-009), for example "include records
that have an "a" in position 7 of field 008" (not sure that exact example makes
sense, but that sort of thing, at least)
- Matching against item level data (952 for MARC21/NORMARC at least)
- Add and remove records from sets when records are saved/updated, as suggested
by Frederic in Comment 6. 

I'm failing this because of point number 3 above, and probably because of 2 and
5 also. 

Otherwise: good work, this will be a nice feature to have!

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list