Changeset 8002


Ignore:
Timestamp:
2004-08-19T15:07:52+12:00 (20 years ago)
Author:
mdewsnip
Message:

Tightened up many public functions to private.

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

Legend:

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

    r7996 r8002  
    9090     * @see org.greenstone.gatherer.cdm.DynamicListModel
    9191     */
    92     public void addClassifier(Classifier classifier) {
     92    private void addClassifier(Classifier classifier) {
    9393    if(!library.contains(classifier)) {
    9494        library.add(classifier);
     
    100100     * @see org.greenstone.gatherer.cdm.DynamicListModel
    101101     */
    102     public void assignClassifier(Classifier classifier) {
     102    private void assignClassifier(Classifier classifier) {
    103103    if(!contains(classifier)) {
    104104        Element element = classifier.getElement();
     
    199199     * @param all true to move to move all the way, false for a single step.
    200200     */
    201     public void moveClassifier(Classifier classifier, boolean direction, boolean all) {
     201    private void moveClassifier(Classifier classifier, boolean direction, boolean all) {
    202202    if(getSize() < 2) {
    203203        Gatherer.println("Not enough classifiers to allow moving.");
     
    260260     * @see org.greenstone.gatherer.cdm.DynamicListModel
    261261     */
    262     public void removeClassifier(Classifier classifier) {
     262    private void removeClassifier(Classifier classifier) {
    263263    remove(classifier);
    264264    Gatherer.c_man.configurationChanged();
     
    268268     * @see org.greenstone.gatherer.util.Utility
    269269     */
    270     public void saveClassifiers() {
     270    private void saveClassifiers() {
    271271    try {
    272272        FileOutputStream file = new FileOutputStream(Utility.BASE_DIR + "classifiers.dat");
  • trunk/gli/src/org/greenstone/gatherer/cdm/CollectionDesignManager.java

    r7739 r8002  
    111111     * @see org.greenstone.gatherer.cdm.TranslationView
    112112     */
    113     public void loadDesignDetails() {
     113    private void loadDesignDetails() {
    114114    // Create the command information managers, registering the config file with each as necessary
    115115    language_manager = new LanguageManager(collect_config.getLanguages());
  • trunk/gli/src/org/greenstone/gatherer/cdm/FormatManager.java

    r7597 r8002  
    108108     * @param format The <strong>Format</strong> to add.
    109109     */
    110     public void addFormat(Format format) {
     110    private void addFormat(Format format) {
    111111    if(!contains(format)) {
    112112        Element element = format.getElement();
     
    134134     * @param index The location of the desired format, as an <i>int</i>.
    135135     */
    136     public Format getFormat(int index) {
     136    private Format getFormat(int index) {
    137137    Format result = null;
    138138    if(0 < index && index < getSize()) {
     
    142142    }
    143143
    144     public Format getFormat(String name) {
     144    private Format getFormat(String name) {
    145145    int model_size = getSize();
    146146    for(int index = 0; index < model_size; index++) {
     
    166166     * @param format The <strong>Format</strong> to remove.
    167167     */
    168     public void removeFormat(Format format) {
     168    private void removeFormat(Format format) {
    169169    remove(format);
    170170    Gatherer.c_man.configurationChanged();
  • trunk/gli/src/org/greenstone/gatherer/cdm/IndexManager.java

    r7995 r8002  
    8888     * @see org.greenstone.gatherer.collection.CollectionManager
    8989     */
    90     public void addIndex(Index index, CollectionMeta metadatum) {
     90    private void addIndex(Index index, CollectionMeta metadatum) {
    9191    ///ystem.err.println("Adding an index: " + index.toString());
    9292    if(!contains(index)) {
     
    111111    }
    112112
    113     public void addLevel(Level level, CollectionMeta metadatum) {
     113    private void addLevel(Level level, CollectionMeta metadatum) {
    114114    if(!levels_model.contains(level)) {
    115115        CollectionDesignManager.collectionmeta_manager.addMetadatum(metadatum);
     
    202202    }
    203203
    204     public void moveIndex(Index index, boolean move_up) {
     204    private void moveIndex(Index index, boolean move_up) {
    205205    // Determine the indexes current position
    206206    int position = indexOf(index);
     
    232232    }
    233233
    234     public void moveLevel(Level level, boolean move_up) {
     234    private void moveLevel(Level level, boolean move_up) {
    235235    // Determine the leveles current position
    236236    int position = levels_model.indexOf(level);
     
    269269     * @see org.greenstone.gatherer.collection.CollectionManager
    270270     */
    271     public void removeIndex(Index index) {
     271    private void removeIndex(Index index) {
    272272    if(index != null) {
    273273        // Remove any current metadata from this index
     
    291291    }
    292292
    293     public void removeLevel(Level level) {
     293    private void removeLevel(Level level) {
    294294    if(level != null) {
    295295        // Remove any current metadata from this level
  • trunk/gli/src/org/greenstone/gatherer/cdm/LanguageManager.java

    r7157 r8002  
    127127     * @see org.greenstone.gatherer.collection.CollectionManager
    128128     */
    129     public void addLanguage(Language language) {
     129    private void addLanguage(Language language) {
    130130    if(!contains(language)) {
    131131        Element element = language.getElement();
     
    201201     * @see org.greenstone.gatherer.collection.CollectionManager
    202202     */
    203     public void removeLanguage(Language language) {
     203    private void removeLanguage(Language language) {
    204204    remove(language);
    205205    if(default_language != null && default_language.equals(language)) {
  • trunk/gli/src/org/greenstone/gatherer/cdm/PlugInManager.java

    r7959 r8002  
    8181     * @param plugin the new base PlugIn
    8282     */
    83     public void addPlugIn(PlugIn plugin) {
    84     if(!library.contains(plugin)) {
    85         library.add(plugin);
    86     }
     83    private void addPlugIn(PlugIn plugin) {
     84    if(!library.contains(plugin)) {
     85        library.add(plugin);
     86    }
    8787    }
    8888
     
    9090     * @param plugin the PlugIn to assign
    9191     */
    92     public void assignPlugIn(PlugIn plugin) {
     92    private void assignPlugIn(PlugIn plugin) {
    9393    if(plugin.getName().equals(StaticStrings.RECPLUG_STR) || plugin.getName().equals(StaticStrings.ARCPLUG_STR)) {
    9494        addAfter(plugin, separator_plugin); // Adds after separator
     
    171171     */
    172172    // why are all the error notices there when the buttons are disabled is you cant move???
    173     public void movePlugIn(PlugIn plugin, boolean direction, boolean all) {
     173    private void movePlugIn(PlugIn plugin, boolean direction, boolean all) {
    174174    // Can't ever move RecPlug or ArcPlug
    175175    if(super.getSize() < 4) {
     
    274274     * @param plugin The <strong>PlugIn</strong> to remove.
    275275     */
    276     public void removePlugIn(PlugIn plugin) {
     276    private void removePlugIn(PlugIn plugin) {
    277277    remove(plugin);
    278278    Gatherer.c_man.configurationChanged();
     
    281281    /** Method to cache the current contents of library (known plugins) to file.
    282282     */
    283     public void savePlugIns() {
     283    private void savePlugIns() {
    284284    try {
    285285        FileOutputStream file = new FileOutputStream(Utility.BASE_DIR + "plugins.dat");
     
    296296     * @param modify_row_count true to hide the last three lines, false otherwise
    297297     */
    298     public void setHideLines(boolean modify_row_count) {
     298    private void setHideLines(boolean modify_row_count) {
    299299    this.modify_row_count = modify_row_count;
    300300    int original_size = super.getSize();
  • trunk/gli/src/org/greenstone/gatherer/cdm/SearchTypeManager.java

    r7996 r8002  
    6868    }
    6969
    70     public void addSearchType(SearchType searchtype) {
     70    private void addSearchType(SearchType searchtype) {
    7171    if(!contains(searchtype)) {
    7272        add(getSize(), searchtype);
     
    104104    }
    105105
    106     public void moveSearchType(SearchType search_type, boolean direction) {
     106    private void moveSearchType(SearchType search_type, boolean direction) {
    107107    // Try to move the classifier one step in the desired direction.
    108108    int index = indexOf(search_type);
     
    133133    }
    134134
    135     public void removeSearchType(SearchType searchtype) {
     135    private void removeSearchType(SearchType searchtype) {
    136136    if(contains(searchtype)) {
    137137        remove(searchtype);
  • trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionIndexManager.java

    r7996 r8002  
    7373     * @see org.greenstone.gatherer.collection.CollectionManager
    7474     */
    75     public void addSubcollectionIndex(SubcollectionIndex subindex) {
     75    private void addSubcollectionIndex(SubcollectionIndex subindex) {
    7676    if(!contains(subindex)) {
    7777        add(getSize(), subindex);
     
    112112     * @return the SubcollectionIndex requested or null if no such subindex
    113113     */
    114     public SubcollectionIndex getSubcollectionIndex(String id) {
     114    private SubcollectionIndex getSubcollectionIndex(String id) {
    115115    int size = getSize();
    116116    for(int i = 0; i < size; i++) {
     
    135135     * @see org.greenstone.gatherer.collection.CollectionManager
    136136     */
    137     public void removeSubcollectionIndex(SubcollectionIndex subindex) {
     137    private void removeSubcollectionIndex(SubcollectionIndex subindex) {
    138138    if(subindex != null) {
    139139        // Remove any current metadata from this index
     
    174174     * @see org.greenstone.gatherer.cdm.SubcollectionIndex
    175175     */
    176     public void setDefaultSubcollectionIndex(SubcollectionIndex index) {
     176    private void setDefaultSubcollectionIndex(SubcollectionIndex index) {
    177177    if(index != null) {
    178178        if(default_index == null) {
  • trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionManager.java

    r7995 r8002  
    8989     * @see org.greenstone.gatherer.collection.CollectionManager
    9090     */
    91     public void addSubcollection(Subcollection subcollection) {
     91    private void addSubcollection(Subcollection subcollection) {
    9292    if(!contains(subcollection)) {
    9393        Element element = subcollection.getElement();
     
    121121     * @return the requested Subcollection or null if no such subcollection exists.
    122122     */
    123     public Subcollection getSubcollection(String name) {
     123    private Subcollection getSubcollection(String name) {
    124124    Subcollection result = null;
    125125    int size = getSize();
     
    133133    }
    134134
    135     /** Method to get all of the subcollections defined.
    136      * @return an ArrayList of subcollections
    137      */
    138     /* private ArrayList getSubcollections() {
    139     return children();
    140     } */
    141135
    142136    /** Called when the detail mode has changed which in turn may cause several design elements to be available/hidden
     
    154148     * @see org.greenstone.gatherer.collection.CollectionManager
    155149     */
    156     public void removeSubcollection(Subcollection subcollection) {
     150    private void removeSubcollection(Subcollection subcollection) {
    157151    remove(subcollection);
    158152    Gatherer.c_man.configurationChanged();
    159153    }
    160154
    161     public void updateSubcollection(Subcollection subcollection, String name, boolean include, String source, String pattern, String flags) {
     155    private void updateSubcollection(Subcollection subcollection, String name, boolean include, String source, String pattern, String flags) {
    162156    subcollection.setFlags(flags);
    163157    subcollection.setInclusive(include);
  • trunk/gli/src/org/greenstone/gatherer/cdm/SuperCollectionManager.java

    r7326 r8002  
    7171    }
    7272
    73     public void addSuperCollection(SuperCollection supercollection) {
     73    private void addSuperCollection(SuperCollection supercollection) {
    7474    if(!contains(supercollection)) {
    7575        add(getSize(), supercollection);
     
    101101    }
    102102
    103     public void removeSuperCollection(SuperCollection supercollection) {
     103    private void removeSuperCollection(SuperCollection supercollection) {
    104104    remove(supercollection);
    105105    }
Note: See TracChangeset for help on using the changeset viewer.