- Timestamp:
- 2017-08-21T18:03:37+12:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/OAIPMH.java
r31911 r31912 233 233 } 234 234 235 /** 236 * @return the associated OAICollection's OAI_EARLIEST_TIMESTAMP_OID record's 237 * OAI_INF_TIMESTAMP field from the collection's oai-inf.db IN MILLISECONDS 238 */ 239 public long getEarliestTimestamp() { 240 long timestamp = -1; 241 242 DBInfo oai_info = null; 243 if(oaiinf_db != null) { 244 // get internal record containing the earliest timestamp of the collection 245 oai_info = this.oaiinf_db.getInfo(OAIXML.OAI_EARLIEST_TIMESTAMP_OID); 246 if (oai_info == null) { 247 logger.warn("Can't get collection " + this.cluster_name + "'s earliest timestamp from oai-inf db. No entry for 'OID' " + OAIXML.OAI_EARLIEST_TIMESTAMP_OID + " in the db."); 248 } else { 249 timestamp = Long.parseLong(oai_info.getInfo(OAIXML.OAI_INF_TIMESTAMP)) * 1000; // stored in seconds, so x1000 to convert to milliseconds 250 //logger.info("@@@ found earliest OAI timestamp for collection " + this.coll_name + ": " + timestamp + " (ms)"); 251 } 252 } 253 return timestamp; 254 } 255 235 256 protected Element findNamedMetadataFormat(Element list_meta_formats, String prefix) { 236 257 NodeList formats = list_meta_formats.getElementsByTagName(OAIXML.METADATA_FORMAT);
Note:
See TracChangeset
for help on using the changeset viewer.