source: main/trunk/greenstone2/runtime-src/src/colservr/collectset.h@ 21453

Last change on this file since 21453 was 21453, checked in by ak19, 14 years ago

Dr Bainbridge improved some code by adding the helper method collection_is_collect_group().

  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
RevLine 
[1860]1/************************************************************
2 *
3 * Collection set
4 *
5 ************************************************************/
6
7#ifndef COLLECTSET_H
8#define COLLECTSET_H
9
10#include "collectserver.h"
11#include "cnfgable.h"
[21324]12
13#ifdef ENABLE_MG
[2549]14#include "mgsearch.h"
[21324]15#endif
16#ifdef ENABLE_MGPP
[2549]17#include "mgppsearch.h"
[21324]18#endif
19#ifdef ENABLE_LUCENE
[8028]20#include "lucenesearch.h"
[21324]21#endif
[1860]22
23class collectset : public configurable
24{
25 protected:
26 collectservermapclass cservers;
[21324]27#ifdef ENABLE_MG
[2545]28 mgsearchclass *mgsearch;
[21324]29#endif
30#ifdef ENABLE_MGPP
[2545]31 mgppsearchclass *mgppsearch;
[21324]32#endif
33#ifdef ENABLE_LUCENE
[8028]34 lucenesearchclass *lucenesearch;
[21324]35#endif
36
[1860]37 int noofservers;
38 text_t httpdomain;
39 text_t httpprefix;
40
41 public:
[16310]42 collectset(text_t& gsdlhome, text_t& collecthome);
[17989]43
44 // this constructor is used by the Firefox Greenstone
45 collectset(text_t& httpprefix_arg);
46
[1886]47 // this constructor is used by the local library
[19365]48 collectset();
[1886]49
[1860]50 ~collectset();
51
52 // initialise the collections
53 bool init(ostream &logout);
54
55 // configure all the servers as supplied
56 void configure (const text_t &key, const text_tarray &cfgline);
57
58 // Add/remove collections
[16310]59 void add_all_collections (const text_t &gsdlhome, const text_t& collecthome);
[9028]60 void remove_all_collections ();
[15002]61
62 void remove_collection (const text_t &collection);
63 void remove_collection (const text_t &collection, ostream& logout);
[9028]64
65 void add_collection (const text_t &collection,
[16310]66 const text_t &gsdlhome,
67 const text_t& collecthome);
[1860]68
[15002]69 void add_collection_group(const text_t& collection,
[16310]70 const text_t& gsdlhome,
71 const text_t& collecthome);
[15002]72
[16310]73 void add_all_collection_groups (const text_t& gsdlhome,
74 const text_t& collecthome);
75
[1860]76 // return the total number of servers in the set
77 int size();
78
79 void getCollectionList(text_tarray &collist);
80
81 // return the component map
82 collectservermapclass servers();
83
84 // return an individual collection server
85 collectserver *getCollectServer(const text_t &collection)
86 {
87 return cservers.getcollectserver(collection);
88 }
[21453]89
90 protected:
91 bool collection_is_collect_group (const text_t& collect_dir);
[1860]92};
93
94#endif
Note: See TracBrowser for help on using the repository browser.