- Timestamp:
- 2006-04-07T13:44:00+12:00 (18 years ago)
- 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 845 845 846 846 // 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"); 848 848 if (!collection_import_directory.exists()) { 849 849 collection_import_directory.mkdir(); -
trunk/gli/src/org/greenstone/gatherer/collection/LegacyCollectionImporter.java
r11080 r11625 34 34 static public void backupMetadataXMLFiles(File collection_dir) 35 35 { 36 File import_dir = new File(collection_dir, Utility.IMPORT_DIR);36 File import_dir = new File(collection_dir, "import"); 37 37 File import_bak_dir = new File(collection_dir, IMPORT_BAK_DIR); 38 38 import_bak_dir.mkdir(); -
trunk/gli/src/org/greenstone/gatherer/file/FileQueue.java
r11621 r11625 53 53 extends Thread 54 54 { 55 /** The size of the io buffer, in bytes. */ 56 static final private int BUFFER_SIZE = 1024; 57 55 58 /** When someone requests the movement queue to be dumped this cancel flag is set to true. */ 56 59 private boolean cancel_action = false; … … 796 799 797 800 // Copy the file 798 byte data[] = new byte[ Utility.BUFFER_SIZE];801 byte data[] = new byte[BUFFER_SIZE]; 799 802 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) { 801 804 long destination_size = destination.length(); 802 805 try { -
trunk/gli/src/org/greenstone/gatherer/file/WorkspaceTreeNode.java
r11051 r11625 141 141 for (int i = 0; cols != null && i < cols.length; i++) { 142 142 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"); 144 144 if (!import_dir.exists()) { 145 145 continue; -
trunk/gli/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java
r10011 r11625 213 213 // 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. 214 214 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"); 216 216 if(collect_cfg_file.exists() && import_dir_file.exists()) { 217 217 // Create a new dummy collection file. -
trunk/gli/src/org/greenstone/gatherer/gui/SimpleOpenCollectionDialog.java
r9045 r11625 319 319 File etc_folder = collect_cfg_file.getParentFile(); 320 320 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"; 322 322 collection_folder = null; 323 323 etc_folder = null; -
trunk/gli/src/org/greenstone/gatherer/util/Utility.java
r11624 r11625 57 57 public class Utility 58 58 { 59 /** The size of the io buffer, in bytes. */60 static final public int BUFFER_SIZE = 1024;61 59 /** Definition of an important directory name, in this case the file the collection configuration is expect to be in. */ 62 60 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;67 61 /** The default name of the perl executable under unix. */ 68 62 static final public String PERL_EXECUTABLE_UNIX = "perl";
Note:
See TracChangeset
for help on using the changeset viewer.