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/colservr/filter.cpp

    r16310 r31387  
    6161}
    6262
     63text_t filterclass::getcollectionpath()
     64{
     65  text_t resolved_filename;
     66 
     67  if (gsdlhome==dbhome) {
     68    // dbhome has defaulted to gsdlhome which we take to means the
     69    // database has been specifically moved out of gsdlhome area.
     70    // => it should be whereever collecthome is set to
     71    resolved_filename = filename_cat(collecthome, collection);
     72  }
     73  else {
     74    // dbhome is explicitly set to something other than gsdlhome
     75    // => use dbhome
     76    resolved_filename = filename_cat(dbhome, "collect", collection);
     77  }
     78
     79  return resolved_filename;
     80}
     81
    6382text_t filterclass::resolve_db_filename(const text_t& idx,
    6483                    const text_t& file_ext)
    6584{
     85  /*
    6686  text_t resolved_filename;
    6787
     
    7797    resolved_filename = filename_cat(dbhome, "collect", collection, "index", "text", idx);
    7898  }
     99  */
     100 
     101  text_t resolved_filename = filename_cat(getcollectionpath(), "index", "text", idx);
     102  resolved_filename += file_ext;
     103
     104  return resolved_filename;
     105}
     106
     107text_t filterclass::resolve_oaidb_filename(const text_t& file_ext)
     108{
     109  text_t resolved_filename = filename_cat(getcollectionpath(), "etc", "oai-inf");
    79110
    80111  resolved_filename += file_ext;
Note: See TracChangeset for help on using the changeset viewer.