1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.cdm.io.caryo;
|
11
|
|
12
|
import java.util.UUID;
|
13
|
|
14
|
import org.apache.commons.lang.StringUtils;
|
15
|
import org.apache.log4j.Logger;
|
16
|
|
17
|
import eu.etaxonomy.cdm.io.common.mapping.InputTransformerBase;
|
18
|
import eu.etaxonomy.cdm.io.common.mapping.UndefinedTransformerMethodException;
|
19
|
import eu.etaxonomy.cdm.model.common.MarkerType;
|
20
|
|
21
|
/**
|
22
|
* @author a.mueller
|
23
|
* @created 01.03.2010
|
24
|
* @version 1.0
|
25
|
*/
|
26
|
public final class CaryoTransformer extends InputTransformerBase {
|
27
|
@SuppressWarnings("unused")
|
28
|
private static final Logger logger = Logger.getLogger(CaryoTransformer.class);
|
29
|
|
30
|
|
31
|
//feature
|
32
|
// public static final UUID endemismUuid = UUID.fromString("dd343c31-1916-4786-a530-536ea995dce4");
|
33
|
|
34
|
|
35
|
|
36
|
/* (non-Javadoc)
|
37
|
* @see eu.etaxonomy.cdm.io.common.mapping.InputTransformerBase#getMarkerTypeByKey(java.lang.String)
|
38
|
*/
|
39
|
@Override
|
40
|
public MarkerType getMarkerTypeByKey(String key) throws UndefinedTransformerMethodException {
|
41
|
if (StringUtils.isBlank(key)){return null;
|
42
|
// }else if (key.equalsIgnoreCase("distribution")){return MarkerType.;
|
43
|
// }else if (key.equalsIgnoreCase("habitatecology")){return Feature.ECOLOGY();
|
44
|
}else{
|
45
|
return null;
|
46
|
}
|
47
|
}
|
48
|
|
49
|
@Override
|
50
|
public UUID getMarkerTypeUuid(String key) throws UndefinedTransformerMethodException {
|
51
|
if (StringUtils.isBlank(key)){return null;
|
52
|
// }else if (key.equalsIgnoreCase("IMPERFECTLY KNOWN SPECIES")){return uuidIncompleteTaxon;
|
53
|
}else{
|
54
|
return null;
|
55
|
}
|
56
|
|
57
|
}
|
58
|
|
59
|
|
60
|
|
61
|
@Override
|
62
|
public UUID getFeatureUuid(String key) throws UndefinedTransformerMethodException {
|
63
|
if (StringUtils.isBlank(key)){return null;
|
64
|
// }else if (key.equalsIgnoreCase("Endemism")){return endemismUuid;
|
65
|
}else{
|
66
|
return null;
|
67
|
}
|
68
|
|
69
|
}
|
70
|
|
71
|
|
72
|
|
73
|
|
74
|
|
75
|
|
76
|
|
77
|
|
78
|
|
79
|
}
|