source: main/tags/2.10/gsdl/src/colservr/mggdbmsource.h@ 32704

Last change on this file since 32704 was 650, checked in by sjboddie, 25 years ago
  • metadata now returns map rather than array
  • redesigned browsing support (although it's not finished so

won't currently work ;-)

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1/**********************************************************************
2 *
3 * mggdbmsource.h --
4 * Copyright (C) 1999 The New Zealand Digital Library Project
5 *
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.
9 *
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 *
24 * $Id: mggdbmsource.h 650 1999-10-10 08:20:37Z sjboddie $
25 *
26 *********************************************************************/
27
28
29#ifndef MGGDBMSOURCE_H
30#define MGGDBMSOURCE_H
31
32#include "gsdlconf.h"
33#include "text_t.h"
34#include "comtypes.h"
35#include "infodbclass.h"
36#include "maptools.h"
37#include "mgsearch.h"
38#include "source.h"
39
40
41class mggdbmsourceclass : public sourceclass {
42protected:
43 text_t gsdlhome;
44 text_t collection;
45 text_t collectdir;
46
47 // these maps are only needed to convert the default indexes
48 stringmap indexmap;
49 stringmap subcollectionmap;
50 stringmap languagemap;
51
52 text_t defaultindex;
53 text_t defaultsubcollection;
54 text_t defaultlanguage;
55
56 text_t parentOID;
57 infodbclass parentinfo;
58 text_tarray parentcontents;
59
60 text_t gdbm_filename;
61 gdbmclass *gdbmptr;
62
63 mgsearchclass *mgsearchptr;
64
65public:
66 mggdbmsourceclass ();
67 virtual ~mggdbmsourceclass ();
68
69 // the gdbmptr remains the responsability of the calling code
70 void set_gdbmptr (gdbmclass *thegdbmptr) {gdbmptr=thegdbmptr;}
71
72 // the mgsearchptr remains the responsability of the calling code
73 void set_mgsearchptr (mgsearchclass *themgsearchptr) {mgsearchptr=themgsearchptr;}
74
75 void configure (const text_t &key, const text_tarray &cfgline);
76 bool init (ostream &logout);
77 bool translate_OID (const text_t &OIDin, text_t &OIDout,
78 comerror_t &err, ostream &logout);
79 bool get_metadata (const text_t &requestParams, const text_t &refParams,
80 bool getParents, const text_tset &fields,
81 const text_t &OID, MetadataInfo_tmap &metadata,
82 comerror_t &err, ostream &logout);
83 bool get_document (const text_t &OID, text_t &doc,
84 comerror_t &err, ostream &logout);
85};
86
87
88
89#endif
Note: See TracBrowser for help on using the repository browser.