Ignore:
Timestamp:
2009-01-12T11:40:15+13:00 (15 years ago)
Author:
kjdon
Message:

updated the rtl-gli branch with files from trunk. Result of a merge 14807:18318, and fixed some conflicts. I think this is the last commit following merging the files. Haven't tried to compile yet... here goes...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/branches/rtl-gli/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java

    r18297 r18364  
    269269        return;
    270270        }
     271
     272        load_collection_configs(data,collect_directory);
     273
     274    }
     275
     276
     277    protected void load_collection_configs(TreeSet data, File collect_directory) {
     278
    271279        File[] collection_folders = collect_directory.listFiles();
     280
    272281        for(int i = 0; i < collection_folders.length; i++) {
    273282        File collection_folder = collection_folders[i];
    274283        String collection_foldername = collection_folder.getName();
     284
    275285        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           
    278295            File config_file = new File(collection_folder, file_name);
    279296            File collection_metadata_directory = new File(collection_folder, "metadata");
    280297            if (collection_metadata_directory.exists() && config_file.exists()) {
    281298            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            }
    283309            }
    284310            config_file = null;
     
    290316        collect_directory = null;
    291317    }
     318
     319
    292320
    293321    public Object getElementAt(int index) {
Note: See TracChangeset for help on using the changeset viewer.