Project

General

Profile

« Previous | Next » 

Revision 6935

generate ORE maps only once -- and persist the flag to the main backup properties so that subsequent Metacat upgrades remember this value.

View differences:

lib/metacat.properties.metadata.xml
414 414
		<description> </description>
415 415
		<helpFile> </helpFile>
416 416
	</config>
417
	<config>
418
	    <key>dataone.ore.generated</key>
419
	    <label>Have the ORE maps been generated?</label>
420
	    <group>6</group>
421
	    <index>8</index>                
422
		<fieldType>hidden</fieldType>
423
		<description> </description>
424
		<helpFile> </helpFile>
425
	</config>
417 426
	
418

  
419 427
</metadataConfig>
lib/metacat.properties
482 482
test.lterUser=uid=tmonkey,o=LTER,dc=ecoinformatics,dc=org
483 483
test.lterPassword=T3$tusr
484 484
test.testProperty=testing
485
test.replication.targetServer=demo3.test.dataone.org/knb
485
test.replication.targetServer=fred.msi.ucsb.edu/knb
486 486

  
487 487
######## Developers Section #########################################
488 488

  
......
544 544
# DataONE types XSLT
545 545
dataone.types.xsl=/cn/xslt/dataone.types.v1.xsl
546 546

  
547
# DataONE configuration settings
548
dataone.ore.generated=false
549

  
547 550
############# Global Identifiers Assignment Section ######################
548 551
guid.assignGUIDs=false
549 552
guid.ezid.username=apitest
src/edu/ucsb/nceas/metacat/admin/D1Admin.java
42 42
import org.dataone.service.types.v1.Session;
43 43

  
44 44
import edu.ucsb.nceas.metacat.IdentifierManager;
45
import edu.ucsb.nceas.metacat.admin.upgrade.GenerateORE;
45 46
import edu.ucsb.nceas.metacat.dataone.MNodeService;
46 47
import edu.ucsb.nceas.metacat.properties.PropertyService;
47 48
import edu.ucsb.nceas.metacat.shared.MetacatUtilException;
......
287 288
					PropertyService.setPropertyNoPersist("dataone.nodeSynchronization.schedule.sec", sec);
288 289
					
289 290
					PropertyService.persistProperties();
291
					
292
			        // Register/update as a DataONE Member Node					
293
					registerDataONEMemberNode();
290 294

  
295
					// Generate ORE, if we haven't
296
					boolean oreGenerated = Boolean.parseBoolean(PropertyService.getProperty("configutil.dataone.ore.generated"));
297
					if (!oreGenerated) {
298
						GenerateORE gore = new GenerateORE();
299
						gore.upgrade();
300
						PropertyService.setProperty("dataone.ore.generated", Boolean.TRUE.toString());
301

  
302
					}
303
					
291 304
					// write the backup properties to a location outside the
292 305
					// application directories so they will be available after
293 306
					// the next upgrade
294 307
					PropertyService.persistMainBackupProperties();
295 308
					
296
			        // Register as a DataONE Member Node
297
					if (replicate) {
298
						registerDataONEMemberNode();
299
					}
300 309
				}
301 310
			} catch (GeneralPropertyException gpe) {
302 311
				String errorMessage = "D1Admin.configureDataONE - Problem getting or setting property while "
......
325 334
							"/admin?configureType=configure&processForm=false", null);
326 335
				}
327 336
			} catch (MetacatUtilException mue) {
328
				throw new AdminException("D1Admin.configureDataONE - utility problem while processing geoservices "
329
						+ "geoservices page: " + mue.getMessage());
337
				throw new AdminException("D1Admin.configureDataONE - utility problem while processing dataone configuration: "
338
					 + mue.getMessage());
330 339
			} catch (GeneralPropertyException gpe) {
331 340
				throw new AdminException("D1Admin.configureDataONE - problem with properties while "
332 341
						+ "processing geoservices configuration page: " + gpe.getMessage());

Also available in: Unified diff