#ifndef _OAICONFIG_H_ #define _OAICONFIG_H_ #include "cnfgable.h" #include // TODO: sort out the members of oaicollectconfig as private/public and add // corresponding set/get functions class oaicollectconfig { public: oaicollectconfig(const text_t &collectname) { this->collection = collectname; } text_t collection; text_t maintainer; text_t repositoryName; text_t baseURL; // URL of oaiserver.cgi text_t baseDocRoot; // Base URL for gsdl directory text_tmap fieldMap; // maps from OAI name to GSDL name }; typedef map oaicollectmap; class oaiconfig : configurable { public: oaiconfig(); oaiconfig(text_t &gsdlhome, text_t &gsdlcollect); ~oaiconfig(); virtual void configure(const text_t &key, const text_tarray &cfgline); text_t getCollectionConfig(const text_t &collection, const text_t &field); text_tarray & getCollectionsList() { return this->collectList; } text_t getMapping(const text_t &collection, const text_t &collectfield); text_t getMapping(const text_t &collection, const text_t &collectfield, const text_t &format); text_tmap * getInformation() { return &this->infoMap; } int getOAIVersion(); int resumeAfter(); private: void configureCollection(const text_t &gsdlhome, const text_t &collection); text_tarray collectList; // The list of collections to be taken in hand text_tmap infoMap; // Holds the information to be given in the case // of an OAI identify request oaicollectmap collectMap; // The configuration of collections text_t collection; // Used to track which collection is being configured text_t oaiVersion; // The version of OAI running int resumptionSize; // The number of items to produce before spitting out a // resumptionToken }; #endif