Changeset 12095


Ignore:
Timestamp:
2006-07-07T13:17:52+12:00 (18 years ago)
Author:
kjdon
Message:

not sure what I've changed or why

File:
1 edited

Legend:

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

    r11046 r12095  
    6363    /** A list of formating strings to use at build time. */
    6464    static public FormatManager format_manager;
    65     /** The manager in charge of displaying this manager and the controls for other managers. */
     65    /** A manager of general options */
    6666    static public GeneralManager general_manager;
    67     /** List of indexes to be built, and the default index. */
    68     static public IndexManager index_manager;
     67    /** List of indexes to be built, and the default index.
     68     also handles build type and levels */
     69    static public IndexingManager index_manager;
    6970    /** Contains instructions dealing with the collection language. */
    7071    static public LanguageManager language_manager;
     72    /** Handling writing extra.dm file */
     73    static public MacrosManager macros_manager;
    7174    /** A simple manager for the visual review of metadata sets. */
    7275    static public MetadataSetView metadataset_view;
    7376    /** A list of plugins to use at build time. */
    7477    static public PluginManager plugin_manager;
    75     /** The manager in charge of all aspects of searchtypes. We also ask this manager whether we are MG or MGPP enabled. */
    76     static public SearchTypeManager searchtype_manager;
     78    /** a manager of searching metadata such as index names*/
     79    static public SearchMetadataManager searchmetadata_manager;
    7780    /** Contains: A list of subcollections, (defined on metadatadata), a list of which subcollection indexes to build and the default subcollection index. */
    7881    static public SubcollectionManager subcollection_manager;
     
    8285    static public SuperCollectionManager supercollection_manager; // Just cause I could ;p
    8386    /** The text translation manager. */
    84     static public TranslationView translation_view;
     87    static public TranslationView translation_manager;
    8588    /** These mark what needs to happen when building a collection where ONLY design options have been changed.
    8689        The build requirements of the higher numbers must include doing everything from the lower numbers. */
     
    119122     * @see org.greenstone.gatherer.cdm.MetadataSetView
    120123     * @see org.greenstone.gatherer.cdm.PluginManager
    121      * @see org.greenstone.gatherer.cdm.SearchTypeManager
    122124     * @see org.greenstone.gatherer.cdm.SubcollectionIndexManager
    123125     * @see org.greenstone.gatherer.cdm.SubcollectionManager
     
    131133    classifier_manager = new ClassifierManager();
    132134    general_manager = new GeneralManager();
    133 
    134     searchtype_manager = new SearchTypeManager(collect_config.getSearchType());
    135     if(searchtype_manager.isSearchTypeEnabled()) {
    136         // note this this could be lucene now, the format is the same as for mgpp
    137         index_manager = new IndexManager(collect_config.getMGPPIndexes());
    138     }
    139     else {
    140         index_manager = new IndexManager(collect_config.getMGIndexes());
    141     }
    142 
     135    macros_manager = new MacrosManager();
     136    index_manager = new IndexingManager();
    143137    metadataset_view = new MetadataSetView();
    144138    plugin_manager = new PluginManager();
     
    147141    subcollectionindex_manager = new SubcollectionIndexManager(collect_config.getSubIndexes());
    148142    supercollection_manager = new SuperCollectionManager(collect_config.getSuperCollection());
    149     translation_view = new TranslationView();
     143    searchmetadata_manager = new SearchMetadataManager();
     144    translation_manager = new TranslationView();
    150145    format_manager = new FormatManager(); // Parse formats at the very end, given that they depend upon several other managers to appear properly.
    151146    }
     
    154149     */
    155150    public void destroy() {
    156     // Remove visual the component from its parent.
    157     if(general_manager.getParent() != null) {
    158         general_manager.getParent().remove(general_manager);
    159     }
    160151    // Remove references from persistant listeners.
    161152    classifier_manager.destroy();
    162153    classifier_manager = null;
     154    searchmetadata_manager.destroy();
     155    searchmetadata_manager = null;
    163156    format_manager.destroy();
    164157    format_manager = null;
     
    177170    supercollection_manager.destroy();
    178171    supercollection_manager = null;
    179     translation_view.destroy();
    180     translation_view = null;
    181     }
    182 
    183     /** Display the GUI interface for the CollectionDesignManager in the centre of the indicated panel.
    184      * @param target the JPanel you wish to display the gui on
    185      */
    186     public void display(JPanel target) {
    187     target.add(general_manager, BorderLayout.CENTER);
    188     }
    189     /** When the tab on the JTabbedPane that contains the GUI is selected, this method is called to ensure that the controls are all up to date, in terms of references to metadata etc.
    190      */
    191     public void gainFocus() {
    192     general_manager.gainFocus();
     172    translation_manager.destroy();
     173    translation_manager = null;
    193174    }
    194175
     
    198179    public void modeChanged(int mode) {
    199180    plugin_manager.modeChanged(mode);
     181    classifier_manager.modeChanged(mode);
    200182    subcollection_manager.modeChanged(mode);
     183    supercollection_manager.modeChanged(mode);
     184    format_manager.modeChanged(mode);
     185    index_manager.modeChanged(mode);
     186    translation_manager.modeChanged(mode);
     187    metadataset_view.modeChanged(mode);
     188    general_manager.modeChanged(mode);
     189    language_manager.modeChanged(mode);
     190    searchmetadata_manager.modeChanged(mode);
    201191    }
    202192
     
    208198    }
    209199
    210     /** Ensure that saving will actually work. This can return false if there is a collection filename clash for instance. */
    211     public boolean canSave() {
    212     return (general_manager == null || general_manager.canSave());
    213     }
    214 
    215200
    216201    public void save() {
     
    221206    public void save(boolean force_save)
    222207    {
    223    
    224208    general_manager.loseFocus();
    225209    if (!update_collect_cfg_required && !force_save) {
     
    229213
    230214    DebugStream.println("Saving the collection config file");
    231    
    232215    // Release collection as necessary
    233216    String collection_name = Gatherer.c_man.getCollection().getName();
Note: See TracChangeset for help on using the changeset viewer.