Changeset 5723
- Timestamp:
- 2003-10-23T11:27:09+13:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r5678 r5723 270 270 } 271 271 272 boolean skip_import_phase = false; 273 272 274 // Before we create the CollectionDesignManager we have to check if we are basing it upon some other collection. 273 275 if(base_collection_directory != null) { 274 Gatherer.println("Basing new collection on existing one: " + base_collection_directory); 276 Gatherer.println("Basing new collection on existing one: " + base_collection_directory); 277 collection.setBaseCollection(base_collection_directory.getAbsolutePath()); 275 278 // Try to import any existing metadata sets for this collection. Look in base_collection_directory/metadata and import any metadata sets found. 276 279 File base_metadata = new File(base_collection_directory, Utility.META_DIR); … … 283 286 Gatherer.println("+ Found a metadata set. Importing: " + possible_metadata_sets[i].getAbsolutePath()); 284 287 collection.msm.importMDS(possible_metadata_sets[i], false); 288 skip_import_phase = true; 285 289 } 286 290 } … … 290 294 } 291 295 // If no sets were imported, then create a new metadata with this new collections name. Note that if this is one of the 'big five' collections then I already know the importing mappings as well. 292 boolean skip_import_phase = false;293 296 if(collection.msm.getSets().size() == 0) { 294 297 Gatherer.println("As there are no metadata sets loaded yet, we'll make special checks for the collections available on the GS2.39CD."); … … 376 379 } 377 380 378 // Always import the extracted metadata set 379 collection.msm.importMDS(new File(Utility.METADATA_DIR + Utility.EXTRACTED_METADATA_NAMESPACE + StaticStrings.METADATA_SET_EXTENSION), false); 380 381 // Always import the extracted metadata set if we didn't already 382 if(collection.msm.getSet(Utility.EXTRACTED_METADATA_NAMESPACE) == null) { 383 collection.msm.importMDS(new File(Utility.METADATA_DIR + Utility.EXTRACTED_METADATA_NAMESPACE + StaticStrings.METADATA_SET_EXTENSION), false); 384 } 385 381 386 collection.cdm = new CollectionDesignManager(new File(getCollectionConfig())); 382 387 collection.gdm = new GDMManager(); … … 1248 1253 // We replace the creator string with our own. 1249 1254 if(command_lc.startsWith(Utility.CFG_CREATOR)) { 1250 write(out, Utility.CFG_CREATOR + " " + email); 1255 ///ystem.err.println("Found creator - replace with current"); 1256 write(out, Utility.CFG_CREATOR + " " + email); 1251 1257 } 1252 1258 else if(command_lc.startsWith(Utility.CFG_MAINTAINER)) { 1253 write(out, Utility.CFG_MAINTAINER + " " + email); 1259 ///ystem.err.println("Found maintainer - replace with current"); 1260 write(out, Utility.CFG_MAINTAINER + " " + email); 1254 1261 } 1255 1262 else if(command_lc.startsWith(Utility.CFG_COLLECTIONMETA_COLLECTIONNAME)) {
Note:
See TracChangeset
for help on using the changeset viewer.