Project

General

Profile

Revision 521599f6

ID521599f67ac1a22011e87fb4989cd92833bffbed
Parent 209a4cf6
Child b06dca5c

Added by Andreas Müller almost 3 years ago

minor compile issues

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/io/algaterra/AlgaTerraEcoFactImport.java
27 27
import eu.etaxonomy.cdm.io.berlinModel.in.BerlinModelImportState;
28 28
import eu.etaxonomy.cdm.io.common.IOValidator;
29 29
import eu.etaxonomy.cdm.io.common.ResultSetPartitioner;
30
import eu.etaxonomy.cdm.io.common.mapping.UndefinedTransformerMethodException;
31 30
import eu.etaxonomy.cdm.model.common.CdmBase;
32 31
import eu.etaxonomy.cdm.model.common.DefinedTerm;
33 32
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
......
330 329

  
331 330

  
332 331
	private UUID getParameterFeatureUuid(AlgaTerraImportState state, String key) {
333
		try {
334
			return AlgaTerraImportTransformer.getFeatureUuid(key);
335
		} catch (UndefinedTransformerMethodException e) {
336
			throw new RuntimeException(e);
337
		}
332
		return AlgaTerraImportTransformer.getFeatureUuid(key);
338 333
	}
339 334

  
340 335

  
app-import/src/main/java/eu/etaxonomy/cdm/io/algaterra/AlgaTerraImportTransformer.java
1 1
/**
2
 * 
2
 *
3 3
 */
4 4
package eu.etaxonomy.cdm.io.algaterra;
5 5

  
......
45 45
	public static final UUID uuidFeatureRaphe = UUID.fromString("b6743a16-23d4-4645-a63d-3b2f711971c1");
46 46
	public static final UUID uuidFeatureShape = UUID.fromString("a8f9b43f-53cb-4f0c-bb5e-8f9f8748882b");
47 47
	public static final UUID uuidFeatureSymmetrie = UUID.fromString("cc5e4ce9-c259-4744-9c99-f16144ca7a55");
48
	
48

  
49 49
	public static final UUID uuidFeatureApices = UUID.fromString("34d3dd86-cfce-4b65-9866-71a9be020edf");
50 50
	public static final UUID uuidFeatureChloroplastNumber = UUID.fromString("d1ef5be9-9c67-4ed0-84d4-d3bb57adddd9");
51 51
	public static final UUID uuidFeaturePyrenoid = UUID.fromString("6a42b427-69be-4cc1-a2de-fd813474d522");
......
64 64
	public static final UUID uuidFeatureCentralAreaValve1 = UUID.fromString("cacd7b76-080c-4de2-a19d-c3f382729a04");
65 65
	public static final UUID uuidFeatureAxialAreaValve1 = UUID.fromString("450578cd-0a53-4fe0-9d43-aecfc1d7fdd9");
66 66
	public static final UUID uuidFeatureHasRapheValve1 = UUID.fromString("69acb582-7a3e-4e12-9a9e-ab1871e0a0c9");
67
	
67

  
68 68
	public static final UUID uuidFeatureValve2 = UUID.fromString("5e34f17f-9628-4a3d-a974-df4e709d68fb");
69 69
	public static final UUID uuidFeatureStriaeFrequencyValve2 = UUID.fromString("db8f1200-5c17-4410-a58d-d93abcb3059b");
70 70
	public static final UUID uuidFeatureStriaeOrientationMidValve2 = UUID.fromString("87d50361-25f6-4d10-a830-ce17c9392825");
......
73 73
	public static final UUID uuidFeatureAxialAreaValve2 = UUID.fromString("0d84c46b-789f-430a-ab55-81e2b280d8d4");
74 74
	public static final UUID uuidFeatureHasRapheValve2 = UUID.fromString("b0d99b12-8de2-43e6-83d0-2e94ca71a53e");
75 75
	public static final UUID uuidFeatureSalinity = UUID.fromString("2c9377d6-73d9-4401-a113-799eb3752ef3");
76
	
