Changeset 6995


Ignore:
Timestamp:
2004-03-09T17:09:48+13:00 (20 years ago)
Author:
kjdon
Message:

added a new method clear[Plugin|Classifier]Cache which deletes the plugins/classifiers.dat file - allows for regenerating in a new language

Location:
trunk/gli/src/org/greenstone/gatherer/cdm
Files:
2 edited

Legend:

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

    r6992 r6995  
    116116    }
    117117
     118    public boolean clearClassifierCache() {
     119
     120    Gatherer.println("deleting classifiers.dat");
     121    File class_file = new File(Utility.BASE_DIR + "classifiers.dat");
     122    if (class_file.exists()) {
     123        return Utility.delete(class_file);
     124    }
     125    return true;
     126    }
    118127    /** Destructor.
    119128     * @see org.greenstone.gatherer.Gatherer
  • trunk/gli/src/org/greenstone/gatherer/cdm/PlugInManager.java

    r6992 r6995  
    101101    }
    102102
     103    public boolean clearPlugInCache() {
     104
     105    Gatherer.println("deleting plugins.dat");
     106    File plugin_file = new File(Utility.BASE_DIR + "plugins.dat");
     107    if (plugin_file.exists()) {
     108        return Utility.delete(plugin_file);
     109    }
     110    return true;
     111    }
    103112    /** Destructor. */
    104113    public void destroy() {
Note: See TracChangeset for help on using the changeset viewer.