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/oaiconfig.h

    r23233 r27528  
    3939  text_t    setDescription; // A display description for the set (collection)
    4040  text_tmap fieldMap;    // maps from OAI name to GSDL name
     41  text_tarray superCollectList; // a list of all super collections this belongs to
    4142};
    4243
    4344typedef map<text_t, oaicollectconfig *, lttext_t> oaicollectmap;
     45
     46class oaisupercollectconfig {
     47 public:
     48  oaisupercollectconfig(const text_t &supercollectionname) { this->supercollection = supercollectionname; }
     49  text_t supercollection;
     50  text_t setName; // A display name for the set (supercollection)
     51  text_t setDescription; // A display description for the set (supercollection)
     52  text_tarray collectionList; // a list of collections contained in this super collection
     53};
     54
     55typedef map<text_t, oaisupercollectconfig *, lttext_t> oaisupercollectmap;
     56
    4457
    4558class oaiconfig : configurable {
     
    5063  virtual void  configure(const text_t &key, const text_tarray &cfgline);
    5164  text_tarray & getCollectionsList() { return this->collectList; }
     65  text_tarray & getSuperCollectionsList() { return this->superCollectList; }
     66  text_tarray & getSuperCollectionCollections(const text_t super_coll) {
     67    return this->superCollectMap[super_coll]->collectionList;
     68  }
     69  text_tarray getSuperCollectionsForThisCollection(const text_t &collection);
    5270  text_tset & getMetadataSet() { return this->metadataSet; }
    5371  text_t        getMapping(const text_t &collection, const text_t &collectfield);
     
    86104  oaicollectmap collectMap; // The configuration of collections
    87105  text_t collection;        // Used to track which collection is being configured
    88  
     106  text_tarray superCollectList; //a list of super collections. may be empty
     107  oaisupercollectmap superCollectMap; // The configuration of the super collections
    89108};
    90109#endif
Note: See TracChangeset for help on using the changeset viewer.