3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
11 package eu
.etaxonomy
.cdm
.io
.sdd
;
13 import java
.util
.UUID
;
15 import org
.apache
.log4j
.Logger
;
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
;
28 public class SDDTransformer
extends InputTransformerBase
{
29 @SuppressWarnings("unused")
30 private static final Logger logger
= Logger
.getLogger(SDDTransformer
.class);
35 public static final UUID uuidNote
= UUID
.fromString("b9af1489-6b68-497f-8d4b-260a9f886827");
37 //extension type uuids
38 public static final UUID uuidTitle
= UUID
.fromString("5d9ca987-81f1-4d6c-b06a-eaa8311ca249");
41 public static final UUID uuidExcludedTaxon
= UUID
.fromString("e729a22d-8c94-4859-9f91-3e3ae212c91d");
45 * @see eu.etaxonomy.cdm.io.common.mapping.InputTransformerBase#getFeatureByKey(java.lang.String)
48 public Feature
getFeatureByKey(String key
) throws UndefinedTransformerMethodException
{
49 if (CdmUtils
.isEmpty(key
)){return null;
50 }else if (key
.equalsIgnoreCase("distribution")){return Feature
.DISTRIBUTION();
51 }else if (key
.equalsIgnoreCase("habitatecology")){return Feature
.ECOLOGY();
58 * @see eu.etaxonomy.cdm.io.common.mapping.InputTransformerBase#getFeatureUuid(java.lang.String)
61 public UUID
getFeatureUuid(String key
) throws UndefinedTransformerMethodException
{
62 if (CdmUtils
.isEmpty(key
)){return null;
64 }else if (key
.equalsIgnoreCase("lifeform")){return uuidNote
;
75 * @see eu.etaxonomy.cdm.io.common.mapping.InputTransformerBase#getMarkerTypeByKey(java.lang.String)
78 public MarkerType
getMarkerTypeByKey(String key
) throws UndefinedTransformerMethodException
{
79 if (CdmUtils
.isEmpty(key
)){return null;
80 // }else if (key.equalsIgnoreCase("distribution")){return MarkerType.;
81 // }else if (key.equalsIgnoreCase("habitatecology")){return Feature.ECOLOGY();
88 public UUID
getMarkerTypeUuid(String key
) throws UndefinedTransformerMethodException
{
89 if (CdmUtils
.isEmpty(key
)){return null;
90 }else if (key
.equalsIgnoreCase("excluded")){return uuidExcludedTaxon
;
91 }else if (key
.equalsIgnoreCase("EXCLUDED SPECIES, OF UNCERTAIN AFHNITIES PTELEOCARPA")){return uuidExcludedTaxon
;
92 }else if (key
.equalsIgnoreCase("EXCLUDED GENUS, OF UNCERTAIN AFHNITIES PTELEOCARPA")){return uuidExcludedTaxon
;
93 }else if (key
.equalsIgnoreCase("INCOMPLETELY KNOWN SPECIES")){return uuidNote
;