Project

General

Profile

« Previous | Next » 

Revision 6a1586a3

Added by Andreas Müller almost 12 years ago

update for moose activator

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/app/berlinModelImport/MTMooseActivator.java
43 43
	//database validation status (create, update, validate ...)
44 44
	static DbSchemaValidation hbm2dll = DbSchemaValidation.CREATE;
45 45
	static final Source berlinModelSource = BerlinModelSources.MT_MOOSE();
46
	static final ICdmDataSource cdmDestination = CdmDestinations.localH2();
46
//	static final ICdmDataSource cdmDestination = CdmDestinations.localH2();
47 47
//	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_mt_moose();
48
	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql_moose();
49
	
48 50
	
49 51
	static final UUID classificationUuid = UUID.fromString("601d8a00-cffe-4509-af93-b15b543ccf8d");
50
	static final int sourceSecId = 7331;
51 52
	static final UUID sourceRefUuid = UUID.fromString("601d8a00-cffe-4509-af93-b15b543ccf8d");
52 53
	
53 54
	static final UUID featureTreeUuid = UUID.fromString("4c5b5bbe-6fef-4607-96b2-1b0104eac19e");
54 55
	static final Object[] featureKeyList = new Integer[]{7,201,202,203,204,205,206,207}; 
55 56
	
56 57
	//check - import
57
	static final CHECK check = CHECK.IMPORT_WITHOUT_CHECK;
58
	static final CHECK check = CHECK.CHECK_AND_IMPORT;
58 59

  
59 60

  
60 61
	//NomeclaturalCode
......
111 112
		BerlinModelImportConfigurator bmImportConfigurator = BerlinModelImportConfigurator.NewInstance(source,  destination);
112 113
		
113 114
		bmImportConfigurator.setClassificationUuid(classificationUuid);
114
		bmImportConfigurator.setSourceSecId(sourceSecId);
115
//		bmImportConfigurator.setSourceSecId(sourceSecId);
115 116
		bmImportConfigurator.setNomenclaturalCode(nomenclaturalCode);
116 117

  
117 118
		bmImportConfigurator.setDoAuthors(doAuthors);
......
142 143
			
143 144
			//make feature tree
144 145
			FeatureTree tree = TreeCreator.flatTree(featureTreeUuid, bmImportConfigurator.getFeatureMap(), featureKeyList);
145
			FeatureNode imageNode = FeatureNode.NewInstance(Feature.IMAGE());
146
			tree.getRoot().addChild(imageNode);
147 146
			FeatureNode distributionNode = FeatureNode.NewInstance(Feature.DISTRIBUTION());
148
			tree.getRoot().addChild(distributionNode, 2); 
147
			tree.getRoot().addChild(distributionNode, 0); 
149 148
			app.getFeatureTreeService().saveOrUpdate(tree);
150 149
		}
151 150
		

Also available in: Unified diff