- Timestamp:
- 2017-08-23T18:58:38+12:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/OAIReceptionist.java
r31913 r31915 1038 1038 for(int i=0; i<oai_coll_size; i++) { 1039 1039 String collName = collection_name_list.get(i); 1040 long coll_earliestDatestamp = Long.parseLong(((Element)oai_coll.item(i)).getAttribute(OAIXML.EARLIEST_DATESTAMP)); // Taken from oai-inf db's OAI_EARLIEST_TIMESTAMP_OID entry, else falls back to earliest datestamp field in buildcfg 1041 if (coll_earliestDatestamp == 0) { 1042 // try last modified 1043 coll_earliestDatestamp = Long.parseLong(((Element)oai_coll.item(i)).getAttribute(OAIXML.LAST_MODIFIED)); 1044 //logger.info("@@@ Falling back to using collection " + collName + "'s lastmodified date as its earliest timestamp: " + coll_earliestDatestamp); 1045 } 1046 if (coll_earliestDatestamp > 0) { 1047 earliestDatestamp = (earliestDatestamp > coll_earliestDatestamp)? coll_earliestDatestamp : earliestDatestamp; 1048 } 1049 } 1040 long coll_earliestDatestamp = Long.parseLong(((Element)oai_coll.item(i)).getAttribute(OAIXML.EARLIEST_OAI_DATESTAMP)); // Taken from oai-inf db's OAI_EARLIEST_TIMESTAMP_OID entry, -1 if not found 1041 1042 if (coll_earliestDatestamp > 0 && earliestDatestamp > coll_earliestDatestamp) { 1043 earliestDatestamp = coll_earliestDatestamp; 1044 //logger.info("@@@ Found earlier timestamp: " + earliestDatestamp + " ms"); 1045 } 1046 } 1047 1048 // we're no longer trying fallbacks for earliestDatestamp (other than the extreme fallback of 1049 // unix epoch time) because, going forward, all collections will have oai-inf db containing 1050 // an entry for earliesttimestamp. And all OAICollections will moreover have them stored and 1051 // will return them upon calling getEarliestOAIDatestamp(). 1052 /* 1053 if(earliestDatestamp == current_time) { 1054 logger.info("Can't determine earliesttimestamp from oai-inf.db for any OAI collection. Trying timestamps in build config..."); 1055 for(int i=0; i<oai_coll_size; i++) { 1056 String collName = collection_name_list.get(i); 1057 long coll_earliestDatestamp = Long.parseLong(((Element)oai_coll.item(i)).getAttribute(OAIXML.EARLIEST_DATESTAMP)); // Taken from the earliest datestamp field in buildcfg 1058 if (coll_earliestDatestamp == 0) { 1059 // try last modified 1060 coll_earliestDatestamp = Long.parseLong(((Element)oai_coll.item(i)).getAttribute(OAIXML.LAST_MODIFIED)); 1061 //logger.info("@@@ Falling back to using collection " + collName + "'s lastmodified date as its earliest timestamp: " + coll_earliestDatestamp); 1062 } 1063 if (coll_earliestDatestamp > 0) { 1064 earliestDatestamp = (earliestDatestamp > coll_earliestDatestamp)? coll_earliestDatestamp : earliestDatestamp; 1065 } 1066 } 1067 } 1068 */ 1069 1050 1070 if (earliestDatestamp == current_time) { 1051 1071 logger.info("no collection had a real datestamp, using value from OAIConfig");
Note:
See TracChangeset
for help on using the changeset viewer.