Changeset 4601
- Timestamp:
- 2003-06-12T13:33:34+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/SuperCollectionManager.java
r4573 r4601 56 56 File[] possible_collections = gsdl_collection_directory.listFiles(); 57 57 for(int i = 0; possible_collections != null && i < possible_collections.length; i++) { 58 if (possible_collections[i].getName().equals(current_coll_name)) {59 // we dont want to add the current collection to the list60 continue;61 }62 58 // The simpliest case is if the directory etc/collect.cfg file and a metadata/ in it. Thus it can easily be built upon. 63 59 File collect_cfg_file = new File(possible_collections[i], Utility.CONFIG_DIR); … … 70 66 Entry entry = new Entry(collection_title); 71 67 entry.setProperty(collection_name); 68 if (collection_name.equals(current_coll_name)) { 69 // the current collection is always selected 70 entry.setFixed(true); 71 entry.setSelected(true); 72 } 72 73 collection_checklist_model.add(entry); 73 74 entry = null; 75 74 76 } 75 77 collection_name = null; … … 135 137 Entry entry = (Entry) collection_checklist_model.get(i); 136 138 if(entry.isSelected()) { 137 found_entry = true; 139 if (!entry.getProperty().equals(current_coll_name)){ 140 found_entry = true; 141 } 138 142 command.append(" "); 139 143 command.append(entry.getProperty()); … … 141 145 entry = null; 142 146 } 143 // It is possible that there were no entries in which case we return null. 147 command.append("\n"); 148 command.append("\n"); 149 150 // It is possible that there was only one entry - the current collection - in which case we return null. 144 151 if(found_entry) { 145 // we need to add on the current collection146 command.append(" ");147 command.append(current_coll_name);148 command.append("\n");149 command.append("\n");150 152 return command.toString(); 151 153 }
Note:
See TracChangeset
for help on using the changeset viewer.