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

Last change on this file since 504 was 504, checked in by rjmcnab, 25 years ago

Changes for AIX.

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