Changeset 4573 for trunk/gli


Ignore:
Timestamp:
2003-06-11T15:52:43+12:00 (21 years ago)
Author:
kjdon
Message:

super collections: dont show the current coll in the list cos it is now automatically included

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/cdm/SuperCollectionManager.java

    r4495 r4573  
    4545    static final public String CCS_COMMAND = "ccs";
    4646
     47    private String current_coll_name = null;
    4748    private Control controls;
    4849    private ArrayList collection_checklist_model;
     
    5253    collection_checklist_model = new ArrayList();
    5354    File gsdl_collection_directory = new File(Utility.getCollectionDir(Gatherer.config.gsdl_path));
     55    current_coll_name = Gatherer.c_man.getCollection().getName();
    5456    File[] possible_collections = gsdl_collection_directory.listFiles();
    5557    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 list
     60        continue;
     61        }
    5662        // The simpliest case is if the directory etc/collect.cfg file and a metadata/ in it. Thus it can easily be built upon.
    5763        File collect_cfg_file = new File(possible_collections[i], Utility.CONFIG_DIR);
     
    135141        entry = null;
    136142    }
    137     command.append("\n");
    138     command.append("\n");
    139143    // It is possible that there were no entries in which case we return null.
    140144    if(found_entry) {
     145        // we need to add on the current collection
     146        command.append(" ");
     147        command.append(current_coll_name);
     148        command.append("\n");
     149        command.append("\n");
    141150        return command.toString();
    142151    }
     
    183192
    184193        CheckList collection_checklist = new CheckList(collection_checklist_model);
    185 
    186194        // Layout
    187195        //center_pane.setTopComponent(new JScrollPane(instructions));
Note: See TracChangeset for help on using the changeset viewer.