Revision c5216774
Added by Patrick Plitzner over 6 years ago
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/gefaesspflanzen/RedListGefaesspflanzenImportConfigurator.java | ||
---|---|---|
7 | 7 |
import eu.etaxonomy.cdm.io.common.mapping.IInputTransformer; |
8 | 8 |
import eu.etaxonomy.cdm.model.name.NomenclaturalCode; |
9 | 9 |
|
10 |
/** |
|
11 |
* |
|
12 |
* @author pplitzner |
|
13 |
* @date Mar 1, 2016 |
|
14 |
* |
|
15 |
*/ |
|
10 | 16 |
@SuppressWarnings("serial") |
11 | 17 |
public class RedListGefaesspflanzenImportConfigurator extends |
12 | 18 |
DbImportConfiguratorBase<RedListGefaesspflanzenImportState> implements |
... | ... | |
30 | 36 |
@Override |
31 | 37 |
protected void makeIoClassList() { |
32 | 38 |
ioClassList = new Class[]{ |
33 |
RedListGefaesspflanzenImportAuthor.class, |
|
39 |
// RedListGefaesspflanzenImportAuthor.class, |
|
40 |
RedListGefaesspflanzenImportNames.class, |
|
34 | 41 |
// RedListGefaesspflanzenImportTaxa.class, |
35 | 42 |
}; |
36 | 43 |
} |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/gefaesspflanzen/RedListGefaesspflanzenImportNames.java | ||
---|---|---|
30 | 30 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase; |
31 | 31 |
|
32 | 32 |
/** |
33 |
* @author a.mueller |
|
34 |
* @created 05.01.2016 |
|
33 |
* |
|
34 |
* @author pplitzner |
|
35 |
* @date Mar 1, 2016 |
|
36 |
* |
|
35 | 37 |
*/ |
36 | 38 |
|
37 | 39 |
@Component |
... | ... | |
102 | 104 |
|
103 | 105 |
BotanicalName name = BotanicalName.NewInstance(makeRank(state, rangString)); |
104 | 106 |
|
107 |
|
|
105 | 108 |
//id |
106 | 109 |
ImportHelper.setOriginalSource(name, state.getTransactionalSourceReference(), id, TAXON_NAMESPACE); |
107 | 110 |
} |
... | ... | |
113 | 116 |
} catch (UndefinedTransformerMethodException e) { |
114 | 117 |
e.printStackTrace(); |
115 | 118 |
} |
119 |
if(rank==null){ |
|
120 |
logger.error(rankStr+" could not be associated to a known rank."); |
|
121 |
} |
|
116 | 122 |
return rank; |
117 | 123 |
} |
118 | 124 |
|
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/gefaesspflanzen/RedListGefaesspflanzenImportState.java | ||
---|---|---|
19 | 19 |
import eu.etaxonomy.cdm.io.common.DbImportStateBase; |
20 | 20 |
|
21 | 21 |
/** |
22 |
* @author a.mueller |
|
23 |
* @created 11.05.2009 |
|
22 |
* |
|
23 |
* @author pplitzner |
|
24 |
* @date Mar 1, 2016 |
|
25 |
* |
|
24 | 26 |
*/ |
25 | 27 |
public class RedListGefaesspflanzenImportState extends DbImportStateBase<RedListGefaesspflanzenImportConfigurator, RedListGefaesspflanzenImportState>{ |
26 | 28 |
@SuppressWarnings("unused") |
27 | 29 |
private static final Logger logger = Logger.getLogger(RedListGefaesspflanzenImportState.class); |
28 |
|
|
30 |
|
|
29 | 31 |
private Map<String, UUID> agentMap = new HashMap<String, UUID>(); |
30 | 32 |
|
31 | 33 |
protected RedListGefaesspflanzenImportState(RedListGefaesspflanzenImportConfigurator config) { |
32 | 34 |
super(config); |
33 | 35 |
} |
34 |
|
|
36 |
|
|
35 | 37 |
public Map<String, UUID> getAgentMap() { |
36 | 38 |
return agentMap; |
37 | 39 |
} |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/gefaesspflanzen/RedListGefaesspflanzenImportTaxa.java | ||
---|---|---|
32 | 32 |
import eu.etaxonomy.cdm.strategy.parser.NonViralNameParserImpl; |
33 | 33 |
|
34 | 34 |
/** |
35 |
* @author a.mueller |
|
36 |
* @created 05.01.2016 |
|
35 |
* |
|
36 |
* @author pplitzner |
|
37 |
* @date Mar 1, 2016 |
|
38 |
* |
|
37 | 39 |
*/ |
38 | 40 |
|
39 | 41 |
@Component |
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/gefaesspflanzen/RedListGefaesspflanzenTransformer.java | ||
---|---|---|
17 | 17 |
import eu.etaxonomy.cdm.model.name.Rank; |
18 | 18 |
|
19 | 19 |
/** |
20 |
* @author a.mueller |
|
21 |
* @created 01.03.2010 |
|
20 |
* |
|
21 |
* @author pplitzner |
|
22 |
* @date Mar 1, 2016 |
|
23 |
* |
|
22 | 24 |
*/ |
23 | 25 |
@SuppressWarnings("serial") |
24 | 26 |
public final class RedListGefaesspflanzenTransformer extends InputTransformerBase { |
... | ... | |
31 | 33 |
if (key == null){return null;} |
32 | 34 |
if (key.equals("GAT")){return Rank.GENUS();} |
33 | 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();} |
|
34 | 38 |
return null; |
35 | 39 |
} |
36 | 40 |
|
Also available in: Unified diff
Rank evaluation