source: gsdl/trunk/src/colservr/collectset.h@ 16310

Last change on this file since 16310 was 16310, checked in by davidb, 16 years ago

Introduction of 'collecthome' which parallels 'gsdlhome' to allow the toplevel collect folder to be outside of the gsdlhome area

  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
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"
12#include "mgsearch.h"
13#include "mgppsearch.h"
14#include "lucenesearch.h"
15
16class collectset : public configurable
17{
18 protected:
19 collectservermapclass cservers;
20 mgsearchclass *mgsearch;
21 mgppsearchclass *mgppsearch;
22 lucenesearchclass *lucenesearch;
23 int noofservers;
24 text_t httpdomain;
25 text_t httpprefix;
26
27 public:
28 collectset(text_t& gsdlhome, text_t& collecthome);
29 // this constructor is used by the local library
30 collectset() {}
31
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
41 void add_all_collections (const text_t &gsdlhome, const text_t& collecthome);
42 void remove_all_collections ();
43
44 void remove_collection (const text_t &collection);
45 void remove_collection (const text_t &collection, ostream& logout);
46
47 void add_collection (const text_t &collection,
48 const text_t &gsdlhome,
49 const text_t& collecthome);
50
51 void add_collection_group(const text_t& collection,
52 const text_t& gsdlhome,
53 const text_t& collecthome);
54
55 void add_all_collection_groups (const text_t& gsdlhome,
56 const text_t& collecthome);
57
58 // return the total number of servers in the set
59 int size();
60
61 void getCollectionList(text_tarray &collist);
62
63 // return the component map
64 collectservermapclass servers();
65
66 // return an individual collection server
67 collectserver *getCollectServer(const text_t &collection)
68 {
69 return cservers.getcollectserver(collection);
70 }
71};
72
73#endif
Note: See TracBrowser for help on using the repository browser.