Re: [greenstone-users] Activation of the OAI Greenstone Server

From xiao
DateFri, 6 Jul 2007 14:19:38 +1200
Subject Re: [greenstone-users] Activation of the OAI Greenstone Server
In-Reply-To (003701c7b7b8$8550a9b0$4a85ce82-uibbdbf71638a5)
Hi Eduardo,

To fix the problem, you can either wait for our next release (in a few weeks or so), or do the following:

1. download the attached files and replace the files with the same names in the directory $GSDLHOME/src/oaiservr/.
2. in the directory /oaiservr, type
    make
    cp oaiserver ../../cgi-bin
3. put the following line somewhere in the file oai.cfg
    baseURL " http://ibdigital.uib.es/gsdl/cgi-bin/oaiserver"

Regards
xiao

On 6/26/07, Eduardo del Valle < eduard.delvalle@uib.es> wrote:

Dear Xiao

 

We are using Greenstone 2.72. The platform is a Node Virtual Dell running Linnux Suse Enterprise.

 

Thank you for you help.

 

Best regards

Eduardo

 


De: xiao [mailto:xiaofyu@gmail.com]
Enviado el: martes, 26 de junio de 2007 7:31
Para: Eduardo del Valle
CC: greenstone-users@list.scms.waikato.ac.nz
Asunto: Re: [greenstone-users] Activation of the OAI Greenstone Server

 

Hello Eduardo,

The problem unfortunately cannot be solved by simply editing the oai.cfg configuration file.

If you type the following request into a web browser:
http://ibdigital.uib.es/gsdl/cgi-bin/oaiserver?verb=Identify, you'll get a reponse containing the following excert:

...
<request verb="Identify">/oaimain</request>
<Identify>
<repositoryName>Biblioteca Digital Cient?ca de les Illes Balears</repositoryName>
<baseURL>/oaimain</baseURL>
<adminEmail>eduard.delvalle@uib.es</adminEmail>
<protocolVersion>2.0</protocolVersion>
<earliestDatestamp>1970-01-01</earliestDatestamp>
...

As you can see the text in the request and baseURL elements is /oaimain, which in fact should be http://ibdigital.uib.es/gsdl/cgi-bin/oaiserver corresponding to your site.

This is a bug and we are working on it. In the meantime, please let us know the version of Greenstone that you're using, and your computer platform.

Regrads
xiao




On 6/25/07, Eduardo del Valle <eduard.delvalle@uib.es > wrote:

Hello to everybody

 

I work at the University of Balearic Islands in Spain.

A few months ago we published a greenstone based digital library accessible at

 

http://ibdigital.uib.es/

 

 

Now I'm trying to activate the Greenstone OAI server. I have been 

working on the oai.cfg file in the etc directory that you can read at the end of this email.

 

The problem is that when I have tryed to validate our baseURL: 

http://ibdigital.uib.es/gsdl/cgi-bin/oaiserver

 

using the test of the Open Archives Initiative - Data Provider Registration 

