Ignore:
Timestamp:
2011-06-01T16:19:14+12:00 (13 years ago)
Author:
ak19
Message:

Preliminary changes that were needed to get the GS2 OAIserver validated again: 1. IDs were OAI-IDs that needed their OAI prefixes removed before we can do a look up in Greenstone for those IDs; 2. lastmodified date was never retrieved since gs.oaidatestamp was retrieved even when this was empty, and so retrieval of date ranges were failing. (To get their OAI server validated, users need to change etc\oai.cfg to set repositoryId and optionally repositoryName, and provide emails for the creator and maintainer fields in the collect.cfg files of those of their collections to be visible over OAI, and use the GSI app to allow external connections to get it validated.) With the current commit, GS2's OAIserver validates successfully against the official online validator, when the validator is given the full URL (containing full domain) to a running GS server's oaiserver.cgi page. In the next commits, will be using oailastmodified(date) and working out the earliestOAIDateStamp as GS3 has been made to do this now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/oaiservr/metaformatsaction.cpp

    r22739 r24108  
    8080  {
    8181    text_t identifier = params["identifier"];
     82   
     83    text_t oai_OID_prefix = "oai:"+this->configuration->getRepositoryId()+":";
     84    if(identifier.replace(oai_OID_prefix, "") <= 0) {
     85        this->errorType = "idDoesNotExist";
     86        // Only throw an error if we're using v2.0.
     87        if (this->configuration->getOAIVersion() >= 200) {
     88            return false;
     89        }
     90    }
    8291
    8392    // Extract the collection name from the identifier specification
     
    8695 
    8796    // Check a document with the specified identifier exists
    88     text_tset metadata;
     97    text_tset metadata;
     98   
    8999    if (!get_info(identifier, collection, "", metadata, false, protocol, this->gsdlResponse, *logout))
    90100    {
Note: See TracChangeset for help on using the changeset viewer.