source: trunk/gsdl/src/colservr/mggdbmsource.h@ 1322

Last change on this file since 1322 was 1322, checked in by kjm18, 24 years ago

now uses the base searchclass rather than mgsearchclass

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
RevLine 
[234]1/**********************************************************************
2 *
3 * mggdbmsource.h --
4 * Copyright (C) 1999 The New Zealand Digital Library Project
5 *
[534]6 * A component of the Greenstone digital library software
7 * from the New Zealand Digital Library Project at the
8 * University of Waikato, New Zealand.
[234]9 *
[534]10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 *
[234]24 *********************************************************************/
25
26
27#ifndef MGGDBMSOURCE_H
28#define MGGDBMSOURCE_H
29
[236]30#include "gsdlconf.h"
31#include "text_t.h"
32#include "comtypes.h"
33#include "infodbclass.h"
34#include "maptools.h"
[1322]35#include "search.h"
[236]36#include "source.h"
[234]37
38
[236]39class mggdbmsourceclass : public sourceclass {
40protected:
41 text_t gsdlhome;
[803]42 text_t gdbmhome;
[236]43 text_t collection;
44 text_t collectdir;
[234]45
[312]46 // these maps are only needed to convert the default indexes
47 stringmap indexmap;
48 stringmap subcollectionmap;
49 stringmap languagemap;
50
51 text_t defaultindex;
52 text_t defaultsubcollection;
53 text_t defaultlanguage;
54
[249]55 text_t parentOID;
56 infodbclass parentinfo;
57 text_tarray parentcontents;
58
[236]59 text_t gdbm_filename;
60 gdbmclass *gdbmptr;
61
[1322]62 searchclass *mgsearchptr;
[236]63
64public:
65 mggdbmsourceclass ();
66 virtual ~mggdbmsourceclass ();
67
68 // the gdbmptr remains the responsability of the calling code
69 void set_gdbmptr (gdbmclass *thegdbmptr) {gdbmptr=thegdbmptr;}
70
71 // the mgsearchptr remains the responsability of the calling code
[1322]72 void set_mgsearchptr (searchclass *themgsearchptr) {mgsearchptr=themgsearchptr;}
[236]73
74 void configure (const text_t &key, const text_tarray &cfgline);
75 bool init (ostream &logout);
[249]76 bool translate_OID (const text_t &OIDin, text_t &OIDout,
77 comerror_t &err, ostream &logout);
[236]78 bool get_metadata (const text_t &requestParams, const text_t &refParams,
[650]79 bool getParents, const text_tset &fields,
80 const text_t &OID, MetadataInfo_tmap &metadata,
81 comerror_t &err, ostream &logout);
[259]82 bool get_document (const text_t &OID, text_t &doc,
83 comerror_t &err, ostream &logout);
[236]84};
85
86
87
[234]88#endif
Note: See TracBrowser for help on using the repository browser.