Ignore:
Timestamp:
2010-06-01T15:10:34+12:00 (14 years ago)
Author:
kjdon
Message:

tidied up the config classes. moved all the global params into oaiconfig instead of having them in the collection map. put setname and description into the collection map instead of having their own maps. Added methods to access baseURL etc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/oaiservr/oaiconfig.h

    r21455 r22212  
    66#include <map>
    77
    8 // TODO: sort out the members of oaicollectconfig as private/public and add
    9 //       corresponding set/get functions
    10 
    118class oaicollectconfig {
    129 public:
    1310  oaicollectconfig(const text_t &collectname) { this->collection = collectname; }
    1411  text_t    collection;
    15   text_t    maintainer;
    16   text_t    repositoryName;
    17   text_t    baseURL; // URL of oaiserver.cgi
    18   text_t    baseDocRoot; // Base URL for gsdl directory
     12  text_t    setName; // A display name for the set (collection)
     13  text_t    setDescription; // A display description for the set (collection)
    1914  text_tmap fieldMap;    // maps from OAI name to GSDL name
    2015};
     
    2823  virtual ~oaiconfig();
    2924  virtual void  configure(const text_t &key, const text_tarray &cfgline);
    30   text_t        getCollectionConfig(const text_t &collection, const text_t &field);
    3125  text_tarray & getCollectionsList() { return this->collectList; }
    3226  text_tset & getMetadataSet() { return this->metadataSet; }
     
    3630  text_t        getSetName(const text_t &setSpec);
    3731  text_t        getSetDescription(const text_t &setSpec);
    38   int           getOAIVersion();
    39   int           resumeAfter();
     32  int getOAIVersion();
     33  int resumeAfter();
     34  text_t getBaseURL();
     35  text_t getBaseLibraryURL();
     36  text_t getBaseDocRoot();
     37  text_t getRepositoryName();
     38  text_t getMaintainer();
    4039 private:
    4140  bool configureCollection(const text_t &gsdlhome, const text_t &collection);
    4241 
     42  text_t    repositoryName;
     43  text_t    baseURL; // URL of oaiserver.cgi
     44  text_t    baseLibraryURL; // URL of library.cgi (used for urls to greenstone documents )
     45  text_t    baseDocRoot; // Base URL for gsdl directory (used for urls to source documents )
     46  text_t    oaiVersion;        // The version of OAI running
     47  int       resumptionSize;    // The number of items to produce before spitting out a resumptionToken
     48  text_t    maintainer;
     49
    4350  text_tarray collectList;  // The list of collections to be taken in hand
    4451  text_tset metadataSet; // The list of metadata sets to be supported
    4552  text_tmap infoMap;        // Holds the information to be given in the case
    4653                            // of an OAI identify request
    47   text_tmap setNameMap;     // Holds user-defined names for the sets
    48   text_tmap setDescriptionMap;  // Holds user-defined descriptions for the sets
    4954  oaicollectmap collectMap; // The configuration of collections
    5055  text_t collection;        // Used to track which collection is being configured
    51   text_t oaiVersion;        // The version of OAI running
    52   int    resumptionSize;    // The number of items to produce before spitting out a
    53                             // resumptionToken
    5456 
    5557};
Note: See TracChangeset for help on using the changeset viewer.