Changeset 24108
- Timestamp:
- 2011-06-01T16:19:14+12:00 (13 years ago)
- Location:
- main/trunk/greenstone2/runtime-src/src/oaiservr
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/runtime-src/src/oaiservr/metaformatsaction.cpp
r22739 r24108 80 80 { 81 81 text_t identifier = params["identifier"]; 82 83 text_t oai_OID_prefix = "oai:"+this->configuration->getRepositoryId()+":"; 84 if(identifier.replace(oai_OID_prefix, "") <= 0) { 85 this->errorType = "idDoesNotExist"; 86 // Only throw an error if we're using v2.0. 87 if (this->configuration->getOAIVersion() >= 200) { 88 return false; 89 } 90 } 82 91 83 92 // Extract the collection name from the identifier specification … … 86 95 87 96 // Check a document with the specified identifier exists 88 text_tset metadata; 97 text_tset metadata; 98 89 99 if (!get_info(identifier, collection, "", metadata, false, protocol, this->gsdlResponse, *logout)) 90 100 { -
main/trunk/greenstone2/runtime-src/src/oaiservr/oaiaction.cpp
r23234 r24108 442 442 // assume it is correct format 443 443 lastModified = current->second.values[0]; 444 return; 444 if(lastModified != "") { 445 return; 446 } 445 447 } 446 448 else{ -
main/trunk/greenstone2/runtime-src/src/oaiservr/recordaction.cpp
r22739 r24108 132 132 } 133 133 134 // before checking the specified identifier exists, need to extract the greenstone OID from it 135 text_t oai_OID_prefix = "oai:"+this->configuration->getRepositoryId()+":"; 136 if(identifier.replace(oai_OID_prefix, "") <= 0) { 137 this->errorType = "idDoesNotExist"; 138 // Only throw an error if we're using v2.0. 139 if (this->configuration->getOAIVersion() >= 200) { 140 return false; 141 } 142 } 143 134 144 // Extract the collection name from the identifier specification 135 145 text_t collection = ""; … … 165 175 text_t gsdlCollect; 166 176 177 /* 178 text_t oai_coll_OID_prefix = "oai:"+this->configuration->getRepositoryId()+":"+collection+":"; 179 if(gsdlId.replace(oai_coll_OID_prefix, "") <= 0) { 180 this->errorType = "idDoesNotExist"; 181 // Only throw an error if we're using v2.0. 182 if (this->configuration->getOAIVersion() >= 200) { 183 return false; 184 } 185 } 186 */ 187 167 188 // convert record identifier into GSDL format from OAI 168 189 oaiclassifier::toGSDL(gsdlCollect, gsdlId); … … 181 202 text_tset metadata; 182 203 ofstream logout("oai.log", ios::app); 183 204 184 205 // get the document information 185 206 if (!get_info(OID, collection, "", metadata, false, protocol, this->gsdlResponse, logout)) {
Note:
See TracChangeset
for help on using the changeset viewer.