Changeset 16722


Ignore:
Timestamp:
2008-08-12T14:24:59+12:00 (13 years ago)
Author:
mdewsnip
Message:

Hacked around a problem with the metadataPrefix being undefined when a resumption token is used with ListRecords.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/runtime-src/src/oaiservr/abstractlistaction.cpp

    r16720 r16722  
    7676  protocol->get_collectinfo(gsdlCollect, cinfo, err, *this->logout);
    7777
     78  text_t metadataPrefix = params["metadataPrefix"];
     79
    7880  // check resumption token
    7981  if (params["resumptionToken"] != "") {
     
    8183    if (token.getCollection() == gsdlCollect) {
    8284      startDoc = token.getPosition() - 1; // first document is said to be 1..
     85      metadataPrefix = "oai_dc";  // TO DO: This should come from the resumption token
    8386    }
    8487  }
     
    111114      // the required date range (if specified).
    112115      if (this->inDateRange(params["from"], params["until"], gsdlCollect, gsdl_id, protocol, output)) {
    113     if (this->output_document(output, protocol, gsdlCollect, gsdl_id, params["metadataPrefix"])) {
     116    if (this->output_document(output, protocol, gsdlCollect, gsdl_id, metadataPrefix)) {
    114117      // this should be an IF statement, where prevDocSeen is only set to true if the above
    115118      // function call returns true (indicating that the doc supported the metadata prefix) but
Note: See TracChangeset for help on using the changeset viewer.