- Timestamp:
- 2004-05-05T11:23:40+12:00 (20 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/SuperCollectionManager.java
r7224 r7275 196 196 for(int i = 0; possible_collections != null && i < possible_collections.length; i++) { 197 197 // The simpliest case is if the directory etc/collect.cfg file and a metadata/ in it. Thus it can easily be built upon. 198 File collect_cfg_file = new File(possible_collections[i], Utility.CONFIG_ DIR);198 File collect_cfg_file = new File(possible_collections[i], Utility.CONFIG_FILE); 199 199 if(collect_cfg_file.exists()) { 200 200 BasicCollectionConfiguration collect_cfg = new BasicCollectionConfiguration(collect_cfg_file); -
trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r7224 r7275 356 356 // Now we update our collect.cfg 357 357 Gatherer.println("Copy and update collect.cfg from base collection."); 358 updateCollectionCFG(new File(base_collection_directory, Utility.CONFIG_ DIR), new File(a_dir, Utility.CONFIG_DIR), description, email, title);358 updateCollectionCFG(new File(base_collection_directory, Utility.CONFIG_FILE), new File(a_dir, Utility.CONFIG_FILE), description, email, title); 359 359 } 360 360 … … 512 512 */ 513 513 public String getCollectionConfig() { 514 return Utility.getConfig Dir(Utility.getCollectionDir(Gatherer.config.gsdl_path, collection.getName()));514 return Utility.getConfigFile(Utility.getCollectionDir(Gatherer.config.gsdl_path, collection.getName())); 515 515 } 516 516 … … 840 840 } 841 841 842 collection.cdm = new CollectionDesignManager(new File(collection_file.getParent(), Utility.CONFIG_ DIR));842 collection.cdm = new CollectionDesignManager(new File(collection_file.getParent(), Utility.CONFIG_FILE)); 843 843 if (non_gatherer_collection) { 844 844 // We first recurse the Import folder tree, reading in any metadata.xml files, and then altering the non-namespaced element names to be valid GLI names -
trunk/gli/src/org/greenstone/gatherer/file/FileNode.java
r7224 r7275 283 283 File import_dir = new File(cols[i], StaticStrings.IMPORT_FOLDER); 284 284 if(import_dir.exists()) { 285 BasicCollectionConfiguration collect_cfg = new BasicCollectionConfiguration(new File(cols[i], Utility.CONFIG_ DIR));285 BasicCollectionConfiguration collect_cfg = new BasicCollectionConfiguration(new File(cols[i], Utility.CONFIG_FILE)); 286 286 FileNode collection_root = new FileNode(import_dir, collect_cfg.toString(), true); 287 287 collection_root.setParent(this); -
trunk/gli/src/org/greenstone/gatherer/gui/NewCollectionDetailsPrompt.java
r7224 r7275 55 55 for(int i = 0; children != null && i < children.length; i++) { 56 56 if(children[i].isDirectory()) { 57 File config_file = new File(children[i], Utility.CONFIG_ DIR);57 File config_file = new File(children[i], Utility.CONFIG_FILE); 58 58 if(current_config_file == null || !config_file.equals(current_config_file)) { 59 59 BasicCollectionConfiguration other_collection = new BasicCollectionConfiguration(config_file); … … 108 108 for (int i = 0; possible_collections != null && i < possible_collections.length; i++) { 109 109 // If the directory has a etc/collect.cfg file then it looks like a collection 110 File collect_cfg_file = new File(possible_collections[i], Utility.CONFIG_ DIR);110 File collect_cfg_file = new File(possible_collections[i], Utility.CONFIG_FILE); 111 111 if (collect_cfg_file.exists()) { 112 112 // If the directory has a metadata/ then the collection can be used as a base -
trunk/gli/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java
r6051 r7275 169 169 else { 170 170 // Build a wrapper around the collection configuration file. 171 File config_file = new File(file.getParentFile(), Utility.CONFIG_ DIR);171 File config_file = new File(file.getParentFile(), Utility.CONFIG_FILE); 172 172 if(config_file.exists()) { 173 173 BasicCollectionConfiguration collect_cfg = new BasicCollectionConfiguration(config_file); … … 212 212 File[] files = default_system_view.getFiles(dir, useFileHiding); 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 File collect_cfg_file = new File(dir, Utility.CONFIG_ DIR);214 File collect_cfg_file = new File(dir, Utility.CONFIG_FILE); 215 215 File import_dir_file = new File(dir, Utility.IMPORT_DIR); 216 216 if(collect_cfg_file.exists() && import_dir_file.exists()) { -
trunk/gli/src/org/greenstone/gatherer/gui/SimpleOpenCollectionDialog.java
r6318 r7275 215 215 String collection_foldername = collection_folder.getName(); 216 216 if(!collection_folder.isFile() && !collection_foldername.equals(StaticStrings.MODEL_COLLECTION_NAME)) { 217 BasicCollectionConfiguration collection_configuration = new BasicCollectionConfiguration(new File(collection_folder, Utility.CONFIG_ DIR));217 BasicCollectionConfiguration collection_configuration = new BasicCollectionConfiguration(new File(collection_folder, Utility.CONFIG_FILE)); 218 218 if(!collection_configuration.getName().equals(StaticStrings.ERROR_STR)) { 219 219 data.add(collection_configuration); -
trunk/gli/src/org/greenstone/gatherer/mem/MEMNode.java
r7224 r7275 160 160 if(is_descendant) { 161 161 // Create a basic config class 162 BasicCollectionConfiguration config = new BasicCollectionConfiguration(new File(source_path, Utility.CONFIG_ DIR));162 BasicCollectionConfiguration config = new BasicCollectionConfiguration(new File(source_path, Utility.CONFIG_FILE)); 163 163 text = config.toString(); 164 164 config = null; -
trunk/gli/src/org/greenstone/gatherer/util/Utility.java
r7224 r7275 89 89 static final public String COLLECTION_TREE = "Collection"; 90 90 /** Definition of an important directory name, in this case the file the collection configuration is expect to be in. */ 91 static final public String CONFIG_ DIR= "etc" + File.separator + "collect.cfg";91 static final public String CONFIG_FILE = "etc" + File.separator + "collect.cfg"; 92 92 /** The default file name for the urls missing any file. */ 93 93 static final public String DEFAULT_FILE = "index.html"; … … 505 505 * @return The location of the given collections configuration file, also as a <strong>String</strong>. 506 506 */ 507 static public String getConfig Dir(String col_dir) {508 return col_dir + CONFIG_ DIR;507 static public String getConfigFile(String col_dir) { 508 return col_dir + CONFIG_FILE; 509 509 } 510 510
Note:
See TracChangeset
for help on using the changeset viewer.