source: gsdl/trunk/runtime-src/src/oaiservr/oaiconfig.h@ 18859

Last change on this file since 18859 was 18859, checked in by kjdon, 12 years ago

added new field to collection - baseDocRoot. Equivalent to _httpprefix_ but oaiserver doesn't use macros. Used to find location of oai2.xsl - stylesheet to pretty display responses

  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1#ifndef _OAICONFIG_H_
2#define _OAICONFIG_H_
3
4#include "cnfgable.h"
5
6#include <map>
7
8// TODO: sort out the members of oaicollectconfig as private/public and add
9// corresponding set/get functions
10
11class oaicollectconfig {
12 public:
13 oaicollectconfig(const text_t &collectname) { this->collection = collectname; }
14 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
19 text_tmap fieldMap; // maps from OAI name to GSDL name
20};
21
22typedef map<text_t, oaicollectconfig *, lttext_t> oaicollectmap;
23
24class oaiconfig : configurable {
25 public:
26 oaiconfig();
27 oaiconfig(text_t &gsdlhome, text_t &gsdlcollect);
28 ~oaiconfig();
29 virtual void configure(const text_t &key, const text_tarray &cfgline);
30 text_t getCollectionConfig(const text_t &collection, const text_t &field);
31 text_tarray & getCollectionsList() { return this->collectList; }
32 text_t getMapping(const text_t &collection, const text_t &collectfield);
33 text_t getMapping(const text_t &collection, const text_t &collectfield, const text_t &format);
34 text_tmap * getInformation() { return &this->infoMap; }
35 int getOAIVersion();
36 int resumeAfter();
37 private:
38 void configureCollection(const text_t &gsdlhome, const text_t &collection);
39
40 text_tarray collectList; // The list of collections to be taken in hand
41 text_tmap infoMap; // Holds the information to be given in the case
42 // of an OAI identify request
43 oaicollectmap collectMap; // The configuration of collections
44 text_t collection; // Used to track which collection is being configured
45 text_t oaiVersion; // The version of OAI running
46 int resumptionSize; // The number of items to produce before spitting out a
47 // resumptionToken
48
49};
50#endif
Note: See TracBrowser for help on using the repository browser.