- Timestamp:
- 2011-08-16T17:52:13+12:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/runtime-src/src/oaiservr/listrecsaction.cpp
r22739 r24412 156 156 this->errorType = "badArgument"; 157 157 return false; 158 } 158 } 159 159 } 160 160 … … 178 178 return false; 179 179 } 180 180 181 181 // Check the collection is one that is in the list in the oai.cfg file 182 182 text_tarray &collections = this->configuration->getCollectionsList(); … … 204 204 return false; 205 205 } 206 } 206 207 // check we're not requested to retrieve records of *this* set/coll 208 // from an earlier date than *this* set's earliestdatestamp 209 if (params["until"] != "") { 210 text_t eDatestamp = cinfo.earliestDatestamp; 211 time_t raw_time = (time_t)eDatestamp.getint(); 212 eDatestamp = this->parseDatestamp(raw_time); 213 214 // error if request is for records of an earlier date than this coll/set's earliestDatestamp 215 if(params["until"] < eDatestamp) { 216 this->errorType = "noRecordsMatch"; // for *this* set/coll of the repository 217 return false; 218 } 219 } 220 221 } else { // no set (collection) specified 222 if (params ["until"] != "") { // check we're not requested to retrieve records of an earlier 223 // date than the earliestdatestamp across all collections/sets 224 // John Thompson advises not to do lazy evaluation of earliestDatestamp here, because 225 // reading x number of build.cfg files for x number of collections to work out the 226 // earliestDatestamp among them is not too expensive an operation, but we do want the OAI 227 // Server to give accurate results when queried, as that's specified by the OAI protocol. 228 //if(this->mEarliestDatestamp == "") { 229 text_t eDatestamp = this->calcEarliestDatestamp(protocol, params); 230 //} 231 232 if(params["until"] < eDatestamp) { // request is for records of an earlier date than earliestDatestamp 233 this->errorType = "noRecordsMatch"; 234 return false; 235 } 236 } 237 } 207 238 208 239 // If we've reached here everything must be fine
Note:
See TracChangeset
for help on using the changeset viewer.