Changeset 259
- Timestamp:
- 1999-05-10T15:43:49+12:00 (25 years ago)
- Location:
- trunk/gsdl/src/colservr
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/colservr/browsefilter.cpp
r249 r259 12 12 /* 13 13 $Log$ 14 Revision 1.4 1999/05/10 03:43:47 sjboddie 15 lots of changes to lots of files - getting document action going 16 14 17 Revision 1.3 1999/04/30 02:00:45 sjboddie 15 18 lots of stuff to do with getting documentaction working … … 136 139 } 137 140 141 infodbclass info; 142 143 // translate any ".fc", ".pr" etc. stuff in the parentnode 144 parentnode = gdbmptr->translate_OID (parentnode, info); 145 138 146 // adjust topmost browsing node 139 147 if (parentnode.empty()) parentnode = "browse"; 140 148 141 149 // get the node 142 infodbclass info;143 144 150 if ((request.filterResultOptions & FROID) || 145 151 (request.filterResultOptions & FRmetadata)) { -
trunk/gsdl/src/colservr/collectserver.cpp
r249 r259 13 13 /* 14 14 $Log$ 15 Revision 1.8 1999/05/10 03:43:47 sjboddie 16 lots of changes to lots of files - getting document action going 17 15 18 Revision 1.7 1999/04/30 02:00:45 sjboddie 16 19 lots of stuff to do with getting documentaction working … … 246 249 } 247 250 248 249 250 251 void collectserver::get_document (const DocumentRequest_t &request, 252 DocumentResponse_t &response, 253 comerror_t &err, ostream &logout) { 254 255 sourcelistclass::iterator source_here = sources.begin(); 256 sourcelistclass::iterator source_end = sources.end(); 257 while (source_here != source_end) { 258 assert ((*source_here).s != NULL); 259 if (((*source_here).s != NULL) && 260 ((*source_here).s->get_document (request.OID, response.doc, err, logout))) { 261 if (err != noError) return; 262 break; 263 } 264 source_here++; 265 } 266 } 251 267 252 268 // thecollectserver remains the property of the calling code but -
trunk/gsdl/src/colservr/collectserver.h
r249 r259 97 97 FilterResponse_t &response, 98 98 comerror_t &err, ostream &logout); 99 100 101 virtual void get_document (const DocumentRequest_t &request, 102 DocumentResponse_t &response, 103 comerror_t &err, ostream &logout); 104 99 105 }; 100 106 -
trunk/gsdl/src/colservr/infodbclass.cpp
r249 r259 12 12 /* 13 13 $Log$ 14 Revision 1.4 1999/05/10 03:43:48 sjboddie 15 lots of changes to lots of files - getting document action going 16 14 17 Revision 1.3 1999/04/30 02:00:46 sjboddie 15 18 lots of stuff to do with getting documentaction working … … 102 105 text_t gdbmclass::translate_OID (const text_t &inOID, infodbclass &info) { 103 106 104 if (inOID. empty() || inOID.size() < 4) return inOID;107 if (inOID.size() < 4) return inOID; 105 108 if (findchar (inOID.begin(), inOID.end(), '.') == inOID.end()) return inOID; 106 109 -
trunk/gsdl/src/colservr/mggdbmsource.cpp
r249 r259 12 12 /* 13 13 $Log$ 14 Revision 1.8 1999/05/10 03:43:48 sjboddie 15 lots of changes to lots of files - getting document action going 16 14 17 Revision 1.7 1999/04/30 02:00:47 sjboddie 15 18 lots of stuff to do with getting documentaction working … … 231 234 } 232 235 236 237 bool mggdbmsourceclass::get_document (const text_t &OID, text_t &doc, 238 comerror_t &err, ostream &logout) { 239 240 outconvertclass text_t2ascii; 241 242 err = noError; 243 if (gdbmptr == NULL) { 244 // most likely a configuration problem 245 logout << text_t2ascii 246 << "configuration error: mggdbmsource contains a null gdbmclass\n\n"; 247 err = configurationError; 248 return true; 249 } 250 251 // open the database 252 gdbmptr->setlogout(&logout); 253 if (!gdbmptr->opendatabase (gdbm_filename)) { 254 // most likely a system problem (we have already checked that the 255 // gdbm database exists) 256 logout << text_t2ascii 257 << "system problem: open on gdbm database \"" 258 << gdbm_filename << "\" failed\n\n"; 259 err = systemProblem; 260 return true; 261 } 262 263 text_t tOID = OID; 264 if (needs_translating (OID)) 265 translate_OID (OID, tOID, err, logout); 266 infodbclass info; 267 if (!gdbmptr->getinfo(tOID, info)) return false; 268 269 if (info["hastxt"].getint() == 1) { 270 int docnum = info["docnum"].getint(); 271 272 // set the collection directory 273 mgsearchptr->setcollectdir (collectdir); 274 275 // get the text 276 mgsearchptr->docTargetDocument("stx", collection, docnum, doc); 277 } 278 return true; 279 } -
trunk/gsdl/src/colservr/mggdbmsource.h
r249 r259 56 56 MetadataInfo_tarray &metadata, 57 57 comerror_t &err, ostream &logout); 58 bool get_document (const text_t &OID, text_t &doc, 59 comerror_t &err, ostream &logout); 58 60 }; 59 61 -
trunk/gsdl/src/colservr/source.cpp
r249 r259 12 12 /* 13 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 14 17 Revision 1.3 1999/04/30 02:00:48 sjboddie 15 18 lots of stuff to do with getting documentaction working … … 70 73 } 71 74 75 bool sourceclass::get_document (const text_t &/*OID*/, text_t &/*doc*/, 76 comerror_t &err, ostream &/*logout*/) { 77 err = noError; 78 79 return false; 80 } 72 81 73 82 -
trunk/gsdl/src/colservr/source.h
r249 r259 40 40 const text_tarray &fields, const text_t &OID, 41 41 MetadataInfo_tarray &metadata, 42 comerror_t &err, ostream &logout); 43 44 virtual bool get_document (const text_t &OID, text_t &doc, 42 45 comerror_t &err, ostream &logout); 43 46 };
Note:
See TracChangeset
for help on using the changeset viewer.