Changeset 5785


Ignore:
Timestamp:
2003-11-05T13:46:44+13:00 (20 years ago)
Author:
mdewsnip
Message:

Commented out about 60 unused functions.

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
36 edited

Legend:

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

    r5581 r5785  
    301301
    302302    /** Retrieve the value of the named property as a Dimension. */
    303     public Dimension getDimension(String property, boolean general) {
     303    /* private Dimension getDimension(String property, boolean general) {
    304304    Dimension result = new Dimension(100, 100); // Default
    305305    try {
     
    315315    }
    316316    return result;
    317     }
     317    } */
    318318
    319319    /** Retrieve the value of the named property as a FontUIResource. */
     
    512512
    513513    /** Set the named property, from the specified configuration, using the given Dimension value. */
    514     public void setDimension(String property, boolean general, Dimension value) {
     514    /* private void setDimension(String property, boolean general, Dimension value) {
    515515    StringBuffer text = new StringBuffer("");
    516516    text.append(value.width);
     
    518518    text.append(value.height);
    519519    setString(property, general, text.toString());
    520     }
     520    } */
    521521
    522522    /** Set the named property, from the specified configuration, using the given Font value. */
     
    541541
    542542    /** Set the named property, from the specified configuration, using the given integer value. */
    543     public void setInt(String property, boolean general, int value) {
     543    /* private void setInt(String property, boolean general, int value) {
    544544    setString(property, general, String.valueOf(value));
    545     }
     545    } */
    546546
    547547    /** Set the named property, from the specified configuration, using the given Locale value. */
  • trunk/gli/src/org/greenstone/gatherer/Dictionary.java

    r5597 r5785  
    205205
    206206    /** Remove the component from our registered components list. */
    207     public void deregister(Object component) {
     207    /* private void deregister(Object component) {
    208208    remove(component);
    209     }
     209    } */
    210210
    211211    public void destroy() {
  • trunk/gli/src/org/greenstone/gatherer/Gatherer.java

    r5593 r5785  
    386386     * @see org.greenstone.gatherer.gui.GUIManager
    387387     */
    388     public JFrame getFrame() {
     388    /* private JFrame getFrame() {
    389389    return g_man;
    390     }
     390    } */
    391391
    392392    /** Method to retrieve a reference to the metadata set manager class. This is then used to create the 'metadataset' commands in the collection configuration file.
     
    394394     * @see org.greenstone.gatherer.collection.CollectionManager
    395395     */
    396     public MetadataSetManager getMSM() {
     396    /* private MetadataSetManager getMSM() {
    397397    if(c_man != null && c_man.getCollection() != null && c_man.getCollection().msm != null) {
    398398        return c_man.getCollection().msm;
    399399    }
    400400    return null;
    401     }
     401    } */
    402402
    403403    /** Used to 'spawn' a new child application when a file is double clicked.
     
    658658     * @see javax.swing.UIManager
    659659     */
    660     static public void setUIFont (FontUIResource f, FontUIResource ttf){
     660    static private void setUIFont(FontUIResource f, FontUIResource ttf) {
    661661    // sets the default font for all Swing components.
    662662    // ex.
     
    672672    // Now set the tooltip font to some fixed width font
    673673    UIManager.put("ToolTip.font", ttf);
    674     }
     674    }
    675675
    676676    /** Loads the configuration file if one exists. Otherwise it creates a new one. Currently uses serialization.
  • trunk/gli/src/org/greenstone/gatherer/WGet.java

    r5581 r5785  
    115115     * harvested.
    116116     */
    117     public void convertLinks() {
     117    /* private void convertLinks() {
    118118    Vector args = new Vector();
    119119    Vector files = new Vector();
     
    124124    args.add("debug.txt");
    125125    args.add("-P");
    126     args.add("/tmp/");
     126    args.add("/tmp/"); */
    127127
    128128    // Downloaded urls (two entries for each record). The pattern here is:
     
    160160    //wren(args.size(), args.toArray(), urls.size(), urls.toArray(),
    161161    //      files.size(), files.toArray());
    162     }
     162    /* } */
    163163
    164164    /** This method is called to delete a certain job from the queue.
  • trunk/gli/src/org/greenstone/gatherer/cdm/Classifier.java

    r5590 r5785  
    279279    }
    280280
    281     public String getOldPositionString() {
     281    /* private String getOldPositionString() {
    282282    return old_position_string;
    283     }
     283    } */
    284284
    285285    /** Generate the string showing this classifiers position. */
  • trunk/gli/src/org/greenstone/gatherer/cdm/CollectionDesignManager.java

    r5649 r5785  
    160160     * @return The files absolute path as a <strong>String</strong>.
    161161     */
    162     public String getFilename() {
     162    /* private String getFilename() {
    163163    return collect_config.getFile().getAbsolutePath();
    164     }
     164    } */
    165165
    166166    /** Cause the current collection configuration to be written out to disk.
  • trunk/gli/src/org/greenstone/gatherer/cdm/CommandTokenizer.java

    r5590 r5785  
    6767    }
    6868
    69     public int getLastType() {
     69    /* private int getLastType() {
    7070    return last_type;
    71     }
     71    } */
    7272
    73     public boolean isComment() {
     73    /* private boolean isComment() {
    7474    return (last_type == DOUBLE_QUOTE_ENCLOSED || last_type == QUOTE_ENCLOSED);
    75     }
     75    } */
    7676
    7777    /** Method to retrieve the next token from the command, taking care to group tokens enclosed in speech marks.
  • trunk/gli/src/org/greenstone/gatherer/cdm/DynamicListModel.java

    r5590 r5785  
    9191    }
    9292
    93     public DynamicListModel shallowCopy() {
     93    /* private DynamicListModel shallowCopy() {
    9494    DynamicListModel copy = new DynamicListModel();
    9595    copy.setAutoOrder(auto_order);
     
    9898    }
    9999    return copy;
    100     }
     100    } */
    101101
    102102    public Object getSelectedItem() {
  • trunk/gli/src/org/greenstone/gatherer/cdm/LanguageManager.java

    r5754 r5785  
    142142     * @return A <strong>Language</strong> containing a two letter code.
    143143     */
    144     public Language getDefaultLanguage() {
     144    /* private Language getDefaultLanguage() {
    145145    // If no default is set...
    146146    if(default_language != null && default_language.isAssigned()) {
     
    148148    }
    149149    return null;
    150     }
     150    } */
    151151
    152152    /** Method to retrieve a certain language object by its code.
  • trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionIndexManager.java

    r5590 r5785  
    9999     * @return the default Index, or null if no such index assigned
    100100     */
    101     public SubcollectionIndex getDefaultSubcollectionIndex() {
     101    /* private SubcollectionIndex getDefaultSubcollectionIndex() {
    102102    if(default_index != null && default_index.isAssigned()) {
    103103        return default_index;
     
    106106        return null;
    107107    }
    108     }
     108    } */
    109109
    110110    /** Retrieve a certain subindex given its name.
  • trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionManager.java

    r5593 r5785  
    132132     * @return an ArrayList of subcollections
    133133     */
    134     public ArrayList getSubcollections() {
     134    /* private ArrayList getSubcollections() {
    135135    return children();
    136     }
     136    } */
    137137
    138138    /** Method to remove the given subcollection.
  • trunk/gli/src/org/greenstone/gatherer/collection/Collection.java

    r5721 r5785  
    189189     * @return The <strong>File</strong> this name maps to, or <i>null</i> if no such mapping.
    190190     */
    191     public File getDirectoryMapping(String name) {
     191    /* private File getDirectoryMapping(String name) {
    192192    File result = null;
    193193    try {
     
    213213    }
    214214    return result;
    215     }
     215    } */
    216216    /** Retrieve the special directory mappings associated with this collection.
    217217     * @return A <strong>HashMap</strong> containing mappings from names to directories.
     
    250250    }
    251251    /** Counts the number of folders used in the current record set. */
    252     public int getFolderCount() {
     252    /* private int getFolderCount() {
    253253    return getCount((TreeNode)Gatherer.c_man.getRecordSet().getRoot(), true, false);
    254     }
     254    } */
    255255    /** Determine if this collection has had an import action run upon it since the last major change.
    256256     * @return <i>true</i> if an import has occured, <i>false</i> otherwise.
    257257     */
    258     public boolean getImported() {
     258    /* private boolean getImported() {
    259259    return get(IMPORTED);
    260     }
     260    } */
    261261    /** Retrieve the short name for this collection.
    262262     * @return The name as a <strong>String</strong>.
  • trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java

    r5761 r5785  
    462462     * @see org.greenstone.gatherer.collection.Collection
    463463     */
    464     public BuildOptions getBuildOptions() {
     464    /* private BuildOptions getBuildOptions() {
    465465    return collection.build_options;
    466     }
     466    } */
    467467
    468468    /** Retrieve the current collection.
     
    589589     * @see org.greenstone.gatherer.collection.Collection
    590590     */
    591     public String getCollectionTitle() {
     591    /* private String getCollectionTitle() {
    592592    if(collection != null) {
    593593        return collection.getTitle();
    594594    }
    595595    return Dictionary.get("Collection.No_Collection");
    596     }
     596    } */
    597597
    598598    /** Retrieve the record set (tree model) associated with the current collection. */
     
    11101110
    11111111    /** Updates the given workspace tree model to reference the private cache of the currently loaded collection. */
    1112     public void updatePrivateWorkspace(DefaultTreeModel model) {
     1112    /* private void updatePrivateWorkspace(DefaultTreeModel model) {
    11131113    // Add Private workspace if a collection has been loaded.
    11141114    if(ready() && !Gatherer.config.get("workflow.mirror", true)) {
     
    11211121        model.insertNodeInto(private_workspace, root, 2);
    11221122    }
    1123     }
     1123    } */
    11241124    /** Called whenever the value tree of an metadata element changes in some way, such as the addition of a new value. We want to mark the collection so that it needs saving again.
    11251125     * @param event A <strong>MSMEvent</strong> containing details of the event that caused this message to be fired.
  • trunk/gli/src/org/greenstone/gatherer/collection/Job.java

    r5593 r5785  
    478478     * @return A String representing the currently downloading url.
    479479     */
    480     public String getCurrent() {
     480    /* private String getCurrent() {
    481481    return current_url;
    482     }
     482    } */
    483483
    484484    /**
  • trunk/gli/src/org/greenstone/gatherer/file/FileNode.java

    r5593 r5785  
    341341    }
    342342
    343     public void setChildrenReadOnly(boolean children_readonly) {
     343    /* private void setChildrenReadOnly(boolean children_readonly) {
    344344    this.children_readonly = children_readonly;
    345     }
     345    } */
    346346
    347347    public void setFile(File file) {
  • trunk/gli/src/org/greenstone/gatherer/file/FileQueue.java

    r5751 r5785  
    626626     * @param wait_allowed The new state of the wait_allowed flag, as a boolean.
    627627     */
    628     public void setWaitAllowed(boolean wait_allowed) {
     628    /* private void setWaitAllowed(boolean wait_allowed) {
    629629    this.wait_allowed = wait_allowed;
    630     }
     630    } */
    631631    /** Restore the progress bar so that it updates normally.
    632632     * @see org.greenstone.gatherer.gui.LongProgressBar
    633633     */
    634     synchronized public void unpause() {
     634    /* synchronized private void unpause() {
    635635    progress.setIndeterminate(false);
    636636    if(previous != null) {
     
    638638        previous = null;
    639639    }
    640     }
     640    } */
    641641    /** Called when the user makes some selection in one of the trees we are listening to. From this we update the status details. */
    642642    public void valueChanged(TreeSelectionEvent event) {
  • trunk/gli/src/org/greenstone/gatherer/file/FileSystemModel.java

    r5593 r5785  
    196196    }
    197197
    198     public void setPermanentFilter(String pattern) {
     198    /* private void setPermanentFilter(String pattern) {
    199199    if(pattern != null) {
    200200        FileFilter new_filter = new FileFilter(pattern, false);
     
    206206    }
    207207    filters = null;
    208     }
     208    } */
    209209
    210210    public void setTree(DragTree tree) {
  • trunk/gli/src/org/greenstone/gatherer/gui/CreatePane.java

    r5593 r5785  
    317317     * @return The build <strong>GShellProgressMonitor</strong>.
    318318     */
    319     public GShellProgressMonitor getBuildProgress() {
     319    /* private GShellProgressMonitor getBuildProgress() {
    320320    return build_monitor;
    321     }
     321    } */
    322322
    323323    /** Method to acquire the progress monitor associated with copying.
    324324     * @return The copying <strong>GShellProgressMonitor</strong>.
    325325     */
    326     public GShellProgressMonitor getCopyProgress() {
     326    /* private GShellProgressMonitor getCopyProgress() {
    327327    return copy_monitor;
    328     }
     328    } */
    329329
    330330    /** Method to acquire the progress monitor associated with import.
    331331     * @return The import <strong>GShellProgressMonitor</strong>.
    332332     */
    333     public GShellProgressMonitor getImportProgress() {
     333    /* private GShellProgressMonitor getImportProgress() {
    334334    return import_monitor;
    335     }
     335    } */
    336336
    337337    /** We are informed when this view pane loses focus so we can update build options. */
  • trunk/gli/src/org/greenstone/gatherer/gui/LongProgressBar.java

    r5589 r5785  
    8585    }
    8686
    87     public void refreshString() {
     87    /* private void refreshString() {
    8888    safeSetString(previous + "%");
    89     }
     89    } */
    9090
    9191    public void reset() {
  • trunk/gli/src/org/greenstone/gatherer/gui/MenuBar.java

    r5593 r5785  
    382382
    383383    /** Set the enabled state of one of the help menu items, based on its 'tabs' current state. Note that this method should only be called from the AWTEvent thread. */
    384     public void tabEnabled(int tab_index, boolean state) {
     384    /* private void tabEnabled(int tab_index, boolean state) {
    385385    JMenuItem selected = help.getItem(tab_index + 2); // Remember general and separator items
    386386    selected.setEnabled(state);
    387     }
     387    } */
    388388
    389389    /** In order to provide context aware help advice we keep track of which
  • trunk/gli/src/org/greenstone/gatherer/gui/SmarterTextArea.java

    r5589 r5785  
    6363
    6464    /** we want to be able to set the text without the user being able to */
    65     public void systemSetText(String text) {
     65    /* private void systemSetText(String text) {
    6666    init = true;
    6767    setText(text);
    6868    init = false;
    69     }
     69    } */
    7070
    7171    private class UnchangingDocument
  • trunk/gli/src/org/greenstone/gatherer/msm/MSMAction.java

    r5589 r5785  
    127127     * @return A <strong>String</strong> stating the fully qualified name of the target element, within the namespace of one of the currently loaded metadata sets.
    128128     */
    129     public String getTarget() {
     129    /* private String getTarget() {
    130130    return target;
    131     }
    132     public boolean isHFile() {
     131    } */
     132    /* private boolean isHFile() {
    133133    return hfile;
    134     }
     134    } */
    135135}
  • trunk/gli/src/org/greenstone/gatherer/msm/MSMEvent.java

    r5589 r5785  
    149149    return new_metadata;
    150150    }
    151     public GValueModel getNewModel() {
     151    /* private GValueModel getNewModel() {
    152152    return new_model;
    153     }
     153    } */
    154154    /** Method to retrieve the old metadata associated with this event.
    155155     * @return A <strong>Metadata</strong>, or <i>null</i> if there is none.
     
    158158    return old_metadata;
    159159    }
    160     public GValueModel getOldModel() {
     160    /* private GValueModel getOldModel() {
    161161    return old_model;
    162     }
     162    } */
    163163    /** Method to retrieve of the profile associated with this event.
    164164     * @return A <strong>MSMAction</strong> which details the action profile, or <i>null</i> if no profile exists.
    165165     */
    166     public MSMAction getProfile() {
     166    /* private MSMAction getProfile() {
    167167    return profile;
    168     }
     168    } */
    169169    /** Retrieve the record associated with this event. */
    170170    public FileNode getRecord() {
  • trunk/gli/src/org/greenstone/gatherer/msm/MSMPrompt.java

    r5777 r5785  
    861861     * @return The metadata set the user has selected or null if no set selected.
    862862     */
    863     final public MetadataSet selectSet(String name) {
     863    /* final private MetadataSet selectSet(String name) {
    864864    String args[] = new String[1];
    865865    args[0] = name;
     
    941941    dialog = null;
    942942    return null;
    943     }
     943    } */
    944944
    945945    private class AddListener
  • trunk/gli/src/org/greenstone/gatherer/msm/MSMUtils.java

    r5747 r5785  
    147147     * @return <i>true</i> if the path was found (including matching #text elements at the leaf), or <i>false</i> otherwise.
    148148     */
    149     static final public boolean containsPath(Node tree, Node path[]) {
     149    /* static final private boolean containsPath(Node tree, Node path[]) {
    150150    // If there is no tree then there are no values.
    151151    if(tree == null) {
     
    177177    }
    178178    return false;       
    179     }
     179    } */
    180180    /** Method to compare two metadata elements (of type Element, which is bound to get more than a bit confusing) for equality. This test may only check the structural (ie pretty much unchanging) consistancy, or may include the AssignedValue tree as well (which will be different for each collection I'd imagine).
    181181     * @param a_set The <strong>MetadataSet</strong> a comes from.
     
    390390     * @return The pattern as a String.
    391391     */
    392     static final public String getFileNamePattern(Node fileset) {
     392    /* static final private String getFileNamePattern(Node fileset) {
    393393    // Locate the child node called filename
    394394    for(Node child = fileset.getFirstChild(); child != null; child = child.getNextSibling()) {
     
    399399    }         
    400400    return null;
    401     }
     401    } */
    402402
    403403    /*************************************************************************/
     
    406406     * @return A fully qualified identifier as a <strong>String</strong>
    407407     */
    408     static final public String getFullIdentifier(Node element, String namespace) {
     408    /* static final private String getFullIdentifier(Node element, String namespace) {
    409409    StringBuffer identifier_buffer = new StringBuffer();
    410410    if(element == null) {
     
    438438    namespace = null;
    439439    return identifier_buffer.toString();
    440     } // static public String getFullIdentier(Node element)
     440    } */
    441441
    442442    /*************************************************************************/
     
    530530     * @return The description node or null if no such node.
    531531     */
    532     static final public Node getMetadataDescription(Node fileset) {
     532    /* static final private Node getMetadataDescription(Node fileset) {
    533533    // Locate the child node called filename
    534534    for(Node child = fileset.getLastChild(); child != null; child = child.getPreviousSibling()) {
     
    538538    }         
    539539    return null;
    540     }
     540    } */
    541541
    542542    /** Method to retrieve from the node given, a certain child node with the specified name.
  • trunk/gli/src/org/greenstone/gatherer/msm/MetadataSet.java

    r5777 r5785  
    301301     * @return A <strong>String</strong> containing the address.
    302302     */
    303     public String getContact() {
     303    /* private String getContact() {
    304304    return root.getAttribute("contact");
    305     }
     305    } */
    306306    /** Method to retrieve the name of the creator of this metadata set.
    307307     * @return A <strong>String</strong> containing the name.
  • trunk/gli/src/org/greenstone/gatherer/msm/MetadataSetManager.java

    r5748 r5785  
    466466     * @return A NodeList[] of metadata elements.
    467467     */
    468     public NodeList[] getNodeLists() {
     468    /* private NodeList[] getNodeLists() {
    469469    NodeList elements[] = null;
    470470    int index = 0;
     
    478478    }
    479479    return elements;
    480     }
     480    } */
    481481
    482482    /** Retrieve the named metadata set.
     
    930930     * @param new_name The String to use as the new name.
    931931     */
    932     public void renameElement(ElementWrapper element, String new_name) {
     932    /* private void renameElement(ElementWrapper element, String new_name) {
    933933    Element e = element.getElement();
    934934    String old_name = element.toString();
     
    937937    old_name = null;
    938938    e = null;
    939     }
     939    } */
    940940    /** A method to save the state of this metadata set manager. First we ensure that the names of all included metadata sets have been added to the collection configuration file, then all of the metadata sets contained are exported with full content to the collect/<col_name>/metadata/ directory.
    941941     */
  • trunk/gli/src/org/greenstone/gatherer/shell/GShell.java

    r5593 r5785  
    115115     * @param listener The <i>GShellListener</i> to be removed.
    116116     */
    117     public void removeGShellListener(GShellListener listener) {
     117    /* private void removeGShellListener(GShellListener listener) {
    118118    listeners.remove(GShellListener.class, listener);
    119     }
     119    } */
    120120    /** Any threaded class must include this method to allow the thread body to be run. */
    121121    public void run() {
  • trunk/gli/src/org/greenstone/gatherer/undo/UndoManager.java

    r5589 r5785  
    260260    }
    261261
    262     public void fileDeleted(long id, DragComponent source_model, FileNode source_parent, FileNode target_parent, FileNode record, boolean undo_event) {
     262    /* private void fileDeleted(long id, DragComponent source_model, FileNode source_parent, FileNode target_parent, FileNode record, boolean undo_event) {
    263263    UndoJob job = new UndoJob(id, source_model, source_parent, this, record, FILE_DELETE);
    264264    if(undo_event) {
     
    270270        redo.push(job);
    271271    }
    272     }
     272    } */
    273273
    274274    public void fileMoved(long id, DragComponent source_model, FileNode source_parent, DragComponent target_model, FileNode target_parent, FileNode record, boolean undo_event) {
     
    339339    }
    340340
    341     static final public File generateUniqueFile(FileNode record) {
     341    /* static final private File generateUniqueFile(FileNode record) {
    342342    String filename_raw = ArrayTools.objectArrayToString(record.getPath());
    343343    int hash_code = filename_raw.hashCode();
     
    349349    }
    350350    return file;
    351     }
     351    } */
    352352
    353353    private void showTree() {
  • trunk/gli/src/org/greenstone/gatherer/util/ArrayTools.java

    r5581 r5785  
    181181     * @return The same <strong>FileNode[]</strong> sans its head element.
    182182     */
    183     static final public FileNode[] tail(FileNode a[]) {
     183    /* static final private FileNode[] tail(FileNode a[]) {
    184184    if(a.length == 1) {
    185185        return null;
     
    188188    System.arraycopy(a, 1, b, 0, b.length);
    189189    return b;
    190     }
     190    } */
    191191     
    192192    /** Append a Metadata object onto an array of Metadata objects. */
  • trunk/gli/src/org/greenstone/gatherer/util/GURL.java

    r5581 r5785  
    124124    }
    125125
    126     public String getLocalFile() {
     126    /* private String getLocalFile() {
    127127    String local_file = getPath() + File.separator + getFile();
    128128    // Strip msdos roots if they're still there.
     
    131131    }
    132132    return local_file;
    133     }
     133    } */
    134134
    135135    public String getPath() {
  • trunk/gli/src/org/greenstone/gatherer/util/HTMLStringTokenizer.java

    r5581 r5785  
    9696     * @return A <strong>String</strong> representing the token.
    9797     */
    98     public String sameToken() {
     98    /* private String sameToken() {
    9999    return previous;
    100     }
     100    } */
    101101    /** Parses the next token and stores it in current.
    102102     */
  • trunk/gli/src/org/greenstone/gatherer/util/HashMap3D.java

    r5581 r5785  
    124124     * @return The first unique instance of the target <strong>Metadata</strong> which may in fact be the same metadata given as a paramater.
    125125     */
    126     public Metadata locate(Metadata metadata) {
     126    /* private Metadata locate(Metadata metadata) {
    127127    Metadata result = null;
    128128    if(metadata != null) {
     
    146146    }
    147147    return result;
    148     }
     148    } */
    149149    /** Put an entry into this three dimensional hash mapping.
    150150     * @param key_one The first key, to store this value under, as an <strong>Object</strong>.
  • trunk/gli/src/org/greenstone/gatherer/util/Utility.java

    r5771 r5785  
    160160    /** The image for a toggle button whose state is 'off'. */
    161161    static final public ImageIcon OFF_ICON = new ImageIcon(ClassLoader.getSystemResource("images/cross.gif"));
    162     /** Method to turn a file from with the system file tree into a tree path for insertion into a tree.
    163      * @param file The <strong>File</strong> whose tree path you are attempting to discover.
    164      * @param in_col A <i>boolean</i> indicating whether we are looking for a file within a collection of not. If <i>true</i> then the tree paths head in the collection name, and no element in the path refers to the import directory. Otherwise the paths head will be one of the system roots and all traversed file locations will exist in the path.
    165      * @return A <strong>TreePath</strong> which traverses the file system tree to the specified file.
    166      */
    167     public static TreePath createTreePath(File file, boolean in_col) {
    168     TreePath path = null;
    169     // Get the absolute path of the file.
    170     String abs_path = file.getAbsolutePath();
    171     while(file != null) {
    172         // If we are looking for a node within our collection, we expect
    173         // its path from root to be <col_name>/... without any higher
    174         // details and without gimport. So if we encounter a gimport we
    175         // skip to its parent, add that, then return.
    176         if(in_col && file.getName().equals("gimport")) {
    177         file = file.getParentFile();
    178         if(path == null) {
    179             path = new TreePath(file.getName());
    180         }
    181         else {
    182             path = path.pathByAddingChild(file.getName());
    183         }
    184         file = null;
    185         }
    186         else {
    187         if(path == null) {
    188             path = new TreePath(file.getName());
    189         }
    190         else {
    191             path = path.pathByAddingChild(file.getName());
    192         }
    193         file = file.getParentFile();
    194         }
    195     }
    196     // Unfortunately we've created the path in reverse order so we have to
    197     // reverse it.
    198     Object temp[] = new Object[path.getPathCount()];
    199     for(int i = 0; i < temp.length; i++) {
    200         temp[(temp.length - 1) - i] = path.getPathComponent(i);
    201     }
    202     return new TreePath(temp);
    203     }
    204162
    205163    /** Decodes a string of text so its safe to use in a Greenstone configuration file. Esentially replaces "\n" with a newline.
     
    221179     * @return The decoded <strong>String</strong>.
    222180     */
    223     public static String decodeString(String encoded) {
     181    /* private static String decodeString(String encoded) {
    224182    String decoded = "";
    225183    for(int i = 0; i < encoded.length(); i++) {
     
    239197    }
    240198    return decoded;
    241     }
     199    } */
    242200    /** It turns out that in Java you have to make sure a directory is empty before you delete it (much like unix I suppose), and so just like unix I'll have to set up a recursive delete function.
    243201     * @param file The <strong>File</strong> you want to delete.
     
    260218    }
    261219
    262     static public String encodeGreenstone(String raw) {
     220    /* static private String encodeGreenstone(String raw) {
    263221    raw = raw.replaceAll("<", "&lt;");
    264222    raw = raw.replaceAll(">", "&gt;");
    265223    raw = raw.replaceAll("\n", "\\\\n");
    266224    return raw;
    267     }
     225    } */
    268226
    269227    /** Using this method we can request that a certain document be written, as valid XML, to a certain output stream. This makes use of the Xerces Serialization suite, which should in no way be confused with the usual method of Serialization used by Java. */
     
    578536     * @return A <strong>String</strong> representation of the mirroring depth padded to length characters.
    579537     */
    580     public static String getDepthString(int length) {
     538    /* private static String getDepthString(int length) {
    581539    return pad("" + Gatherer.self.config.getInt("mirroring.depth", false), length);
    582     }
     540    } */
    583541    /** Method which constructs the etc directory given a certain collection.
    584542     * @param col_dir The location of the collection directory as a <strong>String</strong>.
     
    646604
    647605
    648     static public File getRecycleDirectory() {
     606    /* static private File getRecycleDirectory() {
    649607    return new File(RECYCLE);
    650     }
     608    } */
    651609
    652610    /** Determine whether a character is a hexidecimal one.
     
    900858     * @return A filtered <strong>File[]</strong> containing only those drives that are accessible and/or are floppy-disk media drives.
    901859     */
    902     public static File[] validateDrives(File roots[]) {
     860    /* private static File[] validateDrives(File roots[]) {
    903861    Vector valid = new Vector();
    904862    for(int i = 0; i < roots.length; i++) {
     
    914872    }
    915873    return roots;
    916     }
     874    } */
    917875}
  • trunk/gli/src/org/greenstone/gatherer/valuetree/GValueModel.java

    r5671 r5785  
    253253     * this value in.
    254254     */
    255     public GValueNode updateValue(String new_value, String old_value, GValueNode subject) {
     255    /* private GValueNode updateValue(String new_value, String old_value, GValueNode subject) {
    256256    return addValue(new_value, subject, null);
    257     }
     257    } */
    258258
    259259    private GValueModel copy() {
  • trunk/gli/src/org/greenstone/gatherer/valuetree/GValueNode.java

    r5672 r5785  
    9292     * @return <i>true</i> if there is a matching child node, <i>false</i> otherwise.
    9393     */
    94     public boolean containsValue(String value) {
     94    /* private boolean containsValue(String value) {
    9595    if(default_value != null) {
    9696        return false;
    9797    }
    9898    return getValue(value) != null;
    99     }
     99    } */
    100100
    101101    /** Returns an enumeration of the child nodes.
Note: See TracChangeset for help on using the changeset viewer.