- Timestamp:
- 2009-09-18T11:14:42+12:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/runtime-src/src/oaiservr/listsetsaction.cpp
r20590 r20626 89 89 this->setsOutput = 0; 90 90 91 text_t collection = "";91 text_t position = ""; 92 92 93 93 // Process the resumptionToken if there is one … … 95 95 { 96 96 ResumptionToken resumption_token(params["resumptionToken"]); 97 collection = resumption_token.getSet();97 position = resumption_token.getPosition(); 98 98 } 99 99 … … 105 105 } 106 106 107 // Get the current collection from the position value 108 text_t collection_name = ""; 109 oaiclassifier::toGSDL(collection_name, position); 110 107 111 // Find the starting collection 108 112 text_tarray::iterator collection_iterator = collections.begin(); 109 113 while (collection_iterator != collections.end()) 110 114 { 111 if (collection == "" || collection== *collection_iterator)115 if (collection_name == "" || collection_name == *collection_iterator) 112 116 { 113 117 break; … … 120 124 while (collection_iterator != collections.end()) 121 125 { 122 collection = (*collection_iterator);126 collection_name = (*collection_iterator); 123 127 124 128 // If we've output the desired number of records return a resumptionToken and we're done 125 129 if (this->setsOutput == this->configuration->resumeAfter()) 126 130 { 127 // Get the buildDate from the build.cfg file 128 ColInfoResponse_t cinfo; 129 comerror_t err; 130 protocol->get_collectinfo(collection, cinfo, err, cerr); 131 132 ResumptionToken resumption_token(cinfo.buildDate, collection, "", "", "", ""); 131 ResumptionToken resumption_token("", "", "", "", "", collection_name); 133 132 134 133 // Don't add any whitespace around the resumption token as it can confuse harvesters/validators … … 138 137 139 138 // If output_content_for_col() returns false a resumption token has been output, so it's time to stop 140 if (output_content_for_col(output, protocol, params, collection ) == false)139 if (output_content_for_col(output, protocol, params, collection_name) == false) 141 140 { 142 141 return true; … … 173 172 while (set_iterator != sets_response.docInfo.end()) 174 173 { 175 if (position == "" || position == ( *set_iterator).OID)174 if (position == "" || position == (collection + ":" + (*set_iterator).OID)) 176 175 { 177 176 break; … … 183 182 184 183 // Output the collection as a set 185 if (position == "" )184 if (position == "" || position == collection) 186 185 { 187 186 output << " <set>" << endl; … … 209 208 if (this->setsOutput == this->configuration->resumeAfter()) 210 209 { 211 // Get the buildDate from the build.cfg file 212 ColInfoResponse_t cinfo; 213 comerror_t err; 214 protocol->get_collectinfo(collection, cinfo, err, cerr); 215 216 ResumptionToken resumption_token(cinfo.buildDate, collection, "", "", "", set); 210 ResumptionToken resumption_token("", "", "", "", "", collection + ":" + set); 217 211 218 212 // Don't add any whitespace around the resumption token as it can confuse harvesters/validators
Note:
See TracChangeset
for help on using the changeset viewer.