Changeset 22284

Show
Ignore:
Timestamp:
23.06.2010 13:49:55 (9 years ago)
Author:
kjdon
Message:

new toOID takes an extra arg, repos_id, so its generates ids like oai:repos-id:collname:doc-id. old version is still used for set spec ids which remain like demo:CL5. another method to extrac the collection name from a full id

Location:
main/trunk/greenstone2/runtime-src/src/oaiservr
Files:
2 modified

Legend:

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

    r22212 r22284  
    261261    this->repositoryName = cfgline[0]; 
    262262  } 
     263  else if (key == "repositoryId") { 
     264    this->repositoryId = cfgline[0]; 
     265  } 
     266  else if (key == "repositoryIdVersion") { 
     267    this->repositoryIdVersion = cfgline[0]; 
     268  } 
    263269  else if (key == "baseURL") { 
    264270    this->baseURL = cfgline[0]; 
     
    270276    this->baseDocRoot = cfgline[0]; 
    271277  } 
     278  else if (key == "oaiversion") { 
     279    this->oaiVersion = cfgline[0]; 
     280  } 
    272281   
    273282} 
     
    334343  return this->repositoryName; 
    335344} 
     345text_t oaiconfig::getRepositoryId() 
     346{ 
     347  return this->repositoryId; 
     348} 
     349text_t oaiconfig::getRepositoryIdVersion() 
     350{ 
     351  return this->repositoryIdVersion; 
     352} 
    336353text_t oaiconfig::getMaintainer() 
    337354{ 
  • main/trunk/greenstone2/runtime-src/src/oaiservr/oaiconfig.h

    r22212 r22284  
    3636  text_t getBaseDocRoot(); 
    3737  text_t getRepositoryName(); 
     38  text_t getRepositoryId(); 
     39  text_t getRepositoryIdVersion(); 
    3840  text_t getMaintainer(); 
    3941 private: 
    4042  bool configureCollection(const text_t &gsdlhome, const text_t &collection); 
    4143   
    42   text_t    repositoryName; 
     44  text_t    repositoryName; // human readable name 
     45  text_t repositoryId; // unique (among oai servers) domain name or id for the repository 
     46  text_t repositoryIdVersion; // 1.1 or 2.0 for identifier scheme 
    4347  text_t    baseURL; // URL of oaiserver.cgi 
    4448  text_t    baseLibraryURL; // URL of library.cgi (used for urls to greenstone documents )