- Timestamp:
- 2008-07-02T09:04:06+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java
r14753 r16267 253 253 return; 254 254 } 255 256 load_collection_configs(data,collect_directory); 257 258 } 259 260 261 protected void load_collection_configs(TreeSet data, File collect_directory) { 262 255 263 File[] collection_folders = collect_directory.listFiles(); 264 256 265 for(int i = 0; i < collection_folders.length; i++) { 257 266 File collection_folder = collection_folders[i]; 258 267 String collection_foldername = collection_folder.getName(); 268 259 269 if(collection_folder.isDirectory() && !collection_foldername.equals(StaticStrings.MODEL_COLLECTION_NAME)) { 260 270 // this 'file_name' has already been prefixed by 'etc' … … 267 277 } 268 278 269 //String file_name = (Gatherer.GS3)? Utility.CONFIG_GS3_FILE : Utility.CONFIG_FILE;270 279 File config_file = new File(collection_folder, file_name); 271 280 File collection_metadata_directory = new File(collection_folder, "metadata"); 272 281 if (collection_metadata_directory.exists() && config_file.exists()) { 273 282 BasicCollectionConfiguration collection_configuration = new BasicCollectionConfiguration(config_file); 274 data.add(collection_configuration); 283 284 // look to see if group set? 285 // => if it is, don't add, but recurse to look for child collections in collect-group 286 287 if (collection_configuration.getCollectGroup().equals("true")) { 288 load_collection_configs(data, collection_folder); 289 } 290 else { 291 data.add(collection_configuration); 292 } 275 293 } 276 294 config_file = null; … … 282 300 collect_directory = null; 283 301 } 302 303 284 304 285 305 public Object getElementAt(int index) {
Note:
See TracChangeset
for help on using the changeset viewer.