Ignore:
Timestamp:
2013-06-04T11:05:08+12:00 (11 years ago)
Author:
kjdon
Message:

implemented oaisupercollection. add to oai.cfg and the server will make a new set containing the specified collections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/oaiservr/listsetsaction.cpp

    r22739 r27528  
    131131  }
    132132
     133  // if no resumption token, output the super colls. Otherwise, start from
     134  // the collection list correct position.
     135  // Assume for now that super coll list is always in the first list
     136  text_t set_name ="";
     137  if (position == "") {
     138    text_tarray& supercolls = this->configuration->getSuperCollectionsList();
     139    if (collections.size() != 0) {
     140      text_tarray::iterator supercoll_iterator = supercolls.begin();
     141      while (supercoll_iterator != supercolls.end()) {
     142    set_name = (*supercoll_iterator);
     143    output_content_for_supercol(output, set_name);
     144    supercoll_iterator++;
     145      }
     146    }
     147  }
    133148  // Get the current collection from the position value
    134149  text_t collection_name = "";
     
    173188  return true;
    174189}
     190
     191bool listsetsaction::output_content_for_supercol(ostream &output, text_t supercoll) {
     192    utf8outconvertclass utf8convert;
     193    output << utf8convert << "  <set>\n";
     194    output << utf8convert << "    <setSpec>" << supercoll << "</setSpec>\n";
     195    if (this->configuration->getSetName(supercoll) != "")
     196    {
     197      output << utf8convert << "    <setName>" << this->configuration->getSetName(supercoll) << "</setName>\n";
     198    }
     199    else
     200    {
     201      output << utf8convert << "    <setName>" << supercoll << "</setName>\n";
     202    }
     203    if (this->configuration->getSetDescription(supercoll) != "")
     204    {
     205      output << utf8convert << "    <setDescription>" << this->configuration->getSetDescription(supercoll) << "</setDescription>\n";
     206    }
     207    output << utf8convert << "  </set>\n";
     208    this->setsOutput++;
     209}
     210 
     211
    175212
    176213
Note: See TracChangeset for help on using the changeset viewer.