Changeset 11311
- Timestamp:
- 2006-03-08T14:27:44+13:00 (18 years ago)
- Location:
- trunk/gsdl/src/oaiservr
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/oaiservr/abstractlistaction.cpp
r9608 r11311 197 197 } 198 198 199 // Check that the item with the HASHID 'gsdl_id' has a lastmodified field that fits within199 // Check that the item with the 0ID 'gsdl_id' has a lastmodified field that fits within 200 200 // the required date range (if specified). 201 201 if (this->inDateRange(params["from"], params["until"], gsdlCollect, gsdl_id, protocol, output)) { … … 354 354 text_t child = response.docInfo[c].OID; 355 355 356 // check for HASH items and exclude them 356 // distinguish classifiers and documents by checking whether OID 357 // starts with CL or not 357 358 text_t childHead; 358 359 text_t::const_iterator start = child.begin(); 359 360 text_t::const_iterator here = child.begin(); 360 here += 4;361 here += 2; 361 362 childHead = substr(start, here); 362 363 363 364 // documents we output now 364 if (childHead == "HASH") {365 // Check that the item with the HASHID 'gsdl_id' has a lastmodified field that fits365 if (childHead != "CL") { 366 // Check that the item with the 0ID 'gsdl_id' has a lastmodified field that fits 366 367 // within the required date range (if specified) 367 368 if (this->inDateRange(from, until, collection, child, protocol, output)) { … … 386 387 } 387 388 388 /* 389 bool listrecsaction::recurse_set(ostream &output, recptproto *protocol, const text_t &collection, const text_t &classifier, const text_t &metadataPrefix) 390 { 391 FilterResponse_t response; 392 text_tset metadata; 393 ofstream logout("oai.log", ios::app); 394 bool prevDocSeen = false; 395 396 get_children(classifier, collection, metadata, false, protocol, response, logout); 397 398 for (int c = 0; c < response.numDocs; ++c) { 399 text_t child = response.docInfo[c].OID; 400 401 // check for HASH items and exclude them 402 text_t childHead; 403 text_t::const_iterator start = child.begin(); 404 text_t::const_iterator here = child.begin(); 405 here += 4; 406 childHead = substr(start, here); 407 408 // documents we output now 409 if (childHead == "HASH") { 410 this->output_document(output, protocol, collection, child, metadataPrefix); 411 ++this->outputDocs; 412 prevDocSeen = true; 413 } 414 // children which are classifiers are recursed 415 else { 416 prevDocSeen = this->recurse_set(output, protocol, collection, child, metadataPrefix); 417 } 418 } 419 return prevDocSeen; 420 } 421 */ 422 423 424 425 389 390 391 -
trunk/gsdl/src/oaiservr/listsetsaction.cpp
r9608 r11311 61 61 // get all the children of the (relevant) classifier data structures 62 62 get_children(browseOID, gsdlCollect, "", metadata, false, protocol, response, logout); 63 64 63 // and send them to the "recurse_content" list 65 64 for (int c = 0; c < response.numDocs; ++c) { … … 85 84 // get the document information 86 85 if (!get_info(classifier, collection, "", metadata, false, protocol, response, logout)) { 87 // cerr << "Bad identifier or protocol " << classifier << endl;86 //cerr << "recurse content: Bad identifier or protocol " << classifier << endl; 88 87 return; 89 88 } … … 146 145 continue; 147 146 148 // check for HASHitems and exclude them147 // check for non classifier items and exclude them 149 148 text_t childHead; 150 149 text_t::const_iterator start = child.begin(); 151 150 text_t::const_iterator here = child.begin(); 152 here += 4;151 here += 2; 153 152 childHead = substr(start, here); 154 153 155 if (childHead == "HASH")154 if (childHead != "CL") 156 155 continue; 157 156 -
trunk/gsdl/src/oaiservr/metaformat.cpp
r10738 r11311 139 139 text_t::const_iterator start = OID.begin(); 140 140 text_t::const_iterator here = OID.begin(); 141 here += 4;141 here += 2; 142 142 childHead = substr(start, here); 143 143 144 144 // if it isn't a document, kill it now 145 if (childHead != "HASH") {145 if (childHead == "CL") { 146 146 // cerr << "Not a document" << endl; 147 147 return false; -
trunk/gsdl/src/oaiservr/recordaction.cpp
r9608 r11311 92 92 // get the document information 93 93 if (!get_info(OID, collection, "", metadata, false, protocol, this->gsdlResponse, logout)) { 94 94 95 this->errorType = "idDoesNotExist"; 95 96 … … 111 112 text_t::const_iterator start = OID.begin(); 112 113 text_t::const_iterator here = OID.begin(); 113 here += 4;114 here += 2; 114 115 childHead = substr(start, here); 115 116 116 117 // if it isn't a document, kill it now 117 if (childHead != "HASH") {118 if (childHead == "CL") { 118 119 cerr << "Not a document" << endl; 119 120 return false;
Note:
See TracChangeset
for help on using the changeset viewer.