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
.specimen
.excel
.in
;
13 import java
.util
.UUID
;
15 import org
.apache
.commons
.lang
.StringUtils
;
16 import org
.apache
.log4j
.Logger
;
18 import eu
.etaxonomy
.cdm
.io
.common
.mapping
.InputTransformerBase
;
19 import eu
.etaxonomy
.cdm
.io
.common
.mapping
.UndefinedTransformerMethodException
;
20 import eu
.etaxonomy
.cdm
.model
.location
.ReferenceSystem
;
21 import eu
.etaxonomy
.cdm
.model
.name
.SpecimenTypeDesignationStatus
;
28 public final class SpecimenCdmExcelTransformer
extends InputTransformerBase
{
29 @SuppressWarnings("unused")
30 private static final Logger logger
= Logger
.getLogger(SpecimenCdmExcelTransformer
.class);
32 public static final UUID uuidRefSysMap
= UUID
.fromString("6d72d148-458a-42eb-97b0-9824abcffc91");
33 public static final UUID uuidRefSysEstimated
= UUID
.fromString("3b625520-e5cf-4d9c-9599-0cb048e0e8d2");
34 public static final UUID uuidRefSysLabel
= UUID
.fromString("c72335ed-c9aa-4d1c-b6fc-9f307d207862");
35 public static final UUID uuidRefSysGps
= UUID
.fromString("b3c36751-b2ac-47f7-8ac1-3dc5c129e0b2");
41 * @see eu.etaxonomy.cdm.io.common.mapping.InputTransformerBase#getMarkerTypeByKey(java.lang.String)
44 public SpecimenTypeDesignationStatus
getSpecimenTypeDesignationStatusByKey(String key
) throws UndefinedTransformerMethodException
{
45 return super.getSpecimenTypeDesignationStatusByKey(key
);
49 public ReferenceSystem
getReferenceSystemByKey(String key
) throws UndefinedTransformerMethodException
{
50 if (StringUtils
.isBlank(key
)){return null;
51 // }else if (key.matches("(?i)(wgs84)")){return ReferenceSystem.WGS84();
53 ReferenceSystem result
= null;
55 result
= super.getReferenceSystemByKey(key
);
56 } catch (UndefinedTransformerMethodException e
) {
64 public UUID
getReferenceSystemUuid(String key
) throws UndefinedTransformerMethodException
{
65 if (StringUtils
.isBlank(key
)){return null;
66 }else if (key
.matches("(?i)(map)")){return uuidRefSysMap
;
67 }else if (key
.matches("(?i)(estimated)")){return uuidRefSysEstimated
;
68 }else if (key
.matches("(?i)(label)")){return uuidRefSysLabel
;
69 }else if (key
.matches("(?i)(gps)")){return uuidRefSysLabel
;