source: gsdl/trunk/runtime-src/src/colservr/collectset.h@ 19365

Last change on this file since 19365 was 19365, checked in by ak19, 15 years ago

Dr Bainbridge fixed the bug that crashed server.exe when there's no MG built collection: mgsearch (and mgppsearch and lucenesearch) pointers weren't initialised to NULL in the constructors, yet they were tested against being NULL and then used.

  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 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
30 // this constructor is used by the Firefox Greenstone
31 collectset(text_t& httpprefix_arg);
32
33 // this constructor is used by the local library
34 collectset();
35
36 ~collectset();
37
38 // initialise the collections
39 bool init(ostream &logout);
40
41 // configure all the servers as supplied
42 void configure (const text_t &key, const text_tarray &cfgline);
43
44 // Add/remove collections
45 void add_all_collections (const text_t &gsdlhome, const text_t& collecthome);
46 void remove_all_collections ();
47
48 void remove_collection (const text_t &collection);
49 void remove_collection (const text_t &collection, ostream& logout);
50
51 void add_collection (const text_t &collection,
52 const text_t &gsdlhome,
53 const text_t& collecthome);
54
55 void add_collection_group(const text_t& collection,
56 const text_t& gsdlhome,
57 const text_t& collecthome);
58
59 void add_all_collection_groups (const text_t& gsdlhome,
60 const text_t& collecthome);
61
62 // return the total number of servers in the set
63 int size();
64
65 void getCollectionList(text_tarray &collist);
66
67 // return the component map
68 collectservermapclass servers();
69
70 // return an individual collection server
71 collectserver *getCollectServer(const text_t &collection)
72 {
73 return cservers.getcollectserver(collection);
74 }
75};
76
77#endif
Note: See TracBrowser for help on using the repository browser.