Changeset 32870 for main/trunk
- Timestamp:
- 2019-03-06T17:41:15+13:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/OAIReceptionist.java
r32869 r32870 72 72 */ 73 73 protected Vector<Integer> collection_state_list = null; 74 /** Possible states for a collection */ 74 /** Possible states for a collection. 75 * NOTE: Being done with Integer instead of int because they're put into Vectors and they can only contain Objects not primitive data types. 76 */ 75 77 protected static final Integer DEACTIVATED = new Integer(0); 76 78 protected static final Integer ACTIVE = new Integer(1); … … 79 81 protected boolean noRecordsMatch = false; 80 82 81 /** A set of all known 'sets' */82 protected HashSet<String> set_ set = null;83 /** A set of all known 'sets' TODO: set_oaiset as name */ 84 protected HashSet<String> set_oaiset = null; 83 85 84 86 protected boolean has_super_colls = false; … … 185 187 } 186 188 private boolean configureSetInfo() { 187 this.set_ set = new HashSet<String>();189 this.set_oaiset = new HashSet<String>(); 188 190 189 191 // First, we get a list of all the OAI enabled collections … … 278 280 // not in there yet 279 281 subcolls = new Vector<String>(); 280 this.set_ set.add(set_spec);282 this.set_oaiset.add(set_spec); 281 283 this.super_coll_map.put(set_spec, subcolls); 282 284 // the first time a supercoll is mentioned, add into the set list … … 290 292 // add in the set 291 293 listsets_element.appendChild(listsets_doc.importNode(set, true)); 292 this.set_ set.add(set_spec);294 this.set_oaiset.add(set_spec); 293 295 } 294 296 } // for each set in the collection … … 409 411 String collname = request.getAttribute(GSXML.SYSTEM_TYPE_ACTIVATE); 410 412 // don't bother activating if it's not an OAI collection 411 if (!this. set_set.contains(collname)) {413 if (!this.collection_name_list.contains(collname)) { 412 414 return OAIXML.createDeActivationOfNonOAICollResponse(OAIXML.ACTIVATION, collname); 413 415 } … … 417 419 String collname = request.getAttribute(GSXML.SYSTEM_TYPE_DEACTIVATE); 418 420 // don't bother deactivating if it's not an OAI collection 419 if (!this. set_set.contains(collname)) {421 if (!this.collection_name_list.contains(collname)) { 420 422 return OAIXML.createDeActivationOfNonOAICollResponse(OAIXML.DEACTIVATION, collname); 421 423 } … … 620 622 if(set_requested == true) { 621 623 set_spec_str = param_map.get(OAIXML.SET); 622 if (!this.set_ set.contains(set_spec_str)) {624 if (!this.set_oaiset.contains(set_spec_str)) { 623 625 // the set is not one we know about 624 626 logger.error("requested set is not found in this repository"); … … 692 694 // 0 collections are active, but (the remaining one) would have been deactivated, not other reason 693 695 String errorCode = (record_type.equals(OAIXML.RECORD)) ? OAIXML.NO_RECORDS_MATCH : OAIXML.ID_DOES_NOT_EXIST; // GetRecords vs GetIdentifiers request 694 return OAIXML.createErrorMessage(errorCode, "OAI collections temporarily active. Likely because ofcollection rebuilding. Check back shortly.");696 return OAIXML.createErrorMessage(errorCode, "OAI collections temporarily inactive. Likely because of (a) collection rebuilding. Check back shortly."); 695 697 } 696 698 }
Note:
See TracChangeset
for help on using the changeset viewer.