76

  
77 77
	public static final UUID uuidFeatureLivingSpecimen = UUID.fromString("0f167e2e-6494-4cf6-93a5-d92266626ec9");
78
	
78

  
79 79

  
80 80
	public static final UUID uuidVocChloroplastPosition = UUID.fromString("0ef57573-09e0-4ed6-a6bc-d80a8f927113");
81 81
	public static final UUID uuidVocChloroplastShape = UUID.fromString("7777329d-a5e5-4f3d-a85b-2cd5be82080a");
......
86 86
	public static final UUID uuidVocShape = UUID.fromString("11f9f0af-da1b-44a0-8673-99e418ad6b97");
87 87
	public static final UUID uuidVocSymmetry = UUID.fromString("3b7b921f-5d49-4cd7-b73d-29c4710f95da");
88 88

  
89
	
89

  
90 90
	public static final UUID uuidMeasurementUnitMgL = UUID.fromString("7ac302c5-3cbd-4334-964a-bf5d11eb9ead");
91 91
	public static final UUID uuidMeasurementUnitMolMol = UUID.fromString("96b78d78-3e49-448f-8100-e7779b71dd53");
92 92
	public static final UUID uuidMeasurementUnitMicroMolSiL = UUID.fromString("2cb8bc85-a4af-42f1-b80b-34c36c9f75d4");
......
95 95
	public static final UUID uuidMeasurementUnitPercent = UUID.fromString("3ea3110e-f048-4bed-8bfe-33c60f63626f");
96 96
	public static final UUID uuidMeasurementUnitCm = UUID.fromString("3ea3110e-f048-4bed-8bfe-33c60f63626f");
97 97
	public static final UUID uuidMeasurementUnitMicroSiCm = UUID.fromString("3ea3110e-f048-4bed-8bfe-33c60f63626f");
98
	
99
	
98

  
99

  
100 100
	public static final UUID uuidNamedAreaVocAlgaTerraInformalAreas = UUID.fromString("ebce2f16-2a5d-4845-b4b8-f7841796a093");
101 101
	public static final UUID uuidNamedAreaPatagonia = UUID.fromString("e0423d0a-87c3-41aa-afa3-8f2a86aa06dd");
102 102
	public static final UUID uuidNamedAreaTierraDelFuego = UUID.fromString("53cf6dc2-b5cc-42be-9fad-7158b8f682f4");
103 103
	public static final UUID uuidNamedAreaBorneo = UUID.fromString("6bb908af-be16-402b-973b-3ea20df1d70d");
104
	
104

  
105 105
	public static final UUID uuidKindOfUnitVoc = UUID.fromString("400d3ef7-1882-4ed6-bb76-f98f636b595c");
106
	
107
	
106

  
107

  
108 108
	/* (non-Javadoc)
109 109
	 * @see eu.etaxonomy.cdm.io.common.mapping.IInputTransformer#getFeatureByKey(java.lang.String)
110 110
	 */
......
113 113
		throw new UndefinedTransformerMethodException(warning);
114 114
	}
115 115

  
116
	/* (non-Javadoc)
117
	 * @see eu.etaxonomy.cdm.io.common.mapping.IInputTransformer#getFeatureUuid(java.lang.String)
118
	 */
