Project

General

Profile

« Previous | Next » 

Revision 3407a162

Added by Andreas Müller almost 12 years ago

latest changes to Gabon and Guiana activators

View differences:

cdm-eflora/src/main/java/eu/etaxonomy/cdm/app/eflora/FloraGuianasActivator.java
27 27
import eu.etaxonomy.cdm.io.common.events.LoggingIoObserver;
28 28
import eu.etaxonomy.cdm.io.common.mapping.IInputTransformer;
29 29
import eu.etaxonomy.cdm.io.common.mapping.UndefinedTransformerMethodException;
30
import eu.etaxonomy.cdm.io.eflora.floraMalesiana.FloraMalesianaTransformer;
31 30
import eu.etaxonomy.cdm.io.markup.MarkupImportConfigurator;
31
import eu.etaxonomy.cdm.io.markup.MarkupTransformer;
32 32
import eu.etaxonomy.cdm.model.description.Feature;
33 33
import eu.etaxonomy.cdm.model.description.FeatureNode;
34 34
import eu.etaxonomy.cdm.model.description.FeatureTree;
......
55 55
	
56 56
//	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_flora_guianas_preview();
57 57
//	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_flora_guianas_production();
58
//	static final ICdmDataSource cdmDestination = CdmDestinations.localH2();
59
	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql();
58
	static final ICdmDataSource cdmDestination = CdmDestinations.localH2();
59
//	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql();
60 60
	
61 61

  
62 62
	//feature tree uuid
......
65 65
	//classification
66 66
	static final UUID classificationUuid = UUID.fromString("5e3a1b07-2609-4597-bbda-7b02dfe8c2b3");
67 67
	
68
	private static final String SOURCE_REFERENCE_TITLE = "Flora of the Guianas";
69
	private static final String FEATURE_TREE_TITLE = "Flora of the Guianas Feature Tree";
70

  
68 71
	//check - import
69 72
	private boolean h2ForCheck = true;
70 73
	static CHECK check = CHECK.IMPORT_WITHOUT_CHECK;
......
80 83
	private boolean includeFgu4 = false;
81 84
	
82 85
		
83
	private boolean replaceStandardKeyTitles = false;
86
	private boolean replaceStandardKeyTitles = true;
84 87

  
85 88
	private IIoObserver observer = new LoggingIoObserver();
86 89
	private Set<IIoObserver> observerList = new HashSet<IIoObserver>();
......
104 107
		markupConfig.setReplaceStandardKeyTitles(replaceStandardKeyTitles);
105 108
		
106 109
		
107
		markupConfig.setSourceReference(getSourceReference("Flore du Gabon"));
110
		markupConfig.setSourceReference(getSourceReference(SOURCE_REFERENCE_TITLE));
108 111
		
109 112
		CdmDefaultImport<MarkupImportConfigurator> myImport = new CdmDefaultImport<MarkupImportConfigurator>(); 
110 113
		
......
167 170
	}
168 171

  
169 172
	private FeatureTree makeFeatureNode(ITermService service){
170
		FloraMalesianaTransformer transformer = new FloraMalesianaTransformer();
173
		MarkupTransformer transformer = new MarkupTransformer();
171 174
		
172 175
		FeatureTree result = FeatureTree.NewInstance(featureTreeUuid);
173
		result.setTitleCache("Flore Gabon Presentation Feature Tree");
176
		result.setTitleCache(FEATURE_TREE_TITLE);
174 177
		FeatureNode root = result.getRoot();
175 178
		FeatureNode newNode;
176 179
		
......
192 195
		newNode = FeatureNode.NewInstance(Feature.DISTRIBUTION());
193 196
		root.addChild(newNode);
194 197

  
198
		newNode = FeatureNode.NewInstance(Feature.COMMON_NAME());
199
		root.addChild(newNode);
200

  
201
		newNode = FeatureNode.NewInstance(Feature.PHENOLOGY());
202
		root.addChild(newNode);
203
		
195 204
		newNode = FeatureNode.NewInstance(Feature.ECOLOGY());
196 205
		root.addChild(newNode);
197 206
		addFeataureNodesByStringList(habitatEcologyList, root, transformer, service);
......
204 213
		newNode = FeatureNode.NewInstance(Feature.CITATION());
205 214
		root.addChild(newNode);
206 215
		
216
		String sql = "\nSELECT feature.titleCache " +
217
				" FROM DescriptionElementBase deb INNER JOIN DefinedTermBase feature ON deb.feature_id = feature.id " + 
218
				" GROUP BY feature.id " + 
219
				" HAVING feature.id NOT IN (SELECT DISTINCT fn.feature_id " +
220
				" FROM FeatureNode fn " +
221
				" WHERE fn.feature_id IS NOT NULL) ";
222
		logger.warn("Check for missing features in feature tree: " + sql);
223
		
207 224
		return result;
208 225
	}
