Changeset 16267
- Timestamp:
- 2008-07-02T09:04:06+12:00 (15 years ago)
- Location:
- gli/trunk/src/org/greenstone/gatherer
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/collection/BasicCollectionConfiguration.java
r14049 r16267 56 56 private String name = ""; 57 57 private String is_public = ""; 58 private String collectgroup = "false"; 58 59 59 60 private String site = null; // used for gs3 colls … … 95 96 else if(command_type_str.equals(StaticStrings.COLLECTIONMETADATA_MAINTAINER_STR)) { 96 97 maintainer = tokenizer.nextToken(); 98 } 99 else if(command_type_str.equals(StaticStrings.COLLECTIONMETADATA_COLLECTGROUP_STR)) { 100 collectgroup = tokenizer.nextToken(); 97 101 } 98 102 else if(command_type_str.equalsIgnoreCase(StaticStrings.COLLECTIONMETADATA_STR)) { … … 228 232 return is_public; 229 233 } 234 235 public String getCollectGroup() { 236 return collectgroup; 237 } 230 238 231 239 /** Retrieve the short name for this collection which, given this current file is in <col_name>/etc/collect.cfg, is the name of this file's parent file's parent. -
gli/trunk/src/org/greenstone/gatherer/collection/ScriptOptions.java
r14974 r16267 252 252 Process process = runtime.exec(args); 253 253 254 /*254 255 255 for (int i=0; i<args.length; i++) { 256 256 System.err.print(args[i] + " "); 257 257 } 258 258 System.err.println(""); 259 */259 260 260 261 261 -
gli/trunk/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java
r14753 r16267 253 253 return; 254 254 } 255 256 load_collection_configs(data,collect_directory); 257 258 } 259 260 261 protected void load_collection_configs(TreeSet data, File collect_directory) { 262 255 263 File[] collection_folders = collect_directory.listFiles(); 264 256 265 for(int i = 0; i < collection_folders.length; i++) { 257 266 File collection_folder = collection_folders[i]; 258 267 String collection_foldername = collection_folder.getName(); 268 259 269 if(collection_folder.isDirectory() && !collection_foldername.equals(StaticStrings.MODEL_COLLECTION_NAME)) { 260 270 // this 'file_name' has already been prefixed by 'etc' … … 267 277 } 268 278 269 //String file_name = (Gatherer.GS3)? Utility.CONFIG_GS3_FILE : Utility.CONFIG_FILE;270 279 File config_file = new File(collection_folder, file_name); 271 280 File collection_metadata_directory = new File(collection_folder, "metadata"); 272 281 if (collection_metadata_directory.exists() && config_file.exists()) { 273 282 BasicCollectionConfiguration collection_configuration = new BasicCollectionConfiguration(config_file); 274 data.add(collection_configuration); 283 284 // look to see if group set? 285 // => if it is, don't add, but recurse to look for child collections in collect-group 286 287 if (collection_configuration.getCollectGroup().equals("true")) { 288 load_collection_configs(data, collection_folder); 289 } 290 else { 291 data.add(collection_configuration); 292 } 275 293 } 276 294 config_file = null; … … 282 300 collect_directory = null; 283 301 } 302 303 284 304 285 305 public Object getElementAt(int index) { -
gli/trunk/src/org/greenstone/gatherer/util/StaticStrings.java
r15882 r16267 73 73 static final public String COLLECTIONMETADATA_PUBLIC_ELEMENT = "Public"; 74 74 static final public String COLLECTIONMETADATA_PUBLIC_STR = "public"; 75 static final public String COLLECTIONMETADATA_COLLECTGROUP_STR = "collectgroup"; 75 76 static final public String COLLECTIONMETADATA_STR = "collectionmeta"; 76 77 static final public String COLON_CHARACTER = ":";
Note:
See TracChangeset
for help on using the changeset viewer.