- Timestamp:
- 2006-04-07T13:28:27+12:00 (18 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r11312 r11623 298 298 try { 299 299 // do the macros dir 300 File base_coll_macros = new File(base_coll_dir, Utility.MACROS_DIR);300 File base_coll_macros = new File(base_coll_dir, "macros"); 301 301 if (base_coll_macros.isDirectory()) { 302 302 // copy all the macros over 303 File new_coll_macros = new File(new_coll_dir, Utility.MACROS_DIR);303 File new_coll_macros = new File(new_coll_dir, "macros"); 304 304 new_coll_macros.mkdirs(); 305 305 … … 851 851 852 852 // Special case of a user trying to open an old greenstone collection. 853 File collection_metadata_directory = new File(collection_directory, Utility.META_DIR);853 File collection_metadata_directory = new File(collection_directory, "metadata"); 854 854 if (!collection_metadata_directory.exists()) { 855 855 DebugStream.println("Loading non-gatherer collection..."); … … 1382 1382 } // if collectionmeta 1383 1383 1384 if (command_type_str.equals(Utility.CFG_CLASSIFY)) {1384 if (command_type_str.equals("classify")) { 1385 1385 StringBuffer text = new StringBuffer(command_type_str); 1386 1386 // Read in the classifier command watching for hfile, metadata and sort arguments. … … 1392 1392 while(tokenizer.hasMoreTokens()) { 1393 1393 String token = tokenizer.nextToken(); 1394 if (token.equals(Utility.CFG_CLASSIFY_HFILE)) {1394 if (token.equals("-hfile")) { 1395 1395 if(tokenizer.hasMoreTokens()) { 1396 1396 text.append(" "); … … 1400 1400 } 1401 1401 } 1402 else if (token.equals(Utility.CFG_CLASSIFY_METADATA)) {1402 else if (token.equals("-metadata")) { 1403 1403 if(tokenizer.hasMoreTokens()) { 1404 1404 text.append(" "); … … 1418 1418 } 1419 1419 } 1420 else if (token.equals(Utility.CFG_CLASSIFY_SORT)) {1420 else if (token.equals("-sort")) { 1421 1421 if(tokenizer.hasMoreTokens()) { 1422 1422 text.append(" "); … … 1434 1434 } 1435 1435 } 1436 else if(token.equals( Utility.CFG_CLASSIFY_BUTTONNAME)) {1436 else if(token.equals("-buttonname")) { 1437 1437 buttonname = token; 1438 1438 } … … 1445 1445 if(old_metadata != null && new_metadata != null && buttonname == null) { 1446 1446 text.append(' '); 1447 text.append( Utility.CFG_CLASSIFY_BUTTONNAME);1447 text.append("-buttonname"); 1448 1448 text.append(' '); 1449 1449 text.append(old_metadata); … … 1472 1472 // There is still one special case, that of the format command. In such a command we have to search for [<target>] to ensure we don't change parts of the format which have nothing to do with the metadata elements. 1473 1473 // we really want to build up the whole command here 1474 boolean format_command = command_type_str.equals( Utility.CFG_FORMAT);1474 boolean format_command = command_type_str.equals("format"); 1475 1475 HashMap metadata_mapping = ProfileXMLFileManager.getMetadataMapping(); 1476 1476 if (metadata_mapping != null) { -
trunk/gli/src/org/greenstone/gatherer/gui/NewCollectionDetailsPrompt.java
r11391 r11623 280 280 if (collect_cfg_file.exists()) { 281 281 // If the directory has a metadata/ then the collection can be used as a base 282 File metadata_directory = new File(possible_collections[i], Utility.META_DIR);282 File metadata_directory = new File(possible_collections[i], "metadata"); 283 283 if (metadata_directory.exists()) { 284 284 // Add to model -
trunk/gli/src/org/greenstone/gatherer/util/Utility.java
r11622 r11623 59 59 /** The size of the io buffer, in bytes. */ 60 60 static final public int BUFFER_SIZE = 1024; 61 static final public String CFG_CLASSIFY = "classify";62 static final public String CFG_CLASSIFY_BUTTONNAME = "-buttonname";63 static final public String CFG_CLASSIFY_HFILE = "-hfile";64 static final public String CFG_CLASSIFY_METADATA = "-metadata";65 static final public String CFG_CLASSIFY_SORT = "-sort";66 static final public String CFG_FORMAT = "format";67 61 /** Definition of an important directory name, in this case the file the collection configuration is expect to be in. */ 68 62 static final public String CONFIG_FILE = "etc" + File.separator + "collect.cfg"; … … 71 65 /** Definition of an important directory name, in this case the import directory for the collection. */ 72 66 static final public String IMPORT_DIR = "import" + File.separator; 73 /** Definition of an important directory name, in this case the macros directory for the collection. */74 static final public String MACROS_DIR = "macros" + File.separator;75 /** Definition of an important directory name, in this case the location of the expected collection metadata sets.. */76 static final public String META_DIR = "metadata" + File.separator; // Col. Copy77 67 /** The default name of the perl executable under unix. */ 78 68 static final public String PERL_EXECUTABLE_UNIX = "perl";
Note:
See TracChangeset
for help on using the changeset viewer.