Changeset 31903 for main/trunk/greenstone2/runtime-src/src/colservr
- Timestamp:
- 2017-08-18T19:28:42+12:00 (7 years ago)
- Location:
- main/trunk/greenstone2/runtime-src/src/colservr
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/runtime-src/src/colservr/browsefilter.cpp
r31394 r31903 143 143 if(parentnode == "oai") { // doing an OAI listidentifiers request 144 144 145 // open up the oai-inf db , if it exists, and return all IDs146 // if itdoesn't exist, proceed as usual145 // open up the oai-inf db if it exists, and return all IDs *except* the special OID=OAI_EARLIESTTIMESTAMP_OID 146 // if oai-inf db doesn't exist, proceed as usual 147 147 success = get_oaiinf_db_entries(response, err, logout); //adds any stuff in oai-inf db for the current OID to resultdoc.metadata 148 148 … … 377 377 378 378 resultdoc.OID = (*key_here); 379 379 380 // OAI_EARLIESTTIMESTAMP_OID is the OID of a special record that we'll ignore 381 // here in browsefilter.cpp, since it's not a doc. 382 // When the *metadata* for this special OID is requested, source.cpp will handle it 383 if(resultdoc.OID == OAI_EARLIESTTIMESTAMP_OID) { 384 ++key_here; 385 continue; 386 } 387 380 388 if(!oaidb_ptr->getinfo(resultdoc.OID, oai_info)) { 381 389 logout << text_t2ascii -
main/trunk/greenstone2/runtime-src/src/colservr/collectserver.cpp
r31387 r31903 535 535 // first check for oai metadata from the oai_db, if asked for it (if FROAI is set) 536 536 if(((*source_here).s != NULL) && 537 request.filterResultOptions & FROAI&&537 (request.filterResultOptions & FROAI) && 538 538 ((*source_here).s->get_oai_metadata(request.requestParams, request.refParams, 539 539 request.getParents, request.fields, … … 546 546 } 547 547 548 // if OID is the special OAI specific OAI_EARLIESTTIMESTAMP_OID, 549 // then we'd have got its OAI meta above if we were requested to do so. 550 // Either way, we won't be additionally getting regular meta for this OID, 551 // as it's not a real doc OID, so we stop processing this OID here. 552 if((*resultdoc_here).OID == OAI_EARLIESTTIMESTAMP_OID) { 553 ++source_here; 554 if(processed == true) break; 555 else continue; 556 } 557 548 558 // We may or may not have got oai_meta (depends on if FROAI was set). 549 559 // If we didn't get oai_meta, then deleted_status would still be "". -
main/trunk/greenstone2/runtime-src/src/colservr/comtypes.h
r31387 r31903 48 48 #endif 49 49 50 51 const text_t OAI_EARLIESTTIMESTAMP_OID = "earliesttimestamp"; 52 // https://www.tutorialspoint.com/cplusplus/cpp_constants_literals.htm 50 53 51 54 enum comerror_t {noError, authenticationFailure, protocolError, … … 113 116 text_tmap dynamic_classifiers; 114 117 text_t earliestDatestamp; // For OAIserver validation. Time since linux Epoch, expressed as (long) integer value in string form 118 // This field stored the builddate value from a collection's index/build.cfg file. 119 // This field earliestDatestamp was used when oaiaction.calcEarliestDatestamp() needed to 120 // determine the earliest timestamp of the repository, by selecting the earliestDatestamp among 121 // all oai collections. Now it's no longer used by OAI, as that resorts to consulting oai-inf.db 122 // of each collection, which has a collection's earliest timestamp stored, to work out the 123 // earliest timestamp among all collections. But the build.cfg builddate stored in the 124 // earliestDatestamp field may still be useful in future for some purpose, so leaving it alone. 125 115 126 }; 116 127
Note:
See TracChangeset
for help on using the changeset viewer.