source: trunk/gsdl/src/colservr/source.cpp@ 259

Last change on this file since 259 was 259, checked in by sjboddie, 25 years ago

lots of changes to lots of files - getting document action going

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1/**********************************************************************
2 *
3 * source.cpp --
4 * Copyright (C) 1999 The New Zealand Digital Library Project
5 *
6 * PUT COPYRIGHT NOTICE HERE
7 *
8 * $Id: source.cpp 259 1999-05-10 03:43:49Z sjboddie $
9 *
10 *********************************************************************/
11
12/*
13 $Log$
14 Revision 1.4 1999/05/10 03:43:49 sjboddie
15 lots of changes to lots of files - getting document action going
16
17 Revision 1.3 1999/04/30 02:00:48 sjboddie
18 lots of stuff to do with getting documentaction working
19
20 Revision 1.2 1999/04/06 22:20:32 rjmcnab
21 Got browsefilter working.
22
23 Revision 1.1 1999/03/31 23:43:40 rjmcnab
24 Initial revision
25
26 */
27
28
29#include "source.h"
30#include <assert.h>
31
32
33// default constructor does nothing
34sourceclass::sourceclass () {
35}
36
37// default destructor does nothing
38sourceclass::~sourceclass () {
39}
40
41// configure should be called once for each configuration line
42// default does nothing
43void sourceclass::configure (const text_t &/*key*/, const text_tarray &/*cfgline*/) {
44}
45
46// init should be called after all the configuration is done but
47// before any other methods are called
48// default does nothing
49bool sourceclass::init (ostream &/*logout*/) {
50 return true;
51}
52
53
54// translate_OID translates OIDs using ".pr", ."fc" etc.
55bool sourceclass::translate_OID (const text_t &/*OIDin*/, text_t &/*OIDout*/,
56 comerror_t &err, ostream &/*logout*/) {
57 err = noError;
58
59 return false;
60}
61
62
63// get_metadata fills out the metadata if possible, if it is not responsable
64// for the given OID then it will return false.
65bool sourceclass::get_metadata (const text_t &/*requestParams*/, const text_t &/*refParams*/,
66 const text_tarray &/*fields*/, const text_t &/*OID*/,
67 MetadataInfo_tarray &metadata,
68 comerror_t &err, ostream &/*logout*/) {
69 metadata.erase(metadata.begin(), metadata.end());
70 err = noError;
71
72 return false;
73}
74
75bool sourceclass::get_document (const text_t &/*OID*/, text_t &/*doc*/,
76 comerror_t &err, ostream &/*logout*/) {
77 err = noError;
78
79 return false;
80}
81
82
83// thesource remains the property of the calling code but
84// should not be deleted until it is removed from this list.
85void sourcelistclass::addsource (sourceclass *thesource) {
86 // can't add a source that doesn't exist
87 assert (thesource != NULL);
88 if (thesource == NULL) return;
89
90 sourceptr sp;
91 sp.s = thesource;
92
93 sourceptrs.push_back(sp);
94}
Note: See TracBrowser for help on using the repository browser.