Show
Ignore:
Timestamp:
01.06.2011 19:12:33 (8 years ago)
Author:
ak19
Message:

Still on changes for OAIserver: oailastmodified date is now used instead of lastmodified, making it similar to GS3's more correct approach.

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

Legend:

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

    r22739 r24109  
    225225  get_top(oai_OID, document_OID); 
    226226 
    227   // Request the lastmodified value for this document 
     227  // Request the oailastmodified value for this document 
    228228  text_tset metadata; 
    229   metadata.insert("lastmodified"); 
     229  metadata.insert("oailastmodified"); 
    230230  metadata.insert("gs.OAIDateStamp"); 
    231231  FilterResponse_t response; 
  • main/trunk/greenstone2/runtime-src/src/oaiservr/oaiaction.cpp

    r24108 r24109  
    438438  while(current != end){ 
    439439    temp = current->first; 
    440     lc(temp); 
    441     if(temp == "gs.oaidatestamp"){ 
    442       // assume it is correct format 
    443       lastModified = current->second.values[0]; 
    444       if(lastModified != "") { 
    445             return; 
    446       } 
     440    lc(temp); // lowercased for string comparison below 
     441    if(temp == "gs.oaidatestamp" && current->second.values[0] != "") { // user specified a (non-empty) oaidatestamp as gs metadata 
     442        // assume it is correct format 
     443        lastModified = current->second.values[0]; 
     444        return; 
    447445    } 
    448446    else{  
    449       if (temp == "lastmodified" && lastModified == "" && current->second.values.size() >= 1) { 
     447      if (temp == "oailastmodified" && lastModified == "" && current->second.values.size() >= 1) { 
    450448    lastModified = current->second.values[0]; 
    451449    time_t raw_time = (time_t)lastModified.getint();