Ignore:
Timestamp:
1999-07-30T14:26:44+12:00 (25 years ago)
Author:
sjboddie
Message:

added overloaded get_info function for getting info on multiple OIDs

File:
1 edited

Legend:

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

    r406 r423  
    1212/*
    1313   $Log$
     14   Revision 1.12  1999/07/30 02:26:44  sjboddie
     15   added overloaded get_info function for getting info on multiple OIDs
     16
    1417   Revision 1.11  1999/07/20 02:59:03  sjboddie
    1518   get_children now takes a getParents argument
     
    128131       << "Error: call to filter failed for " << OID
    129132       << " in OIDtools::get_info ("
     133       << get_comerror_string (err) << ")\n";
     134    return false;
     135  }
     136  return true;
     137}
     138
     139bool get_info (const text_tarray &OIDs, const text_t &collection,
     140           const text_tarray &metadata, bool getParents,
     141           recptproto *collectproto,FilterResponse_t &response,
     142           ostream &logout) {
     143
     144  response.clear();
     145  if (OIDs.empty()) return true;
     146
     147  comerror_t err;
     148  FilterRequest_t request;
     149
     150  request.filterName = "NullFilter";
     151  request.filterResultOptions = FRmetadata;
     152  request.getParents = getParents;
     153  request.fields = metadata;
     154
     155  text_tarray::const_iterator thisOID = OIDs.begin();
     156  text_tarray::const_iterator endOID = OIDs.end();
     157  while (thisOID != endOID) {
     158    request.docSet.insert (*thisOID);
     159    thisOID ++;
     160  }
     161 
     162  collectproto->filter (collection, request, response, err, logout);
     163  if (err != noError) {
     164    outconvertclass text_t2ascii;
     165    logout << text_t2ascii
     166       << "Error: call to filter failed in OIDtools::get_info ("
    130167       << get_comerror_string (err) << ")\n";
    131168    return false;
Note: See TracChangeset for help on using the changeset viewer.