Ignore:
Timestamp:
06/23/10 13:58:54 (10 years ago)
Author:
kjdon
Message:

ids are now like oai:repos-id:collection:doc

Location:
main/trunk/greenstone2/runtime-src/src/oaiservr
Files:
3 edited

Legend:

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

    r16718 r22289  
    210210  text_t           lastModified;
    211211  int              oaiVersion = this->configuration->getOAIVersion();
    212 
     212  text_t repos_id = this->configuration->getRepositoryId();
    213213  get_info(OID, collection, "", metadata, false, protocol, response, logout);
    214214  doc_info = response.docInfo[0];
     
    217217  // output the record for this document
    218218  text_t oaiLabel = OID;
    219   oaiclassifier::toOAI(collection, oaiLabel);
     219  oaiclassifier::toOAI(repos_id, collection, oaiLabel);
    220220
    221221  if(oaiVersion <= 110)
  • main/trunk/greenstone2/runtime-src/src/oaiservr/oaiaction.cpp

    r22213 r22289  
    383383    output << "      <datestamp>"  << lastModified << "</datestamp>" << endl;
    384384   
    385     // copy the collection name off the front of oaiLabel
    386     text_t::const_iterator colon = findchar(oaiLabel.begin(), oaiLabel.end(), ':');
    387     text_t collection = substr(oaiLabel.begin(), colon);
    388    
     385    text_t collection_id;
     386    // Find the collection id from oai:repos-id:collection:doc
     387    oaiclassifier::getCollectionFromOAIID(oaiLabel, collection_id);
    389388    if(oaiVersion >= 200){
    390389      text_tarray::const_iterator member = memberOf.begin();
     
    392391
    393392      // As well as all the subsets that a doc appears in, it is also a member of the 'collection' set
    394       output << "      <setSpec>" << collection << "</setSpec>" << endl;
     393      output << "      <setSpec>" << collection_id << "</setSpec>" << endl;
    395394      while (member != memEnd) {
    396395    text_t oaiSet = *member;
    397     oaiclassifier::toOAI(collection, oaiSet);
     396    oaiclassifier::toOAI(collection_id, oaiSet);
    398397    output << "      <setSpec>" << oaiSet << "</setSpec>" << endl;
    399398    ++member;
  • main/trunk/greenstone2/runtime-src/src/oaiservr/recordaction.cpp

    r20589 r22289  
    197197  if (this->errorType != "idDoesNotExist") {
    198198    text_t oaiLabel = OID;
    199     oaiclassifier::toOAI(collection, oaiLabel); // Concatenates HASH id to collection, which OAI needs
     199    oaiclassifier::toOAI(this->configuration->getRepositoryId(), collection, oaiLabel); // Concatenates HASH id to collection, which OAI needs
    200200   
    201201    // output a record
Note: See TracChangeset for help on using the changeset viewer.