- Timestamp:
- 2017-02-08T18:31:18+13:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/runtime-src/src/oaiservr/recordaction.cpp
r24286 r31387 148 148 // Check a document with the specified identifier exists 149 149 text_tset metadata; 150 if (!get_ info(identifier, collection, "", metadata, false, protocol, this->gsdlResponse, *logout))150 if (!get_oai_info(identifier, collection, "", metadata, false, protocol, this->gsdlResponse, *logout)) 151 151 { 152 152 this->errorType = "idDoesNotExist"; … … 200 200 201 201 // get the document information 202 if (!get_ info(OID, collection, "", metadata, false, protocol, this->gsdlResponse, logout)) {202 if (!get_oai_info(OID, collection, "", metadata, false, protocol, this->gsdlResponse, logout)) { 203 203 204 204 this->errorType = "idDoesNotExist"; … … 208 208 return false; 209 209 } 210 } 211 else { 212 this->errorType = ""; 210 213 } 211 214 … … 232 235 ResultDocInfo_t doc_info = this->gsdlResponse.docInfo[0]; 233 236 text_t lastModified = ""; 237 text_t deleted_status = ""; 234 238 235 239 // Fills lastModified with the date from the document in doc_info, in the format YYYY-MM-DD 236 240 this->getLastModifiedDate(doc_info, lastModified); 241 this->getMeta(doc_info, "oaiinf.status", deleted_status); 237 242 238 243 // If the ID exists, output record for oai response (OAI v1.1) … … 246 251 247 252 // output header part of oai response 248 this->output_record_header(output, oaiLabel, lastModified, 253 this->output_record_header(output, oaiLabel, lastModified, deleted_status, 249 254 doc_info.metadata["memberof"].values, oaiVersion); 250 255 251 if (this->errorType != "cannotDisseminateFormat"){ 256 // only output <metadata /> section if record is not marked as deleted 257 if (this->errorType != "cannotDisseminateFormat" && deleted_status != "D") { 252 258 if (this->formatMap[metadataPrefix].get_class()->output_metadata(output, collection, doc_info)) { 253 259 // output 'about' part of oai response - we probably won't ever use this
Note:
See TracChangeset
for help on using the changeset viewer.