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.redlist.gefaesspflanzen;
|
12
|
|
13
|
import org.apache.log4j.Logger;
|
14
|
|
15
|
import eu.etaxonomy.cdm.io.common.mapping.InputTransformerBase;
|
16
|
import eu.etaxonomy.cdm.io.common.mapping.UndefinedTransformerMethodException;
|
17
|
import eu.etaxonomy.cdm.model.name.Rank;
|
18
|
|
19
|
/**
|
20
|
*
|
21
|
* @author pplitzner
|
22
|
* @date Mar 1, 2016
|
23
|
*
|
24
|
*/
|
25
|
@SuppressWarnings("serial")
|
26
|
public final class RedListGefaesspflanzenTransformer extends InputTransformerBase {
|
27
|
|
28
|
@SuppressWarnings("unused")
|
29
|
private static final Logger logger = Logger.getLogger(RedListGefaesspflanzenTransformer.class);
|
30
|
|
31
|
@Override
|
32
|
public Rank getRankByKey(String key) throws UndefinedTransformerMethodException {
|
33
|
if (key == null){return null;}
|
34
|
if (key.equals("GAT")){return Rank.GENUS();}
|
35
|
else if (key.equals("SPE")){return Rank.SPECIES();}
|
36
|
else if (key.equals("VAR")){return Rank.VARIETY();}
|
37
|
else if (key.equals("SSP")){return Rank.SUBSPECIES();}
|
38
|
return null;
|
39
|
}
|
40
|
|
41
|
|
42
|
|
43
|
}
|