Changeset 445 for trunk/gsdl/src/recpt/OIDtools.cpp
- Timestamp:
- 1999-08-11T10:44:06+12:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/OIDtools.cpp
r423 r445 12 12 /* 13 13 $Log$ 14 Revision 1.13 1999/08/10 22:44:06 sjboddie 15 altered the get_contents function so it's now passed metadata 16 rather than having it hard-coded 17 14 18 Revision 1.12 1999/07/30 02:26:44 sjboddie 15 19 added overloaded get_info function for getting info on multiple OIDs … … 294 298 FilterResponse_t &response, ostream &logout) { 295 299 296 int haschildren = section.metadata[1].values[0].getint(); 297 const text_t &doctype = section.metadata[2].values[0]; 300 int metasize = section.metadata.size(); 301 302 int haschildren = section.metadata[metasize-2].values[0].getint(); 303 const text_t &doctype = section.metadata[metasize-1].values[0]; 298 304 int cols; 299 305 … … 307 313 ResultDocInfo_tarray::const_iterator lastdoc = tmp.docInfo.end(); 308 314 while (thisdoc != lastdoc) { 309 if (((*thisdoc).metadata[ 2].values[0] != "classify") && (classify))315 if (((*thisdoc).metadata[metasize-1].values[0] != "classify") && (classify)) 310 316 cols = parentcols + 1; 311 317 else … … 322 328 // get_contents returns OIDs and metadata of all contents 323 329 // below (and including) OID. 324 // metadata being returned for each is Title, haschildren, 325 // doctype, and hastxt 326 void get_contents (const text_t &topOID, const text_t &classifytype, int &totalcols, 330 void get_contents (const text_t &topOID, const text_t &classifytype, 331 text_tarray &metadata, int &totalcols, 327 332 const text_t &collection, recptproto *collectproto, 328 333 FilterResponse_t &response, ostream &logout) { 329 334 335 if (topOID.empty()) return; 330 336 bool classify = false; 331 337 response.clear(); 332 text_tarray metadata; 333 metadata.push_back ("Title"); 334 metadata.push_back ("haschildren"); 335 metadata.push_back ("doctype"); 336 metadata.push_back ("hastxt"); 338 339 metadata.push_back("haschildren"); 340 metadata.push_back("doctype"); 337 341 338 342 // we don't want to recurse all the way down through each document
Note:
See TracChangeset
for help on using the changeset viewer.