1 OAI-PMH Data Provider Support
2 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4 Evergreen can now act as an OAI-PMH data provider, exposing the catalog to
5 harvesting through the [OAI2 protocol](http://www.openarchives.org/OAI/openarchivesprotocol.html).
10 There are two: one for bibliographic records and one for authority records:
12 http://your-domain/opac/extras/oai/authority
13 http://your-domain/opac/extras/oai/biblio
15 An example of a working URL on a system with an authority record with ID
18 http://your-domain/opac/extras/oai/authority?verb=GetRecord&identifier=oai:localhost:1&metadataPrefix=oai_dc
20 Setspec are not implemented
21 +++++++++++++++++++++++++++
23 This is a work in progress and not enabled. The aim is to have the owning library determine the set hierarchy. The Concerto
24 test database for example has a record with record ID #1. This record is so popular it has copies attached to library units
25 "Example Branch 1", "Example Branch 2", "Example Branch 3", "Example Bookmobile 1" which is a child of Branch 3 and
26 "Example Branch 4". This entire kinship is expressed as sets like so:
31 <setSpec>CONS</setSpec>
32 <setSpec>CONS:SYS1</setSpec>
33 <setSpec>CONS:SYS2</setSpec>
34 <setSpec>CONS:SYS1:BR1</setSpec>
35 <setSpec>CONS:SYS1:BR2</setSpec>
36 <setSpec>CONS:SYS2:BR3</setSpec>
37 <setSpec>CONS:SYS2:BR4</setSpec>
38 <setSpec>CONS:SYS2:BR3:BM1</setSpec>
41 Likewise the setSpecs of authority records are derived from their browse axis ( Title, Author, Subject and Topic ).
43 Bibliographic mapping of assets to 852 subfields
44 ++++++++++++++++++++++++++++++++++++++++++++++++
46 Certain attributes asset are placed into 852 subfields so:
49 | subfield code | asset resource
59 Thus the Concerto with record ID #1 will have it's 852 subfields expressed as:
61 <marc:datafield ind1="4" ind2=" " tag="852">
62 <marc:subfield code="a">Stacks</marc:subfield>
63 <marc:subfield code="b">BR4</marc:subfield>
64 <marc:subfield code="c">ML 60 R100</marc:subfield>
65 <marc:subfield code="d">BR4</marc:subfield>
66 <marc:subfield code="g">CONC70000435</marc:subfield>
67 <marc:subfield code="n">Checked out</marc:subfield>
70 This mapping can be customized and extended with static subfields:
72 <marc:subfield code="q">A constant value</marc:subfield>
78 See comments in opensrf.xml (in the open-ils.supercat app_settings/oai element)
79 for default configuration and customization instructions.
83 OAI support is not turned on by default. To enable it, edit the Apache
84 configuration file `eg_vhost.conf` to uncomment the following
85 section and restart Apache:
89 #<Location /opac/extras/oai>
90 # SetHandler perl-script
91 # PerlHandler OpenILS::WWW::SuperCat::OAI
98 Optional: Setting the datestamp
99 +++++++++++++++++++++++++++++++
101 The edit date of the bibliographic and authority record is used as
102 datestamp. If you want the date for editorial updates of bibliographic
103 assets (i.e. copies, call numbers) reflected in the datestamp, then add the
104 triggers shown below.
108 CREATE OR REPLACE FUNCTION oai.datestamp(rid BIGINT)
111 UPDATE biblio.record_entry AS bre
112 SET edit_date = now()
117 CREATE OR REPLACE FUNCTION oai.call_number_datestamp()
118 RETURNS TRIGGER AS $$
122 PERFORM oai.datestamp(OLD.record);
126 PERFORM oai.datestamp(NEW.record);
132 CREATE OR REPLACE FUNCTION oai.copy_datestamp()
133 RETURNS TRIGGER AS $$
137 PERFORM oai.datestamp((SELECT acn.record FROM asset.call_number as acn WHERE acn.id = OLD.call_number));
141 PERFORM oai.datestamp((SELECT acn.record FROM asset.call_number as acn WHERE acn.id = NEW.call_number));
147 CREATE TRIGGER call_number_datestamp AFTER INSERT OR UPDATE OR DELETE ON asset.call_number FOR EACH ROW EXECUTE PROCEDURE oai.call_number_datestamp();
148 CREATE TRIGGER copy_datestamp AFTER INSERT OR UPDATE OR DELETE ON asset.copy FOR EACH ROW EXECUTE PROCEDURE oai.copy_datestamp();