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/collection/OAICollection.java

    r29265 r31912  
    150150      // pass the xml node to the service for configuration
    151151      if (this.oai_service_rack.configure(oai_service_xml, extra_info)) {
     152
     153          // 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.
     156          long earliestTimestamp = this.oai_service_rack.getEarliestTimestamp();
     157          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);
     161          } else {
     162          this.earliestDatestamp = earliestTimestamp; // milliseconds
     163          }
     164         
    152165       
    153166        // find out the supported service types for this service module
Note: See TracChangeset for help on using the changeset viewer.