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

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

Collections can now be put in to "groups" i.e. can be located inside another collection, which is marked as "collectgroup" true. The top-level collection appears on the home page, and when clicked upon display a new "home page" with only the collections appearing within its folder displayed. To implement this, the main change is in collectset.cpp, which now runs "add_all_collection_groups" after it has added all the top-level collections. comtypes.h has been updated to include the new field, "isCollectGroup". Finally, pageaction.cpp has been updated so these changes are reflected in the home page generated.

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