- Timestamp:
- 2009-01-12T11:40:15+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/branches/rtl-gli/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java
r18297 r18364 269 269 return; 270 270 } 271 272 load_collection_configs(data,collect_directory); 273 274 } 275 276 277 protected void load_collection_configs(TreeSet data, File collect_directory) { 278 271 279 File[] collection_folders = collect_directory.listFiles(); 280 272 281 for(int i = 0; i < collection_folders.length; i++) { 273 282 File collection_folder = collection_folders[i]; 274 283 String collection_foldername = collection_folder.getName(); 284 275 285 if(collection_folder.isDirectory() && !collection_foldername.equals(StaticStrings.MODEL_COLLECTION_NAME)) { 276 // this 'file_name' has already been prefixed by 'etc' 277 String file_name = (Gatherer.GS3)? Utility.CONFIG_GS3_FILE : Utility.CONFIG_FILE; 286 // this 'file_name' has already been prefixed by 'etc' 287 String file_name; 288 if (Gatherer.GS3){ 289 convertToGS3Collection(collection_folder); 290 file_name = Utility.CONFIG_GS3_FILE; 291 }else{ 292 file_name = Utility.CONFIG_FILE; 293 } 294 278 295 File config_file = new File(collection_folder, file_name); 279 296 File collection_metadata_directory = new File(collection_folder, "metadata"); 280 297 if (collection_metadata_directory.exists() && config_file.exists()) { 281 298 BasicCollectionConfiguration collection_configuration = new BasicCollectionConfiguration(config_file); 282 data.add(collection_configuration); 299 300 // look to see if group set? 301 // => if it is, don't add, but recurse to look for child collections in collect-group 302 303 if (collection_configuration.getCollectGroup().equals("true")) { 304 load_collection_configs(data, collection_folder); 305 } 306 else { 307 data.add(collection_configuration); 308 } 283 309 } 284 310 config_file = null; … … 290 316 collect_directory = null; 291 317 } 318 319 292 320 293 321 public Object getElementAt(int index) {
Note:
See TracChangeset
for help on using the changeset viewer.