Changeset 11625


Ignore:
Timestamp:
2006-04-07T13:44:00+12:00 (18 years ago)
Author:
mdewsnip
Message:

Removed some more stuff from Utility.

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

Legend:

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

    r11623 r11625  
    845845
    846846    // Ensure that an import directory exists for this collection
    847     File collection_import_directory = new File(collection_directory, Utility.IMPORT_DIR);
     847    File collection_import_directory = new File(collection_directory, "import");
    848848    if (!collection_import_directory.exists()) {
    849849        collection_import_directory.mkdir();
  • trunk/gli/src/org/greenstone/gatherer/collection/LegacyCollectionImporter.java

    r11080 r11625  
    3434    static public void backupMetadataXMLFiles(File collection_dir)
    3535    {
    36     File import_dir = new File(collection_dir, Utility.IMPORT_DIR);
     36    File import_dir = new File(collection_dir, "import");
    3737    File import_bak_dir = new File(collection_dir, IMPORT_BAK_DIR);
    3838    import_bak_dir.mkdir();
  • trunk/gli/src/org/greenstone/gatherer/file/FileQueue.java

    r11621 r11625  
    5353    extends Thread
    5454{
     55    /** The size of the io buffer, in bytes. */
     56    static final private int BUFFER_SIZE = 1024;
     57
    5558    /** When someone requests the movement queue to be dumped this cancel flag is set to true. */
    5659    private boolean cancel_action = false;
     
    796799
    797800    // Copy the file
    798     byte data[] = new byte[Utility.BUFFER_SIZE];
     801    byte data[] = new byte[BUFFER_SIZE];
    799802    int data_size = 0;
    800     while ((data_size = f_in.read(data, 0, Utility.BUFFER_SIZE)) != -1 && !cancel_action) {
     803    while ((data_size = f_in.read(data, 0, BUFFER_SIZE)) != -1 && !cancel_action) {
    801804        long destination_size = destination.length();
    802805        try {
  • trunk/gli/src/org/greenstone/gatherer/file/WorkspaceTreeNode.java

    r11051 r11625  
    141141        for (int i = 0; cols != null && i < cols.length; i++) {
    142142            if (!cols[i].getName().equals(StaticStrings.MODEL_COLLECTION_NAME)) {
    143             File import_dir = new File(cols[i], Utility.IMPORT_DIR);
     143            File import_dir = new File(cols[i], "import");
    144144            if (!import_dir.exists()) {
    145145                continue;
  • trunk/gli/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java

    r10011 r11625  
    213213        // Determine if the current dir actually contains a valid greenstone collection. To do this we check for the presence of the file <dir>/etc/collect.cfg and a directory named import.
    214214        File collect_cfg_file = new File(dir, Utility.CONFIG_FILE);
    215         File import_dir_file = new File(dir, Utility.IMPORT_DIR);
     215        File import_dir_file = new File(dir, "import");
    216216        if(collect_cfg_file.exists() && import_dir_file.exists()) {
    217217        // Create a new dummy collection file.
  • trunk/gli/src/org/greenstone/gatherer/gui/SimpleOpenCollectionDialog.java

    r9045 r11625  
    319319        File etc_folder = collect_cfg_file.getParentFile();
    320320        File collection_folder = etc_folder.getParentFile();
    321         filename = collection_folder.getAbsolutePath() + File.separator + collection_folder.getName() + Utility.GLI_EXTENSION;
     321        filename = collection_folder.getAbsolutePath() + File.separator + collection_folder.getName() + ".col";
    322322        collection_folder = null;
    323323        etc_folder = null;
  • trunk/gli/src/org/greenstone/gatherer/util/Utility.java

    r11624 r11625  
    5757public class Utility
    5858{
    59     /** The size of the io buffer, in bytes. */
    60     static final public int BUFFER_SIZE = 1024;
    6159    /** Definition of an important directory name, in this case the file the collection configuration is expect to be in. */
    6260    static final public String CONFIG_FILE = "etc" + File.separator + "collect.cfg";
    63     static final public String GLI_EXTENSION = ".col";
    64 
    65     /** Definition of an important directory name, in this case the import directory for the collection. */
    66     static final public String IMPORT_DIR = "import" + File.separator;
    6761    /** The default name of the perl executable under unix. */
    6862    static final public String PERL_EXECUTABLE_UNIX = "perl";
Note: See TracChangeset for help on using the changeset viewer.