[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"
|
---|
[2549] | 12 | #include "mgsearch.h"
|
---|
| 13 | #include "mgppsearch.h"
|
---|
[8028] | 14 | #include "lucenesearch.h"
|
---|
[1860] | 15 |
|
---|
| 16 | class collectset : public configurable
|
---|
| 17 | {
|
---|
| 18 | protected:
|
---|
| 19 | collectservermapclass cservers;
|
---|
[2545] | 20 | mgsearchclass *mgsearch;
|
---|
| 21 | mgppsearchclass *mgppsearch;
|
---|
[8028] | 22 | lucenesearchclass *lucenesearch;
|
---|
[1860] | 23 | int noofservers;
|
---|
| 24 | text_t httpdomain;
|
---|
| 25 | text_t httpprefix;
|
---|
| 26 |
|
---|
| 27 | public:
|
---|
| 28 | collectset(text_t &gsdlhome);
|
---|
[1886] | 29 | // this constructor is used by the local library
|
---|
| 30 | collectset() {}
|
---|
| 31 |
|
---|
[1860] | 32 | ~collectset();
|
---|
| 33 |
|
---|
| 34 | // initialise the collections
|
---|
| 35 | bool init(ostream &logout);
|
---|
| 36 |
|
---|
| 37 | // configure all the servers as supplied
|
---|
| 38 | void configure (const text_t &key, const text_tarray &cfgline);
|
---|
| 39 |
|
---|
| 40 | // Add/remove collections
|
---|
[9028] | 41 | void add_all_collections (const text_t &gsdlhome);
|
---|
| 42 | void remove_all_collections ();
|
---|
[15002] | 43 |
|
---|
| 44 | void remove_collection (const text_t &collection);
|
---|
| 45 | void remove_collection (const text_t &collection, ostream& logout);
|
---|
[9028] | 46 |
|
---|
| 47 | void add_collection (const text_t &collection,
|
---|
| 48 | const text_t &gsdlhome);
|
---|
[1860] | 49 |
|
---|
[15002] | 50 | void add_collection_group(const text_t& collection,
|
---|
| 51 | const text_t& gsdlhome);
|
---|
| 52 | void add_all_collection_groups (const text_t& gsdlhome);
|
---|
| 53 |
|
---|
[1860] | 54 | // return the total number of servers in the set
|
---|
| 55 | int size();
|
---|
| 56 |
|
---|
| 57 | void getCollectionList(text_tarray &collist);
|
---|
| 58 |
|
---|
| 59 | // return the component map
|
---|
| 60 | collectservermapclass servers();
|
---|
| 61 |
|
---|
| 62 | // return an individual collection server
|
---|
| 63 | collectserver *getCollectServer(const text_t &collection)
|
---|
| 64 | {
|
---|
| 65 | return cservers.getcollectserver(collection);
|
---|
| 66 | }
|
---|
| 67 | };
|
---|
| 68 |
|
---|
| 69 | #endif
|
---|