119
	public static UUID getFeatureUuid(String key) throws UndefinedTransformerMethodException {
116
	public static UUID getFeatureUuid(String key) {
120 117
		if (key == null){ return null;
121 118
		}else if(key.equalsIgnoreCase("pH")){return uuidFeaturePH;
122 119
		}else if(key.equalsIgnoreCase("Conductivity")){return uuidFeatureConductivity;
......
143 140
		}else if (key.equalsIgnoreCase("Raphe")){return uuidFeatureRaphe;
144 141
		}else if (key.equalsIgnoreCase("Shape")){return uuidFeatureShape;
145 142
		}else if (key.equalsIgnoreCase("Symmetry")){return uuidFeatureSymmetrie;
146
		
143

  
147 144
		}else if (key.equalsIgnoreCase("Apices")){return uuidFeatureApices;
148 145
		}else if (key.equalsIgnoreCase("Chloroplast Number")){return uuidFeatureChloroplastNumber;
149 146
		}else if (key.equalsIgnoreCase("Pyrenoid")){return uuidFeaturePyrenoid;
150 147
		}else if (key.equalsIgnoreCase("Cell Wall")){return uuidFeatureCellWall;
151 148
		}else if (key.equalsIgnoreCase("Reproductive Stages")){return uuidFeatureReproductiveStages;
152
	
149

  
153 150
		}else if (key.equalsIgnoreCase("Valve 1")){return uuidFeatureValve1;
154 151
		}else if (key.equalsIgnoreCase("Striae Frequency Valve 1")){return uuidFeatureStriaeFrequencyValve1;
155 152
		}else if (key.equalsIgnoreCase("Striae Orientation Mid Valve 1")){return uuidFeatureStriaeOrientationMidValve1;
......
174 171
		}
175 172
	}
176 173

  
177
	
174

  
178 175
	public static UUID getMeasurementUnitUuid(String key) {
179
		if (key == null){ return null;	
176
		if (key == null){ return null;
180 177
		}else if (key.equalsIgnoreCase("mg/L")){ return uuidMeasurementUnitMgL;
181 178
		}else if (key.equalsIgnoreCase("mol/mol")){ return uuidMeasurementUnitMolMol;
182
		}else if (key.equalsIgnoreCase("\u00B5mol Si/L")){return uuidMeasurementUnitMicroMolSiL;   //µmol Si/L 
179
		}else if (key.equalsIgnoreCase("\u00B5mol Si/L")){return uuidMeasurementUnitMicroMolSiL;   //µmol Si/L
183 180
		}else if (key.equalsIgnoreCase("\u00B5mol/L")){	return uuidMeasurementUnitMicroMolL;	//µmol/L
184 181
		}else if (key.equalsIgnoreCase("\u00B0C")){ return uuidMeasurementUnitDegreeC;           //°C
185 182
		}else if (key.equalsIgnoreCase("%")){ return uuidMeasurementUnitPercent;
app-import/src/main/java/eu/etaxonomy/cdm/io/algaterra/AlgaTerraMorphologyImport.java
29 29
import eu.etaxonomy.cdm.io.common.IOValidator;
30 30
import eu.etaxonomy.cdm.io.common.ResultSetPartitioner;
31 31
import eu.etaxonomy.cdm.io.common.Source;
32
import eu.etaxonomy.cdm.io.common.mapping.UndefinedTransformerMethodException;
33 32
import eu.etaxonomy.cdm.model.common.CdmBase;
34 33
import eu.etaxonomy.cdm.model.common.DefinedTerm;
35 34
import eu.etaxonomy.cdm.model.common.OriginalSourceType;
......
218 217
		String baseNameCamel = baseName.replace(" ", "");
219 218

  
220 219
		UUID uuidFeature = null;
221
		try {
222
			uuidFeature = AlgaTerraImportTransformer.getFeatureUuid(baseName);
223
		} catch (UndefinedTransformerMethodException e) {
224
			throw new RuntimeException(e);
225
		}
220
		uuidFeature = AlgaTerraImportTransformer.getFeatureUuid(baseName);
226 221
		Feature feature = getFeature(state, uuidFeature, baseName, baseName, null, algaTerraMorphoFeatures);
227 222
		algaTerraMorphoFeatures.addTerm(feature);
228 223
		featureMap.put(baseNameCamel, feature);
......
555 550

  
556 551

  
557 552
	private UUID getParameterFeatureUuid(AlgaTerraImportState state, String key) {
558
		try {
559
			return AlgaTerraImportTransformer.getFeatureUuid(key);
560
		} catch (UndefinedTransformerMethodException e) {
561
			throw new RuntimeException(e);
562
		}
553
		return AlgaTerraImportTransformer.getFeatureUuid(key);
563 554
	}
564 555

  
565 556

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)