Ignore:
Timestamp:
2017-08-23T18:58:38+12:00 (7 years ago)
Author:
ak19
Message:

Dr Bainbridge thought about it and decided that the correct solution is that, since a collection will always have an oai-inf db from now on, the earliest datestamp of a collection should not fall back to either buildconfig's earliestdatestamp field or else buildconfig's lastmodified. However, the latter are used as the publishing date by the RSS service, and so still stored as Collection.java's earliestDatestamp. Now OAICollection has a new additional field, earliestOAIDatestamp which contains the earliest timestamp in oai-inf db. The OAIReceptionist now determines the earliestDatestamp of the entire OAIRepository solely based on the earliestOAIDatestamp values across all OAICollections, also with no fallbacks on Collections' earliestDatestamp or lastModified fields.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/collection/OAICollection.java

    r31912 r31915  
    6161    protected boolean has_oai = false;
    6262
    63   /** a reference to the OAIPMH service rack */
    64   protected OAIPMH oai_service_rack = null;
     63    /** earliest datestamp of an OAI collection. Also used to work out the earliest datetimestamp of the entire OAI repository */
     64    protected long earliestOAIDatestamp = 0;
     65
     66    /** a reference to the OAIPMH service rack */
     67    protected OAIPMH oai_service_rack = null;
    6568
    6669    /**
     
    120123    }
    121124
     125    /**
     126     * The earliesttimestamp entry in the oai-inf.db representing when the collection was created.
     127     * Used by the OAIReceptionist
     128    */   
     129    public long getEarliestOAIDatestamp()
     130    {
     131        return earliestOAIDatestamp;
     132    }
     133   
    122134  /** add any extra info for collection from OAIConfig.xml */
    123135  public boolean configureOAI(Element oai_config) {
     
    152164
    153165          // once we've configured the OAIPMH service, we can use the OAIPMH service to
    154           // retrieve the earliest timestamp of the collection from the oai-inf db and
    155           // overwrite Collection.earliestDatestamp with it.
     166          // retrieve the earliest timestamp of this OAI collection from the oai-inf db
    156167          long earliestTimestamp = this.oai_service_rack.getEarliestTimestamp();
    157168          if(earliestTimestamp == -1) {
    158           //this.earliestDatestamp = -1;
    159           logger.warn("No OAI timestamp for collection " + this.cluster_name
    160                   + ". Falling back to using its earliestDatestamp from build config: " + this.earliestDatestamp);
     169          this.earliestOAIDatestamp = -1;
     170          logger.warn("No OAI timestamp for collection " + this.cluster_name);
     171          //logger.warn("No OAI timestamp for collection " + this.cluster_name
     172          //+ ". Falling back to using its earliestDatestamp from build config: " + this.earliestDatestamp);
    161173          } else {
    162           this.earliestDatestamp = earliestTimestamp; // milliseconds
     174          this.earliestOAIDatestamp = earliestTimestamp; // milliseconds
    163175          }
    164176         
Note: See TracChangeset for help on using the changeset viewer.