Project

General

Profile

Download (2.06 KB) Statistics
| Branch: | Revision:
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
        else if (key.equals("FOR")){return Rank.FORM();}
39
        else if (key.equals("RAC")){return Rank.RACE();}
40
        else if (key.equals("SEC")){return Rank.SECTION_BOTANY();}
41
        else if (key.equals("SSE")){return Rank.SUBSECTION_BOTANY();}
42
        else if (key.equals("SGE")){return Rank.SUBGENUS();}
43
        else if (key.equals("SVA")){return Rank.SUBVARIETY();}
44
        else if (key.equals("CV")){return Rank.CULTIVAR();}
45
        else if (key.equals("PRO")){return Rank.PROLES();}
46
        else if (key.equals("SER")){return Rank.SERIES();}
47
        else if (key.equals("GRE")){return Rank.GREX();}
48
        else if (key.equals("AGG")){return Rank.SPECIESAGGREGATE();}
49
        else if (key.equals("GRO")){return Rank.SPECIESGROUP();}
50
        else if (key.equals("ORA")){return null;}
51
        else if (key.equals("?")){return Rank.UNKNOWN_RANK();}
52
        return null;
53
    }
54

    
55

    
56

    
57
}
(6-6/6)