Changeset 4318


Ignore:
Timestamp:
2003-05-23T16:40:25+12:00 (21 years ago)
Author:
jmt12
Message:

New static strings

File:
1 edited

Legend:

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

    r4293 r4318  
    7272     static final public String CFG_CLASSIFY_HFILE = "-hfile";
    7373     static final public String CFG_CLASSIFY_METADATA = "-metadata";
     74     static final public String CFG_CLASSIFY_SORT = "-sort";
    7475     static final public String CFG_CREATOR = "creator";
     76     static final public String CFG_FORMAT = "format";
    7577     static final public String CFG_MAINTAINER = "maintainer";
    7678     /** Definition of an important directory name, in this case the parent directory of all the collections in the gsdl. */
    7779     static final public String COL_DIR = "collect" + File.separator;
     80     static final public String COLLECTION_DEMO = "greenstone demo";
     81     static final public String COLLECTION_DEMO_DIRECTORY = "demo" + File.separator;
    7882     static final public String COLLECTION_DLS = "Development Library Subset";
     83     static final public String COLLECTION_DLS_DIRECTORY = "dls" + File.separator;
     84     static final public String COLLECTION_TREE = "Collection";
    7985     /** Definition of an important directory name, in this case the file the collection configuration is expect to be in. */
    8086     static final public String CONFIG_DIR = "etc" + File.separator + "collect.cfg";
     
    126132     /** Definition of an important directory name, in this case the location of image and other resources. */
    127133     static final public String RES_DIR = BASE_DIR + "resource" + File.separator;
     134     static final public String SERVER_EXE = "server.exe";
    128135     /** Definition of an important directory name, in this case the location of opening (or welcome) screen html. */
    129136     static final public String WELCOME_DIR = BASE_DIR + "welcome" + File.separator;
     137     static final public String WORKSPACE_TREE = "Workspace";
    130138     // These are out of alphabetic order to avoid forward reference error.
    131139     /** The default icon to produce a 'help-icon' sized blank space before a menu entry. */
     
    862870          return text;
    863871     }
     872
     873     static public String trimCenter(String text, int length) {
     874          if(text.length() > length) {
     875                int half = (length - 3) / 2;
     876                StringBuffer temp = new StringBuffer(text.substring(0, half));
     877                temp.append("...");
     878                temp.append(text.substring(text.length() - half));
     879                text = temp.toString();
     880          }
     881          return text;
     882     }
    864883     /** This method checks to see what registered file system root directorys are mounted, and returns only accessible ones. The exception is removable media drives (in particular floppy-disk drives) which will throw all sorts of error if we test them here. Instead they are assumed to be always accessible, but a test is conducted at the time you attempt to map them to test for actual accessibility (then at least the errors are thrown after the user tries to initiate the mapping of the drive which has no disk in it).
    865884      * @param roots A <strong>File[]</strong> containing all of the file system roots registered on this system.
Note: See TracChangeset for help on using the changeset viewer.