Ignore:
Timestamp:
2017-02-08T18:31:18+13:00 (7 years ago)
Author:
ak19
Message:

Round 1 of commits for getting OAI deletion policy to work with GS2 (server end). The perl code writing out the OAI db and the GS3 server code implementing the deletion policy had already been completed earlier (end 2016).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/protocol/recptprototools.cpp

    r22142 r31387  
    3232// metadata fields are to be requested.
    3333
     34// THIS FILE IS A CANDIDATE FOR REFACTORING: merge get_info methods
     35
    3436bool get_info (const text_t &OID, const text_t &collection, const text_t &lang,
    3537           const text_tset &metadata, bool getParents,
    3638           recptproto *collectproto, FilterResponse_t &response,
    37            ostream &logout)
     39           ostream &logout, int filterResultOptions)
    3840{
    3941  response.clear();
     
    4547  request.filterName = "NullFilter";
    4648  request.filterLang = lang;
    47   request.filterResultOptions = FRmetadata;
     49  request.filterResultOptions = filterResultOptions | FRmetadata;
    4850  request.getParents = getParents;
    4951  request.fields = metadata;
     
    6567}
    6668
     69bool get_oai_info (const text_t &OID, const text_t &collection, const text_t &lang,
     70           const text_tset &metadata, bool getParents,
     71           recptproto *collectproto, FilterResponse_t &response,
     72           ostream &logout)
     73{
     74  // set filteroption to FROAI
     75  return get_info(OID, collection, lang, metadata, getParents, collectproto, response, logout, FROAI);
     76}
    6777
    6878// overloaded, to allow "custom" filter options.
     
    162172           const text_tset &metadata, bool getParents,
    163173           recptproto *collectproto, FilterResponse_t &response,
    164            ostream &logout)
     174           ostream &logout, int filterResultOptions)
    165175{
    166176  response.clear();
     
    175185  request.filterName = "BrowseFilter";
    176186  request.filterLang = lang;
    177   request.filterResultOptions = FROID;
     187  request.filterResultOptions = filterResultOptions | FROID;
    178188
    179189  // Efficiency improvement: only get the filter to retrieve metadata if some has been requested
Note: See TracChangeset for help on using the changeset viewer.