Here are some notes about integrating Greenstone 2.83 with Koha. This enables Koha to link to the Greenstone version of a document if available. And enables Greenstone to download metadata from Koha using OAI for the documents in its collection.
See also
This is a Debian server. After the VMWare Server detects the IP of this Koha VM, ssh login to the server with the following accounts.
To visit the site via web browser - http://[IP of the Koha VM]:8080/, you will be able to login with the "kohaadmin" account
The following are the MySQL account
To test the OAI server is set up correctly, you need to make sure there are some records in the system. If there aren't any, add some new records via the "Cataloging" panel.
http://[IP of the Koha VM]:8080/cgi-bin/koha/opac/oai.pl?verb=ListIdentifiers&metadataPrefix=oai_dc
In here, you will be able to find a list of OAI identifiers. By default, the identifier is constructed as "KOHA-OAI-TEST:" followed by the Koha internal ID. For example, "KOHA-OAI-TEST:1" is the OAI identifier for the first Koha record. Note: This OAI prefix can be changed in the “Global system preferences” page.
http://[IP of the Koha VM]:8080/cgi-bin/koha/opac/oai.pl?verb=GetRecord&identifier=[OAIIdentifier]&metadataPrefix=oai_dc
Important: Please install Greenstone under Linux. In this KOHA-Greenstone integration project, Greenstone uses KOHA OAI identifier as the document identifier. Unfortunately, KOHA OAI identifier uses “:” (column) to separate between OAI prefix and KOHA internal ID. Because Windows does not accept “:“ as a part of its folder name, Greenstone is unable to create the document folder in the archives directory.
Example of Apache configuration
ScriptAlias /greenstone/cgi-bin/ "[Greenstone Installation]/cgi-bin/" <Directory "[Greenstone Installation]/cgi-bin/"> AllowOverride None Options ExecCGI +MultiViews FollowSymLinks Order allow,deny Allow from all </Directory> Alias /greenstone/ "[Greenstone Installation]" <Directory "[Greenstone Installation]"> AllowOverride All Options Indexes FollowSymLinks </Directory>
IMPORTANT:
[Greenstone Installation]/perllib/LWP.pm [Greenstone Installation]/perllib/URI.pm [Greenstone Installation]/perllib/Bundle [Greenstone Installation]/perllib/File [Greenstone Installation]/perllib/HTML [Greenstone Installation]/perllib/HTTP [Greenstone Installation]/perllib/LWP [Greenstone Installation]/perllib/NET [Greenstone Installation]/perllib/URI [Greenstone Installation]/perllib/WWW
Please note that these files have to sit directly under the perllib directory.
metadata: oaiextracted.type sort: oaiextracted.title buttonname: Koha Catalog Type
VList
<td valign=top>[link][icon][/link]</td> <td valign=top>[highlight][link]{Or}{[classifyTitle],[Title]}[/link]<br/> {If}{[numleafdocs],,{If}{[Title],<small>Extracted Title: [Title]</small>}}[highlight] {If}{[Date], <small><i>_textdate_[Date]</i></small>} {If}{[NumPages], <small><i>_textnumpages_[NumPages]</i></small>} {If}{[Source], <small><i>_textsource_[Source]</i></small>}</td>
DocumentText
<h3>[classifyTitle]</h3> <b>Greenstone Metadata</b> <hr width=\"100%\"/> <b>dls.Title:</b> [dls.Title]<br/> <b>dls.Subject:</b> [dls.Subject]<br/> <b>dc.Identifier:</b> [dc.Identifier]<br/> <br/> <b>{If}{[oaiextracted.title],Koha Metadata, <span style=\"color: #B0B0B0\">Koha Metadata (No Koha Metadata Extracted)</span>}</b> <hr width=\"100%\"/> {If}{[oaiextracted.title], <b>dc.Title:</b> [oaiextracted.title]<br/>} {If}{[oaiextracted.type], <b>dc.Type:</b> [oaiextracted.type]<br/>} {If}{[oaiextracted.date], <b>dc.Date:</b> [oaiextracted.date]<br/>} {If}{[oaiextracted.koharecordlink], <a href=\"[oaiextracted.koharecordlink]\">Koha Record</a><br/>} <br/> <b>Extracted Metadata</b> <hr width=\"100%\"/> {If}{[Title], <b>Title:</b> [Title]<br/>} {If}{[Date], <b>Publication Date:</b> [Date]<br/>} {If}{[NumPages], <b>No. of Pages:</b> [NumPages]<br/>} {If}{[FileFormat], <b>File Format:</b> [FileFormat]<br/>} {If}{[ImageWidth], <b>Image Width:</b> [ImageWidth]<br/>} {If}{[ImageHeight], <b>Image Height:</b> [ImageHeight]<br/>} <br/> <b>Source</b> <hr width=\"100%\"/> {Or}{[screenicon],[Text]}
DocumentImages
true
NOTE: Koha OAI metadata is extracted and stored as "oaiextracted.metadata_name", these metadata can be used in the format statement as [oaiextracted.type]
Koha code
<li> <strong>Description:</strong> <!-- TMPL_IF name="pages" --> <!-- /TMPL_IF --><!-- TMPL_VAR name="pages" --> <!-- TMPL_IF NAME="illus" --><!-- TMPL_VAR NAME="illus" --><!-- /TMPL_IF --> <!-- TMPL_IF name="size" --><!-- TMPL_VAR name="size" --><!-- /TMPL_IF --> </li>
Modified Koha code
<li> <strong>Description:</strong> <!-- TMPL_IF name="pages" --> <!-- /TMPL_IF --><!-- TMPL_VAR name="pages" --> <!-- TMPL_IF NAME="illus" --><!-- TMPL_VAR NAME="illus" --><!-- /TMPL_IF --> <!-- TMPL_IF name="size" --><!-- TMPL_VAR name="size" --><!-- /TMPL_IF --> </li> <li> <strong>Greenstone Link:</strong> <a href="http://[HTTP Path to your Greenstone library CGI]?a=d&c=kohaoai&d=KOHA-OAI- TEST:<!-- TMPL_VAR NAME="biblionumber" -->" target="_blank"> here </a> </li>
Note: *“c=kohaoai” is the Greenstone collection shortname *“d=KOHA-OAI-TEST:<!-- TMPL_VAR NAME="biblionumber" -->” is the dc.Record Identifier for this record