( http://www.openarchives.org/data/registerasprovider.html) I get this 

message:

 

---------------------------------------------------

Checking Identify response

Request: GET http://ibdigital.uib.es/gsdl/cgi-bin/oaiserver?verb=Identify

 

Administrator email address eduard.delvalle@uib.es

 

[PASS] Correctly reports OAI-PMH protocol version 2.0

 

[FAIL] baseURL supplied &apos;http://ibdigital.uib.es/gsdl/cgi-bin/oaiserver&apos; does not 

match the baseURL in the Identify response &apos;/oaimain&apos;. The 

baseURL you enter must EXACTLY match the baseURL returned in the 

Identify response. It must match in case ( http://Wibble.org/ does not 

match http://wibble.org/) and include any trailing slashes etc.

 

[PASS] Datestamp granularity is &apos;days&apos;

 

[PASS] earliestDatestamp is 1970-01-01

----------------------------------------------------

 

How can I correct this problem? Is it a mistake in the configuration of the oai.cfg file?

 

Where can I get the different configuration options for the oai.cfg so 

that I can correct myself the errors reported in future tests?

 

Thank you very much for your kind support.

 

This is the text of my oai.cfg file:

 

*********************************************************************

# OAI Server Configuration

 

# This is the main configuration file for configuring your Greenstone oai server.

# The server is a cgi program called oaiserver (oaiserver.exe on Windows).

# Some basic commands that you can send it are:

# ....cgi-bin/oaiserver?verb=Identify

# ....cgi-bin/oaiserver?verb=ListSets

# ....cgi-bin/oaiserver?verb=ListIdentifiers&set=xxx (1.1 only)

# ....cgi-bin/oaiserver?verb=ListIdentifiers&set=xxx&metadataPrefix=oai_dc (2.0 only)

# ....cgi-bin/oaiserver?verb=ListRecords&set=xxx&metadataPrefix=oai_dc

# ....cgi-bin/oaiserver?verb=GetRecord&identifier=xxx&metadataPrefix=oai_dc

 

#The List verbs (ListSets, ListIdentifiers, ListRecords) all return a

#sequence of items. The 'resumeafter' paramter below indicates how many

#records to return - if this number is less than the number matching the

#request, then a resumption token is returned. To use this to get the

#next set of documents, you need to issue the same request again, with

#an additional parameter: resumptionToken=xxx

#For example,

# ....cgi-bin/oaiserver?verb=ListRecords&set=demo&metadataPrefix=oai_dc&resumptionToken=gsdloai:demo,,11-

 

# For more information about the OAI-PMH protocol, see

# http://www.openarchives.org/

 

# Strings containing spaces should be enclosed in double quotes ""

 

# The OAI repository name - human readable

repositoryName "Biblioteca Digital Científica de les Illes Balears"

 

# The central administrative email address for the repository.

maintainer  "eduard.delvalle@uib.es "

 

# Which version of OAI the repository supports, 1.1 or 2.0

# (The server supports both)

oaiversion "2.0"

 

# How many records to output before needing a resumption token

# A value of -1 will return all records for a request

resumeafter  -1

 

# Other free text items describing the repository. There is no restriction

# on the number of items, or item names

# The format is like the following:

# oaiinfo "item name" "item value"

# Examples may include sponsor, purpose, size...

oaiinfo "Content" "The Scientific Digital Library of the Balearic Islands is developed by the University of Balearic Islands. It provides open access to

research and cultural documentation produced at this university and in the Balearic Islands. Content includes electronic theses and scientific articles, and

also the results of digitisation projects: images, maps, rare books and manuscripts. It uses Greenstone Digital Library Software."

 

# A list of collections that should be made available to OAI clients. By

# default, collections are not available.

# There can be more than one line: each line must start with oaicollection,

# and this is followed by one or more collection names. The collection name

# is the name of the collection's folder in the collect directory.

oaicollection llevant mayurqa mayurqaVolums parcelariManacor dadesBalearsVolums

oaicollection llibresConsellsCampos memoriesUIB territoris territorisVolums

oaicollection laboratoriLitiasiRenal lliconsUIB parcelariCapdepera tesisUIB

 

# Metadata mapping information. At present, Greenstone's OAI server only

# supports the Dublin Core metadata format. Metadata in other formats must

# be mapped to Dublin Core. This can be done in this file, or for a

# particular collection, in its collect.cfg file.

 

# The format is like

# oaimapping <greenstone fieldname> <oaifieldname>

 

# As Greenstone's OAI server only supports Dublin Core, the oai fieldnames

# should be like dc.Title, dc.Subject etc.

# The Greenstone field names can be unqualified (Title, Subject) or

# qualified by a namespace (dc.Title, dls.Subject). These mapping rules

# will apply to the entire repository. Collection specific rules can also

# be specified in this file using a collection name qualifier. This is

# the collection name followed by a colon (demo:Title, demo:dls.Title).

# Mappings specified in a collect.cfg file do not need the collection

# qualifier.

 

# Details about the Dublin Core metadata format can be found at

# http://dublincore.org/

# Elements include Title, Creator, Subject, Description, Publisher,

# Contributor, Date, Type, Format, Identifier, Source, Language,

# Relation, Coverage, Rights

 

# mappings for the demo collection

oaimapping demo:dls.Title dc.Title

oaimapping demo:dls.Subject dc.Subject

oaimapping demo:dls.Language dc.Language

oaimapping demo:dls.Organization dc.Publisher

 

# mappings for the llevant collection

oaimapping llevant:dls.Title dc.Title

 

# mappings for the mayurqa collection

oaimapping mayurqa:dls.Catalan_subject dc.Subject

 

# mappings for the mayurqaVolums collection

oaimapping mayurqaVolums:dls.Revista dc.Title

 

# mappings for the dadesBalearsVolums collection

oaimapping dadesBalearsVolums:dls.Revista dc.Title

 

# mappings for the memoriesUIB collection

oaimapping memoriesUIB:dls.Subject dc.Subject

 

# mappings for the territoris collection

oaimapping territoris:dls.Catalan_subject dc.Subject

 

# mappings for the territorisVolums collection

oaimapping territorisVolums:dls.Revista dc.Title

 

# mappings for the tesisUIB collection

oaimapping tesisUIB:dls.Subject dc.Subject

 

*************************************************************************************************************

 

 

 

Eduardo del Valle

University of Balearic Islands

 

--------------------------------------------------------------------


_______________________________________________
greenstone-users mailing list
greenstone-users@list.scms.waikato.ac.nz
https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users




--
Greenstone Digital Library
New Zealand




--
Greenstone Digital Library
New Zealand


<<attachment>>
Type:
Filename: identityaction.cpp; charset=ANSI_X3.4-1968

download


<<attachment>>
Type:
Filename: oaiaction.cpp; charset=ANSI_X3.4-1968

download


<<attachment>>
Type:
Filename: oaiconfig.cpp; charset=ANSI_X3.4-1968

download


<<attachment>>
Type: text/x-chdr
Filename: oaiconfig.h; charset=ANSI_X3.4-1968

#ifndef _OAICONFIG_H_
#define _OAICONFIG_H_

#include "cnfgable.h"

#include <map>

// TODO: sort out the members of oaicollectconfig as private/public and add
// corresponding set/get functions

class oaicollectconfig {
public:
oaicollectconfig(const text_t &collectname) { this->collection = collectname; }
text_t collection;
text_t maintainer;
text_t repositoryName;
text_t baseURL;
text_tmap fieldMap; // maps from OAI name to GSDL name
};

typedef map<text_t, oaicollectconfig *, lttext_t> oaicollectmap;

class oaiconfig : configurable {
public:
oaiconfig();
oaiconfig(text_t &gsdlhome, text_t &gsdlcollect);
~oaiconfig();
virtual void configure(const text_t &key, const text_tarray &cfgline);
text_t getCollectionConfig(const text_t &collection, const text_t &field);
text_tarray & getCollectionsList() { return this->collectList; }
text_t getMapping(const text_t &collection, const text_t &collectfield);
text_t getMapping(const text_t &collection, const text_t &collectfield, const text_t &format);
text_tmap * getInformation() { return &this->infoMap; }
int getOAIVersion();
int resumeAfter();
private:
void configureCollection(const text_t &gsdlhome, const text_t &collection);

text_tarray collectList; // The list of collections to be taken in hand
text_tmap infoMap; // Holds the information to be given in the case
// of an OAI identify request
oaicollectmap collectMap; // The configuration of collections
text_t collection; // Used to track which collection is being configured
text_t oaiVersion; // The version of OAI running
int resumptionSize; // The number of items to produce before spitting out a
// resumptionToken
};
#endif