209 226
	
......
267 284
	
268 285
	private static String [] descriptionFeatureList = new String[]{
269 286
		"lifeform", 
287
		"Juvenile parts",
270 288
		"Bark",
271 289
		//new
272 290
		"wood",
......
283 301
		"Stems",  
284 302
		"stem leaves", 
285 303
		"Leaves",
304
		"extraxylary sclerenchyma",
286 305
		"flower-bearing stems",  
287 306
		"Petiole",  
288 307
		"Petiolules",  
289 308
		"Leaflets", 
309
		"Lamina",
310
		"Veins",
290 311
		"Thyrsus",  
291 312
		"Thyrses",  
292 313
		"Inflorescences",  
......
294 315
		"Young inflorescences", 
295 316
		"Male inflorescences", 
296 317
		"Female inflorescences", 
297
		"Bracts",  
318
		"rachises",
298 319
		"Pedicels",  
320
		"Bracts",  
299 321
		"flowering buds",  
300 322
		"scales",  
301 323
		"Buds",  
cdm-eflora/src/main/java/eu/etaxonomy/cdm/app/eflora/FloreGabonActivator.java
27 27
import eu.etaxonomy.cdm.io.common.events.LoggingIoObserver;
28 28
import eu.etaxonomy.cdm.io.common.mapping.IInputTransformer;
29 29
import eu.etaxonomy.cdm.io.common.mapping.UndefinedTransformerMethodException;
30
import eu.etaxonomy.cdm.io.eflora.floraMalesiana.FloraMalesianaTransformer;
31 30
import eu.etaxonomy.cdm.io.markup.MarkupImportConfigurator;
32 31
import eu.etaxonomy.cdm.io.markup.MarkupTransformer;
33 32
import eu.etaxonomy.cdm.model.description.Feature;
......
55 54
	
56 55
	
57 56
//	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_flore_gabon_preview();
58
	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_flore_gabon_production();
59
//	static final ICdmDataSource cdmDestination = CdmDestinations.localH2();
57
//	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_flore_gabon_production();
58
	static final ICdmDataSource cdmDestination = CdmDestinations.localH2();
60 59
//	static final ICdmDataSource cdmDestination = CdmDestinations.cdm_test_local_mysql();
61 60
	
62 61

  
......
189 188

  
190 189
		newNode = addFeataureNodesByStringList(generellDescriptionsFromPhytoChemoList, root, transformer, service);
191 190
		
191
		newNode = FeatureNode.NewInstance(Feature.COMMON_NAME());
192
		root.addChild(newNode);
192 193
		
193 194
		newNode = FeatureNode.NewInstance(Feature.DISTRIBUTION());
194 195
		root.addChild(newNode);
......
268 269
	
269 270
	private static String [] descriptionFeatureList = new String[]{
270 271
		"lifeform", 
272
		"Juvenile parts",
271 273
		"Bark",
272 274
		//new
273 275
		"wood",
274 276
		"Indumentum",  
275 277
		"endophytic body",  
278
		"apical buds",
276 279
		"flowering buds",  
277 280
		"Branchlets",  
278 281
		"Branches",  
......
284 287
		"Stems",  
285 288
		"stem leaves", 
286 289
		"Leaves",
290
		"extraxylary sclerenchyma",
287 291
		"flower-bearing stems",  
288 292
		"Petiole",  
289 293
		"Petiolules",  
290 294
		"Leaflets", 
295
		"Lamina",
296
		"Veins",
297
		"Lateral veins",
298
		"secondary veins",
299
		"Intersecondary veins",
300
		"veinlets",
291 301
		"Thyrsus",  
292 302
		"Thyrses",  
293 303
		"Inflorescences",  
......
295 305
		"Young inflorescences", 
296 306
		"Male inflorescences", 
297 307
		"Female inflorescences", 
308
		"rachises",
298 309
		"Bracts",  
299 310
		"Pedicels",  
300 311
		"flowering buds",  
......
311 322
		"Axillary",  
312 323
		"cymes",  
313 324
		"Calyx",  
325
		"Androgynophore",
314 326
		"Petal",  
315 327
		"Petals",
316 328
		"perigone",
......
332 344
		"Style",  
333 345
		"annulus",  
334 346
		"female flowers",  
335
		"Male flowers",  
347
		"Male flowers", 
348
		"Androphore",
336 349
		"Female",  
337 350
		"Infructescences",    //order not consistent (sometimes before "Flowers")  
338 351
		"Fruit",  
......
351 364
	
352 365
		"figure",  
353 366
		"fig",  
354
		"figs",  
367
		"figs",   
355 368

  
356 369

  
357 370
		

Also available in: Unified diff