Remove generics from Reference in cdmlib (except for cdmlib-model) #5830
[cdmlib.git] / cdmlib-io / src / main / java / eu / etaxonomy / cdm / io / sdd / SDDTransformer.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10
11 package eu.etaxonomy.cdm.io.sdd;
12
13 import java.util.UUID;
14
15 import org.apache.log4j.Logger;
16
17 import eu.etaxonomy.cdm.common.CdmUtils;
18 import eu.etaxonomy.cdm.io.common.mapping.InputTransformerBase;
19 import eu.etaxonomy.cdm.io.common.mapping.UndefinedTransformerMethodException;
20 import eu.etaxonomy.cdm.model.common.MarkerType;
21 import eu.etaxonomy.cdm.model.description.Feature;
22
23 /**
24 * @author a.mueller
25 * @created 01.03.2010
26 * @version 1.0
27 */
28 public class SDDTransformer extends InputTransformerBase {
29 @SuppressWarnings("unused")
30 private static final Logger logger = Logger.getLogger(SDDTransformer.class);
31
32
33
34 // //feature uuids
35 // public static final UUID uuidNote = UUID.fromString("b9af1489-6b68-497f-8d4b-260a9f886827");
36 //
37 //marker type uuid
38 public static final UUID uuidMarkerEditor = UUID.fromString("9f06df5b-7b89-43d2-ac4a-8c57a173af8d");
39 public static final UUID uuidMarkerSDDGeographicArea = UUID.fromString("aa623fc8-bfb6-4bc9-b0d4-62f7a022d472");
40 public static final UUID uuidMarkerDescriptiveConcept = UUID.fromString("037e8126-334e-460c-bfb3-cee640dfa3a3");
41
42
43 /* (non-Javadoc)
44 * @see eu.etaxonomy.cdm.io.common.mapping.InputTransformerBase#getFeatureByKey(java.lang.String)
45 */
46 @Override
47 public Feature getFeatureByKey(String key) throws UndefinedTransformerMethodException {
48 if (CdmUtils.isEmpty(key)){return null;
49 // }else if (key.equalsIgnoreCase("distribution")){return Feature.DISTRIBUTION();
50 // }else if (key.equalsIgnoreCase("habitatecology")){return Feature.ECOLOGY();
51 }else{
52 return null;
53 }
54 }
55
56 /* (non-Javadoc)
57 * @see eu.etaxonomy.cdm.io.common.mapping.InputTransformerBase#getFeatureUuid(java.lang.String)
58 */
59 @Override
60 public UUID getFeatureUuid(String key) throws UndefinedTransformerMethodException {
61 if (CdmUtils.isEmpty(key)){return null;
62
63 // }else if (key.equalsIgnoreCase("lifeform")){return uuidNote;
64
65 }else{
66 return null;
67 }
68
69 }
70
71
72
73 /* (non-Javadoc)
74 * @see eu.etaxonomy.cdm.io.common.mapping.InputTransformerBase#getMarkerTypeByKey(java.lang.String)
75 */
76 @Override
77 public MarkerType getMarkerTypeByKey(String key) throws UndefinedTransformerMethodException {
78 if (CdmUtils.isEmpty(key)){return null;
79 // }else if (key.equalsIgnoreCase("distribution")){return MarkerType.;
80 // }else if (key.equalsIgnoreCase("habitatecology")){return Feature.ECOLOGY();
81 }else{
82 return null;
83 }
84 }
85
86 @Override
87 public UUID getMarkerTypeUuid(String key) throws UndefinedTransformerMethodException {
88 if (CdmUtils.isEmpty(key)){return null;
89 // }else if (key.equalsIgnoreCase("excluded")){return uuidExcludedTaxon;
90 // }else if (key.equalsIgnoreCase("EXCLUDED SPECIES, OF UNCERTAIN AFHNITIES PTELEOCARPA")){return uuidExcludedTaxon;
91 // }else if (key.equalsIgnoreCase("EXCLUDED GENUS, OF UNCERTAIN AFHNITIES PTELEOCARPA")){return uuidExcludedTaxon;
92 // }else if (key.equalsIgnoreCase("INCOMPLETELY KNOWN SPECIES")){return uuidNote;
93 }else{
94 return null;
95 }
96
97 }
98
99
100
101
102
103 }