Ignore:
Timestamp:
1999-08-11T10:44:06+12:00 (25 years ago)
Author:
sjboddie
Message:

altered the get_contents function so it's now passed metadata
rather than having it hard-coded

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/OIDtools.cpp

    r423 r445  
    1212/*
    1313   $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
    1418   Revision 1.12  1999/07/30 02:26:44  sjboddie
    1519   added overloaded get_info function for getting info on multiple OIDs
     
    294298               FilterResponse_t &response, ostream &logout) {
    295299 
    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];
    298304  int cols;
    299305
     
    307313    ResultDocInfo_tarray::const_iterator lastdoc = tmp.docInfo.end();
    308314    while (thisdoc != lastdoc) {
    309       if (((*thisdoc).metadata[2].values[0] != "classify") && (classify))
     315      if (((*thisdoc).metadata[metasize-1].values[0] != "classify") && (classify))
    310316    cols = parentcols + 1;
    311317      else
     
    322328// get_contents returns OIDs and metadata of all contents
    323329// 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,
     330void get_contents (const text_t &topOID, const text_t &classifytype,
     331           text_tarray &metadata, int &totalcols,
    327332           const text_t &collection, recptproto *collectproto,
    328333           FilterResponse_t &response, ostream &logout) {
    329334
     335  if (topOID.empty()) return;
    330336  bool classify = false;
    331337  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");
    337341
    338342  // we don't want to recurse all the way down through each document
Note: See TracChangeset for help on using the changeset viewer.