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/abstractlistaction.cpp

    r24109 r27528  
    5555    position = resumption_token.getPosition();
    5656  }
    57 
    58   // Case for "set" argument present -- output just the records in the specified set
     57 
     58  // is it a super collection??
     59  bool is_super_collection = false;
     60 
    5961  if (set_name != "")
    6062  {
     63    text_tarray super_colls = this->configuration->getSuperCollectionsList();
     64    for (int s = 0; s<super_colls.size(); s++) {
     65      if (set_name == super_colls[s]) {
     66    is_super_collection = true;
     67    break;
     68      }
     69    }
     70  }
     71     
     72  // Case for "set" argument present that is not a super collection -- output just the records in the specified set
     73  if (set_name != "" && !is_super_collection) {
    6174    // Separate the collection name and Greenstone classifier OID from the set name
    6275    text_t collection_name = "";
     
    7285
    7386  // Case for no "set" argument present -- output all records in all collections
     87  // or we are a super collection
    7488  else
    7589  {
    7690    // Get a list of the collections available
    77     text_tarray& collections = this->configuration->getCollectionsList();
     91    text_tarray collections;
     92
     93    if (is_super_collection) {
     94      collections = this->configuration->getSuperCollectionCollections(set_name);
     95    } else {
     96      collections = this->configuration->getCollectionsList();
     97    }
    7898    if (collections.size() == 0)
    7999    {
     
    120140  return true;
    121141}
    122 
    123142
    124143bool abstractlistaction::output_content_for_set(ostream &output, recptproto *protocol, oaiargs &params, text_t collection_name, text_t gsdl_classifier_OID, text_t set_name)
Note: See TracChangeset for help on using the changeset viewer.