Ignore:
Timestamp:
2000-08-03T14:49:41+12:00 (24 years ago)
Author:
johnmcp
Message:

Relatively stable z39.50 implementation now, merged with the mgpp source.
(Still needs a decent interface and query language though...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/z3950-branch/gsdl/src/recpt/OIDtools.cpp

    r739 r1342  
    2222 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    2323 *
    24  * $Id$
    25  *
    2624 *********************************************************************/
    27 
    28 /*
    29    $Log$
    30    Revision 1.18  1999/10/24 07:24:34  sjboddie
    31    small change to allow FullTOC option
    32 
    33    Revision 1.17  1999/10/10 08:14:02  sjboddie
    34    - metadata now returns mp rather than array
    35    - redesigned browsing support (although it's not finished so
    36    won't currently work ;-)
    37 
    38    Revision 1.16  1999/09/07 04:56:51  sjboddie
    39    added GPL notice
    40 
    41    Revision 1.15  1999/09/02 00:22:04  rjmcnab
    42    added extra check in get_info
    43 
    44    Revision 1.14  1999/08/25 04:45:25  sjboddie
    45    changed FilterRequest_t::docSet into an array
    46 
    47    Revision 1.13  1999/08/10 22:44:06  sjboddie
    48    altered the get_contents function so it's now passed metadata
    49    rather than having it hard-coded
    50 
    51    Revision 1.12  1999/07/30 02:26:44  sjboddie
    52    added overloaded get_info function for getting info on multiple OIDs
    53 
    54    Revision 1.11  1999/07/20 02:59:03  sjboddie
    55    get_children now takes a getParents argument
    56 
    57    Revision 1.10  1999/07/07 05:47:41  sjboddie
    58    changed around the way browsetools works
    59 
    60    Revision 1.9  1999/06/16 23:51:53  sjboddie
    61    added a strip_suffix function
    62 
    63    Revision 1.8  1999/06/16 03:11:25  sjboddie
    64    get_info() now takes a getParents argument
    65 
    66    Revision 1.7  1999/06/16 02:05:23  sjboddie
    67    just changed a comment that was confusing me
    68 
    69    Revision 1.6  1999/05/10 03:40:25  sjboddie
    70    lots of changes - slowly getting document action sorted out
    71 
    72    Revision 1.5  1999/04/30 01:59:37  sjboddie
    73    lots of stuff - getting documentaction working (documentaction replaces
    74    old browseaction)
    75 
    76    Revision 1.4  1999/03/29 02:14:25  sjboddie
    77 
    78    More changes to browseaction
    79 
    80    Revision 1.3  1999/03/25 03:13:42  sjboddie
    81 
    82    More library functions for dealing with OIDs. Many of them just
    83    return dummy data at present
    84 
    85    Revision 1.2  1999/03/05 03:53:53  sjboddie
    86 
    87    fixed some bugs
    88 
    89    Revision 1.1  1999/03/04 22:38:20  sjboddie
    90 
    91    Added subjectbrowseaction. - Doesn't do anything yet.
    92 
    93  */
    9425
    9526#include "OIDtools.h"
     
    173104}
    174105
     106// overloaded, to allow "custom" filter options.
     107bool get_info (const text_t &OID, const text_t &collection,
     108           const text_tset &metadata, const OptionValue_tarray &options,
     109           bool getParents,
     110           recptproto *collectproto, FilterResponse_t &response,
     111           ostream &logout) {
     112
     113  response.clear();
     114
     115  comerror_t err;
     116  FilterRequest_t request;
     117
     118  request.filterName = "NullFilter";
     119  request.filterResultOptions = FRmetadata;
     120  request.getParents = getParents;
     121  request.filterOptions = options;
     122  request.fields = metadata;
     123  request.docSet.push_back (OID);
     124 
     125  collectproto->filter (collection, request, response, err, logout);
     126  if (err != noError) {
     127    outconvertclass text_t2ascii;
     128    logout << text_t2ascii
     129       << "Error: call to filter failed for " << OID
     130       << " in OIDtools::get_info ("
     131       << get_comerror_string (err) << ")\n";
     132    return false;
     133  }
     134 
     135  return true;
     136}
     137
    175138bool get_info (const text_tarray &OIDs, const text_t &collection,
    176139           const text_tset &metadata, bool getParents,
     
    202165  return true;
    203166}
     167
     168
    204169
    205170// has_children returns true if OID has children
Note: See TracChangeset for help on using the changeset viewer.