Changeset 6582 for trunk/gli


Ignore:
Timestamp:
2004-01-22T13:54:55+13:00 (20 years ago)
Author:
jmt12
Message:

A whole bunch of files right in the middle of being edited because Michael is being awkward and expecting me to commit stuff regular like.

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

Legend:

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

    r6540 r6582  
    8282    /** The name of the general Gatherer configuration template. */
    8383    static final private String TEMPLATE_CONFIG_XML = "xml/config.xml";
    84     /** The first of two patterns used during tokenization, this pattern handles a comma separated list. */
     84    /** The first of three patterns used during tokenization, this pattern handles a comma separated list. */
    8585    static final private String TOKENIZER_PATTERN1 = " ,\n\t";
    86     /** The second of two patterns used during tokenization, this pattern handles an underscore separated list. */
     86    /** The second of three patterns used during tokenization, this pattern handles an underscore separated list. */
    8787    static final private String TOKENIZER_PATTERN2 = "_\n\t";
     88    /** The last of three patterns used during tokenization, this pattern handles an comma separated list containing spaces. */
     89    static final private String TOKENIZER_PATTERN3 = ",\n\t";
    8890
    8991    public File exec_file;
     
    183185    // Unix based systems. This one I know. Look for .gli/config.xml in the users home folder
    184186    else {
    185         user_config_xml = new File(System.getProperty("user.home") + File.separator + ".gli" + File.separator + CONFIG_XML);       
     187        user_config_xml = new File(Utility.getGLIUserFolder(), CONFIG_XML);     
    186188    }
    187189    if(user_config_xml != null && user_config_xml.exists()) {
     
    422424        String raw = getString(property, general);
    423425        // Font is a face, style, size triplet.
    424         StringTokenizer tokenizer = new StringTokenizer(raw, TOKENIZER_PATTERN1);
    425         String face = tokenizer.nextToken();
     426        StringTokenizer tokenizer = new StringTokenizer(raw, TOKENIZER_PATTERN3);
     427        String face = tokenizer.nextToken().trim();
     428        System.err.println("Face: " + face);
    426429        int style = Font.PLAIN;
    427430        String temp = tokenizer.nextToken().toUpperCase();
     
    432435        style = Font.ITALIC;
    433436        }
    434         int size = Integer.parseInt(tokenizer.nextToken());
     437        int size = Integer.parseInt(tokenizer.nextToken().trim());
    435438        result = new FontUIResource(face, style, size);
    436439    }
     
    575578    }
    576579
     580
     581    public String getWGetPath() {
     582    return "/usr/bin/wget";
     583    }
     584
    577585    /** Remove a previously defined special directory mapping.
    578586     * @param name The name of the mapping to remove as a <strong>String</strong>.
     
    613621        // Unix systems save user preferences in . folders in the home directory.
    614622        else {
    615         user_config_xml = new File(System.getProperty("user.home") + File.separator + ".gli" + File.separator + CONFIG_XML);
     623        user_config_xml = new File(Utility.getGLIUserFolder(), CONFIG_XML);
    616624        ///ystem.err.println("Trying to save to: " + user_config_xml.getAbsolutePath());
    617625        ///ystem.err.println("Writing.");
  • trunk/gli/src/org/greenstone/gatherer/WGet.java

    r5847 r6582  
    254254     * @see org.greenstone.gatherer.util.GURL
    255255     */
    256     public void newJob(/* TreeModel model, */ boolean overwrite, boolean no_parents, boolean other_hosts, boolean page_requisites, URL url, int depth, String destination) {
     256    public void newJob(boolean no_parents, boolean other_hosts, boolean page_requisites, URL url, int depth, String destination) {
    257257    // Create the job and fill in the details from gatherer.config.
    258258    Gatherer.println("About to create a new job");
     
    261261        destination = destination + url.getHost();
    262262    }
    263     Job new_job = new Job(/* model, */ overwrite, Gatherer.config.get("mirroring.debug", false), no_parents, other_hosts, page_requisites, Gatherer.config.get("mirroring.quiet", false), url, depth, destination, Gatherer.config.proxy_pass, Gatherer.config.proxy_user, this, simple);
     263    Job new_job = new Job(Gatherer.config.get("mirroring.debug", false), no_parents, other_hosts, page_requisites, Gatherer.config.get("mirroring.quiet", false), url, depth, destination, Gatherer.config.proxy_pass, Gatherer.config.proxy_user, this, simple);
    264264    // Add to job_queue job list.
    265265    job_queue.add(new_job);
  • trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java

    r6539 r6582  
    257257
    258258        String a_dir = Utility.getCollectionDir(Gatherer.config.gsdl_path) + name + File.separator;
    259 
    260         // ACTIVE_DIR/gcache/
    261         File gcache_dir_temp = new File(Utility.getCacheDir(a_dir)+"temp.dat");
    262         File gcache_dir = gcache_dir_temp.getParentFile();
    263         gcache_dir.mkdirs();
    264         if(progress != null) {
    265         progress.setNote(Dictionary.get("CollectionManager.Gcache_Created"));
    266         }
    267259
    268260        // ACTIVE_DIR/log/
     
    541533    return Utility.getBuildDir(Utility.getCollectionDir(Gatherer.config.gsdl_path) + collection.getName() + File.separator);
    542534    }
    543     /** Constructs the absolute filename of the collection cache directory, which should resemble "$GSDLHOME/collect/&lt;col_name&gt;/gcache/"
    544      * @return A <strong>String</strong> containing the filename.
    545      * @see org.greenstone.gatherer.Configuration
    546      * @see org.greenstone.gatherer.Gatherer
    547      * @see org.greenstone.gatherer.collection.Collection
    548      * @see org.greenstone.gatherer.util.Utility
    549      */
    550     public String getCollectionCache() {
    551     return Utility.getCacheDir(Utility.getCollectionDir(Gatherer.config.gsdl_path) + collection.getName() + File.separator);
    552     }
     535
    553536    /** Constructs the absolute filename of the collection config file, which should resemble "$GSDLHOME/collect/&lt;col_name&gt;/etc/collect.cfg"
    554537     * @return A <strong>String</strong> containing the filename.
     
    11111094            Gatherer.self.configServer(GSDLSiteConfig.ADD_COMMAND + collection.getName());
    11121095        }
     1096
     1097        // Fire a collection changed first to update the preview etc buttons
     1098        Gatherer.g_man.collectionChanged(ready());
     1099
     1100        // Now display a message dialog saying its all built
    11131101        WarningDialog collection_built_warning_dialog = new WarningDialog("warning.CollectionBuilt", false);
    11141102        collection_built_warning_dialog.setMessageOnly(true); // Not a warning
     
    11161104        collection_built_warning_dialog.dispose();
    11171105        collection_built_warning_dialog = null;
    1118         Gatherer.g_man.collectionChanged(ready());
    11191106        }
    11201107        else {
  • trunk/gli/src/org/greenstone/gatherer/collection/Job.java

    r5847 r6582  
    5555    implements ActionListener {
    5656     
    57     private boolean clobber;
    5857    private boolean debug;
    5958    private boolean higher_directories;
     
    9190    /**
    9291     */
    93     public Job(/* TreeModel model, */ boolean clobber, boolean debug, boolean no_parents, boolean other_hosts, boolean page_requisites, boolean quiet, URL initial, int depth, String destination, String proxy_pass, String proxy_user, WGet mummy, boolean simple) {
     92    public Job(boolean debug, boolean no_parents, boolean other_hosts, boolean page_requisites, boolean quiet, URL initial, int depth, String destination, String proxy_pass, String proxy_user, WGet mummy, boolean simple) {
    9493    // this.model = model;
    9594
    9695    this.debug = debug;
    97     this.clobber = clobber;
    9896    this.no_parents = no_parents;
    9997    this.other_hosts = other_hosts;
     
    181179
    182180    public void callWGet() {
    183     // Build parameter string
    184     String command = "wget ";
    185 
    186     // Parse arguments into array.
    187     // Always:
    188     // rewrite links to be local if possible - NOOOOOO,
    189     // output a debug file and debug messages,
    190     // run quietly.
    191     //command = command + "-k ";
    192 
     181    // Build parameter string. Note that we never clobber, and we continue if possible
     182    String command = Gatherer.config.getWGetPath() + " -nc -c ";
     183
     184    // Add the destination parameter
    193185    if(destination != null) {
    194186        command = command + "-P " + destination + " ";
     
    205197        // Recursion to the specified depth.
    206198        command = command + "-r -l" + depth + " ";
    207     }
    208 
    209     if(!clobber || previous_state == Job.PAUSED) {
    210         command = command + "-nc -c ";
    211199    }
    212200
     
    236224        }
    237225    }
    238          
     226       
     227    // The user can either choose to mirror all of the page requisites...
    239228    if(page_requisites) {
    240229        command = command + "-p ";
     230    }
     231    // or not. In which case we ensure links are rewritten.
     232    else {
    241233    }
    242234
     
    407399    }
    408400
    409     if(!clobber || previous_state == PAUSED) {
     401    if(previous_state == PAUSED) {
    410402        args.add("-nc");
    411403        args.add("-c");
  • trunk/gli/src/org/greenstone/gatherer/file/WorkspaceTreeModel.java

    r6086 r6582  
    1313    static private WorkspaceTreeModel workspace_tree_model = null;
    1414    static private FileNode greenstone_collections_mapping = null;
    15     static private FileNode public_web_cache_mapping = null;
    16     static private FileNode private_web_cache_mapping = null;
     15    static private FileNode web_cache_mapping = null;
    1716    static private FileNode[] collection_specific_mappings = null;
    1817
     
    5352    {
    5453    // If mirroring is enabled show the public and private caches
    55     public_web_cache_mapping = MirrorPane.getPublicWebCacheMapping();
    56     if (public_web_cache_mapping != null) {
    57         workspace_tree_root.insert(public_web_cache_mapping);
    58     }
    59     private_web_cache_mapping = MirrorPane.getPrivateWebCacheMapping();
    60     if (private_web_cache_mapping != null) {
    61         workspace_tree_root.insert(private_web_cache_mapping);
     54    web_cache_mapping = MirrorPane.getWebCacheMapping();
     55    if (web_cache_mapping != null) {
     56        workspace_tree_root.insert(web_cache_mapping);
    6257    }
    6358    }
     
    9186    static public void refreshWebCacheMappings()
    9287    {
    93     if (public_web_cache_mapping != null) {
    94         SynchronizedTreeModelTools.removeNodeFromParent(workspace_tree_model,
    95                                 public_web_cache_mapping);
    96     }
    97     if (private_web_cache_mapping != null) {
    98         SynchronizedTreeModelTools.removeNodeFromParent(workspace_tree_model,
    99                                 private_web_cache_mapping);
     88    if (web_cache_mapping != null) {
     89        SynchronizedTreeModelTools.removeNodeFromParent(workspace_tree_model, web_cache_mapping);
    10090    }
    10191
  • trunk/gli/src/org/greenstone/gatherer/gui/CreatePane.java

    r6533 r6582  
    568568        build_button.setEnabled(true);
    569569        cancel_button.setEnabled(false);
    570         preview_button.setEnabled(true);
     570        //preview_button.setEnabled(true);
    571571        simple_build_button.setEnabled(true);
    572572        simple_cancel_button.setEnabled(false);
    573         simple_preview_button.setEnabled(true);
     573        //simple_preview_button.setEnabled(true);
    574574        int status = event.getStatus();
    575575        document.setSpecialCharacter(OptionsPane.SUCCESSFUL);
     
    589589        build_button.setEnabled(true);
    590590        // The build may have failed, but a previous index may still be in place
    591         preview_button.setEnabled(Gatherer.c_man.built());
     591        //preview_button.setEnabled(Gatherer.c_man.built());
    592592
    593593        simple_build_button.setEnabled(true);
    594594        simple_cancel_button.setEnabled(false);
    595         simple_preview_button.setEnabled(Gatherer.c_man.built());
     595        //simple_preview_button.setEnabled(Gatherer.c_man.built());
    596596        if(event.getStatus() == GShell.CANCELLED) {
    597597        document.setSpecialCharacter(OptionsPane.CANCELLED);
  • trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java

    r6539 r6582  
    347347     */
    348348    public void afterDisplay() {
    349     if(Gatherer.config.get("workflow.mirror", true)) {
     349    if(Gatherer.config.get("workflow.browse", true)) {
    350350        browser_pane.afterDisplay();
    351351    }
  • trunk/gli/src/org/greenstone/gatherer/gui/MirrorPane.java

    r6318 r6582  
    4141import java.io.File;
    4242import java.net.*;
     43import java.util.*;
    4344import javax.swing.*;
    4445import javax.swing.border.*;
     
    5859public class MirrorPane
    5960    extends JPanel {
    60     private JButton download_button = null;
    61     private JCheckBox automatic_checkbox = null;
    62     private JCheckBox higher_checkbox = null;
    63     private JCheckBox overwrite_checkbox = null;
    64     private JCheckBox remove_failed_checkbox = null;
    65     private JCheckBox same_host_checkbox = null;
    66     private JRadioButton public_radiobutton = null;
    67     private JRadioButton private_radiobutton = null;
    68     private JScrollPane list_scroll = null;
    69     private JSpinner depth_spinner = null;
    70     private JTextField url_textfield = null;
    71     private WGet getter = null;
     61
     62    private JButton download_button;
     63    private JCheckBox higher_checkbox;
     64    private JCheckBox requisite_checkbox;
     65    private JCheckBox same_host_checkbox;
     66    private JScrollPane list_scroll;
     67    private JComboBox depth_combobox;
     68    private JTextField url_textfield;
     69    private Vector depth_model;
     70    private WGet getter;
    7271
    7372    public MirrorPane() {
     
    9089    Dictionary.registerTooltip(url_textfield, "Mirroring.Source_URL_Tooltip");
    9190
     91    depth_model = new Vector();
     92    /* @todo - add to dictionary */
     93    depth_model.add(new DepthEntry(0, "0 (this page only)"));
     94    /* @todo - add to dictionary */
     95    depth_model.add(new DepthEntry(1, "1"));
     96    /* @todo - add to dictionary */
     97    depth_model.add(new DepthEntry(2, "2"));
     98    /* @todo - add to dictionary */
     99    depth_model.add(new DepthEntry(3, "3"));
     100    /* @todo - add to dictionary */
     101    depth_model.add(new DepthEntry(4, "4"));
     102    /* @todo - add to dictionary */
     103    depth_model.add(new DepthEntry(5, "5"));
     104    /* @todo - add to dictionary */
     105    depth_model.add(new DepthEntry(-1, "Unlimited"));
    92106    JPanel depth_pane = new JPanel();
    93107    JLabel depth_label = new JLabel();
    94108    Dictionary.registerText(depth_label, "Mirroring.Download_Depth");
    95     depth_spinner = new JSpinner();
    96     Dictionary.registerTooltip(depth_spinner, "Mirroring.Download_Depth_Tooltip");
    97 
    98     JPanel destination_pane = new JPanel();
    99     JLabel destination_label = new JLabel();
    100     Dictionary.registerText(destination_label, "Mirroring.Destination_Folder");
    101     ButtonGroup group = new ButtonGroup();
    102     public_radiobutton = new JRadioButton();
    103     public_radiobutton.setBackground(Gatherer.config.getColor("coloring.collection_tree_background", false));
    104     public_radiobutton.setOpaque(false);
    105     Dictionary.registerText(public_radiobutton, "Tree.Public");
    106     private_radiobutton = new JRadioButton();
    107     private_radiobutton.setBackground(Gatherer.config.getColor("coloring.collection_tree_background", false));
    108     private_radiobutton.setOpaque(false);
    109     Dictionary.registerText(private_radiobutton, "Tree.Private");
    110     group.add(public_radiobutton);
    111     group.add(private_radiobutton);
    112     public_radiobutton.setSelected(true);
    113 
    114     JPanel first_pane = new JPanel();
    115     automatic_checkbox = new JCheckBox();
    116     Dictionary.registerText(automatic_checkbox, "Mirroring.Download_Hidden");
    117     overwrite_checkbox = new JCheckBox();
    118     Dictionary.registerText(overwrite_checkbox, "Mirroring.Overwrite_Existing");
    119 
    120     JPanel second_pane = new JPanel();
     109    depth_combobox = new JComboBox(depth_model);
     110    Dictionary.registerTooltip(depth_combobox, "Mirroring.Download_Depth_Tooltip");
     111
     112    requisite_checkbox = new JCheckBox();
     113    Dictionary.registerText(requisite_checkbox, "Mirroring.Download_Hidden");
     114
    121115    higher_checkbox = new JCheckBox();
    122116    Dictionary.registerText(higher_checkbox, "Mirroring.Higher_Directories");
     117
    123118    same_host_checkbox = new JCheckBox();
     119    same_host_checkbox.setSelected(true);
    124120    Dictionary.registerText(same_host_checkbox, "Mirroring.Same_Host");
    125 
    126     remove_failed_checkbox = new JCheckBox();
    127     Dictionary.registerText(remove_failed_checkbox, "Mirroring.Remove_Failed");
    128 
    129     JLabel further_label = new JLabel();
    130     Dictionary.registerText(further_label, "Mirroring.Further_Options");
     121   
     122    /* @todo - add to dictionary */
     123    JLabel further_label = new JLabel("For further options see File->Preferences->Connection");
    131124
    132125    JPanel button_pane = new JPanel();
     
    143136    url_pane.add(url_textfield, BorderLayout.CENTER);
    144137
    145     depth_pane.setLayout(new GridLayout(1,3));
    146     depth_pane.add(depth_label);
    147     depth_pane.add(new JPanel());
    148     depth_pane.add(depth_spinner);
    149 
    150     destination_pane.setLayout(new GridLayout(1,3));
    151     destination_pane.add(destination_label);
    152     destination_pane.add(public_radiobutton);
    153     destination_pane.add(private_radiobutton);
    154 
    155     first_pane.setLayout(new GridLayout(1,2));
    156     first_pane.add(automatic_checkbox);
    157     first_pane.add(overwrite_checkbox);
    158 
    159     second_pane.setLayout(new GridLayout(1,2));
    160     second_pane.add(higher_checkbox);
    161     second_pane.add(same_host_checkbox);
    162 
    163     details_pane.setLayout(new GridLayout(7,1,0,5));
     138    depth_pane.setLayout(new BorderLayout());
     139    depth_pane.add(depth_label, BorderLayout.CENTER);
     140    depth_pane.add(depth_combobox, BorderLayout.EAST);
     141
     142    details_pane.setLayout(new GridLayout(6,1,0,5));
    164143    details_pane.add(url_pane);
    165144    details_pane.add(depth_pane);
    166     details_pane.add(destination_pane);
    167     details_pane.add(first_pane);
    168     details_pane.add(second_pane);
    169     details_pane.add(remove_failed_checkbox);
     145    details_pane.add(requisite_checkbox);
     146    details_pane.add(higher_checkbox);
     147    details_pane.add(same_host_checkbox);
    170148    details_pane.add(further_label);
    171149
     
    187165
    188166    public void collectionChanged(boolean ready) {
    189     if(private_radiobutton.isSelected() && !ready) {
    190         public_radiobutton.setSelected(true);
    191     }
    192     private_radiobutton.setEnabled(ready);
    193167    }
    194168
     
    198172
    199173
    200     static public FileNode getPublicWebCacheMapping()
    201     {
    202     if (Gatherer.config.get("workflow.mirror", false)) {
    203         return new FileNode(new File(Utility.CACHE_DIR), Dictionary.get("Tree.Public"));
    204     }
    205 
    206     return null;
    207     }
    208 
    209 
    210     static public FileNode getPrivateWebCacheMapping()
     174    static public FileNode getWebCacheMapping()
    211175    {
    212176    if (Gatherer.config.get("workflow.mirror", false) && Gatherer.c_man.ready()) {
    213         return new FileNode(new File(Gatherer.c_man.getCollectionCache()), Dictionary.get("Tree.Private"));
    214     }
    215 
     177        /* @todo - add to dictionary */
     178        return new FileNode(Utility.getCacheDir(), "Mirror Cache");
     179    }
    216180    return null;
    217181    }
    218182
     183    /** A DepthEntry contains a depth value, as an int, and a representitive text string. This allows for a more meaningful appearance than '0' for instance. */
     184    private class DepthEntry
     185    implements Comparable {
     186    private int value;
     187    private String text;
     188    /** Default constructor.
     189     * @param value the depth value as an int
     190     * @param text how this entry show represent itself as a String
     191     */
     192    public DepthEntry(int value, String text) {
     193        this.text = text;
     194        this.value = value;
     195    }
     196    /** Determines the natural ordering of this DepthEntry and some other object
     197     * @param object the Object to test for ordering
     198     * @return >0 if the object is before this one, 0 if they are equal, or <0 if the object is after this one
     199     */
     200    public int compareTo(Object object) {
     201        // If the object is a DepthEntry then this is easy pesy.
     202        if(object instanceof DepthEntry) {
     203        int target_value = ((DepthEntry) object).getValue();
     204        return value - target_value;
     205        }
     206        // If the object is a String, then we should try parsing an int from it
     207        if(object instanceof String) {
     208        try {
     209            int target_value = Integer.parseInt((String)object);
     210            return value - target_value;
     211        }
     212        catch(Exception exception) {
     213        }
     214        }
     215        // Otherwise we'll try a string comparison between our text and the toString of the object
     216        return text.compareTo(object.toString());
     217    }
     218
     219    /** Determine if this DepthEntry is equal to some other object. Given that there is significant processing involved we push the resposiblility for this onto compareTo, so we only have the complex code once.
     220     * @param object the Object to test for equality
     221     * @return true if the object is equal to this depth entry, false otherwise
     222     */
     223    public boolean equals(Object object) {
     224        return (compareTo(object) == 0);
     225    }
     226
     227    public int getValue() {
     228        return value;
     229    }
     230
     231    public String toString() {
     232        return text;
     233    }
     234    }
    219235
    220236    private class DownloadButtonListener
     
    229245        }
    230246        catch(MalformedURLException error) {
    231         JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("Mirroring.Invalid_URL"), Dictionary.get("Mirroring.Invalid_URL__Title"), JOptionPane.ERROR_MESSAGE);
    232         }
     247        JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("Mirroring.Invalid_URL"), Dictionary.get("Mirroring.Invalid_URL_Title"), JOptionPane.ERROR_MESSAGE);
     248        }
     249
     250        // Otherwise construct a new download job
     251        Object depth_object = depth_combobox.getSelectedItem();
     252        int depth_value = 0;
     253        if(depth_object instanceof DepthEntry) {
     254        depth_value = ((DepthEntry)depth_object).getValue();
     255        }
     256        else if(depth_object instanceof String) {
     257        String depth_string = (String) depth_object;
     258        try {
     259            depth_value = Integer.parseInt(depth_string);
     260            // Create a new entry for the purposes of comparison, and if needs be, addition
     261            DepthEntry new_entry = new DepthEntry(depth_value, depth_string);
     262            // Try to select the correct item from the combobox
     263            depth_combobox.setSelectedItem(null);
     264            depth_combobox.setSelectedItem(new_entry);
     265            // We can see if that worked, and if it didn't add the entry
     266            if(depth_combobox.getSelectedItem() == null) {
     267            depth_combobox.addItem(new_entry);
     268            depth_combobox.setSelectedItem(new_entry);
     269            }
     270            new_entry = null;
     271        }
     272        catch(Exception exception) {
     273            /* @todo - add to dictionary */
     274            JOptionPane.showMessageDialog(Gatherer.g_man, "The depth value you have entered is not valid.\nPlease choose an item from the list, or type in\na number.", "Invalid Depth", JOptionPane.ERROR_MESSAGE);
     275            return;
     276        }
     277        depth_string = null;
     278        }
     279        depth_object = null;
     280   
     281        File destination_file = Utility.getCacheDir();
     282        destination_file.mkdirs(); // If they aren't already
     283        String destination_filename = destination_file.getAbsolutePath();
     284        if(!destination_filename.endsWith(File.separator)) {
     285        destination_filename = destination_filename + File.separator;
     286        }
     287
    233288        if(url != null) {
    234         // Otherwise construct a new download job
    235         getter.newJob(/* Gatherer.c_man.getWorkspace(), */ overwrite_checkbox.isSelected(), !higher_checkbox.isSelected(), !same_host_checkbox.isSelected(), automatic_checkbox.isSelected(), url, ((Integer)depth_spinner.getValue()).intValue(), (public_radiobutton.isSelected() ? Utility.CACHE_DIR : Gatherer.c_man.getCollectionCache()));
     289        getter.newJob(!higher_checkbox.isSelected(), !same_host_checkbox.isSelected(), requisite_checkbox.isSelected(), url, depth_value, destination_filename);
    236290        }
    237291    }
  • trunk/gli/src/org/greenstone/gatherer/gui/NewCollectionDetailsPrompt.java

    r6318 r6582  
    4747
    4848    static public boolean titleClashes(String title, File current_config_file) {
     49    // An empty collection title never clashes with anything. I may look ugly in the final collection but there is nothing wrong with having no title for a particular language.
     50    if(title == null || title.length() == 0) {
     51        return false;
     52    }
    4953    File collection_directory = new File(Utility.getCollectionDir(Gatherer.config.gsdl_path));
    5054    File children[] = collection_directory.listFiles();
  • trunk/gli/src/org/greenstone/gatherer/util/StaticStrings.java

    r6565 r6582  
    4949    static final public String ATTRIBUTE_ELEMENT                          = "Attribute";
    5050    static final public String BUILDTYPE_STR                              = "buildtype";
     51    static final public String CACHE_FOLDER                               = "cache";
    5152    static final public String CCS_STR                                    = "ccs";
    5253    static final public String CLASSES_FOLDER                             = "classes";
Note: See TracChangeset for help on using the changeset viewer.