Changeset 4318
- Timestamp:
- 2003-05-23T16:40:25+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/util/Utility.java
r4293 r4318 72 72 static final public String CFG_CLASSIFY_HFILE = "-hfile"; 73 73 static final public String CFG_CLASSIFY_METADATA = "-metadata"; 74 static final public String CFG_CLASSIFY_SORT = "-sort"; 74 75 static final public String CFG_CREATOR = "creator"; 76 static final public String CFG_FORMAT = "format"; 75 77 static final public String CFG_MAINTAINER = "maintainer"; 76 78 /** Definition of an important directory name, in this case the parent directory of all the collections in the gsdl. */ 77 79 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; 78 82 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"; 79 85 /** Definition of an important directory name, in this case the file the collection configuration is expect to be in. */ 80 86 static final public String CONFIG_DIR = "etc" + File.separator + "collect.cfg"; … … 126 132 /** Definition of an important directory name, in this case the location of image and other resources. */ 127 133 static final public String RES_DIR = BASE_DIR + "resource" + File.separator; 134 static final public String SERVER_EXE = "server.exe"; 128 135 /** Definition of an important directory name, in this case the location of opening (or welcome) screen html. */ 129 136 static final public String WELCOME_DIR = BASE_DIR + "welcome" + File.separator; 137 static final public String WORKSPACE_TREE = "Workspace"; 130 138 // These are out of alphabetic order to avoid forward reference error. 131 139 /** The default icon to produce a 'help-icon' sized blank space before a menu entry. */ … … 862 870 return text; 863 871 } 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 } 864 883 /** 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). 865 884 * @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.