Ignore:
Timestamp:
2017-08-21T18:03:37+12:00 (7 years ago)
Author:
ak19
Message:

Now GS3 tries to obtain the _earliesttimestamp entry of the oai-inf.db for each collection to, work out the earliest among them to be the earliest timestamp of the repository. For each collection, if there is no such entry or the oai-inf db doesn't exist or can't be accessed, the collection falls back to using the value in the build config file as before. Also as before, if that doesn't exist either, it uses the lastmod date of the collection (I think also taken from build config) as the next fallback value.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/OAIResumptionToken.java

    r28880 r31912  
    161161    if (token.indexOf(":") != -1) {
    162162      token = token.substring(0, token.indexOf(":"));
    163       logger.error("looking up "+token);
     163      logger.info("looking up "+token);
    164164    }
    165165    if (stored_tokens.containsKey(token)) {
     
    174174    if (token.indexOf(":") != -1) {
    175175      base_name = token.substring(0, token.indexOf(":"));
    176       logger.error("getting data for "+base_name);
     176      logger.info("getting data for "+base_name);
    177177    }
    178178    HashMap<String, String> data = new HashMap<String, String>(stored_tokens.get(base_name));
    179179    if (data == null) {
    180       logger.error("data was null!!");
     180      logger.warn("data was null!!");
    181181      return null;
    182182    }
     
    211211    Iterator<Map.Entry<String,Long>> i = token_set.iterator();
    212212    int size = expiration_data.size();
    213     logger.error("start tokens "+size);
     213    logger.info("start tokens "+size);
    214214    Long time_now = System.currentTimeMillis();
    215215    while (i.hasNext()==true) {
     
    218218      Long exp = entry.getValue();
    219219      if (exp < time_now) {
    220     logger.error("token "+key+" is expired, "+ OAIXML.getTime(exp));
     220    logger.info("token "+key+" is expired, "+ OAIXML.getTime(exp));
    221221    i.remove();
    222222    // also remove the token from the stored tokens
     
    225225    }
    226226    size = expiration_data.size();
    227     logger.error("end tokens "+size);
     227    logger.info("end tokens "+size);
    228228  }
    229229
     
    242242      }
    243243    } catch (Exception e) {
    244       logger.error("couldn't find or ResumptionToken.xml "+e.getMessage());
     244      logger.error("couldn't find or work with ResumptionToken.xml "+e.getMessage());
    245245    }
    246246    // if we have got here, have't managed to load file via class loader -
     
    287287    clearExpiredTokens();
    288288    if (resumption_token_file == null) {
    289       logger.error("no available resumption token file, not storing tokens");
     289      logger.warn("no available resumption token file, not storing tokens");
    290290      return false;
    291291    }
Note: See TracChangeset for help on using the changeset viewer.