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

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

lots of stuff to do with getting documentaction working

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