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.cyprus;
|
11
|
|
12
|
import java.util.HashMap;
|
13
|
import java.util.Map;
|
14
|
|
15
|
import org.apache.log4j.Logger;
|
16
|
|
17
|
import eu.etaxonomy.cdm.io.excel.common.ExcelImportState;
|
18
|
import eu.etaxonomy.cdm.io.excel.common.ExcelRowBase;
|
19
|
import eu.etaxonomy.cdm.model.taxon.Taxon;
|
20
|
|
21
|
/**
|
22
|
* @author a.mueller
|
23
|
* @since 11.05.2009
|
24
|
* @version 1.0
|
25
|
*/
|
26
|
public class CyprusImportState extends ExcelImportState<CyprusImportConfigurator, ExcelRowBase>{
|
27
|
@SuppressWarnings("unused")
|
28
|
private static final Logger logger = Logger.getLogger(CyprusImportState.class);
|
29
|
|
30
|
private Map<String, Taxon> higherTaxonTaxonMap = new HashMap<String, Taxon>();
|
31
|
|
32
|
private CyprusRow cyprusRow;
|
33
|
private CyprusDistributionRow cyprusDistributionRow;
|
34
|
|
35
|
|
36
|
public CyprusImportState(CyprusImportConfigurator config) {
|
37
|
super(config);
|
38
|
}
|
39
|
|
40
|
|
41
|
public boolean containsHigherTaxon(String higherName) {
|
42
|
return higherTaxonTaxonMap.containsKey(higherName);
|
43
|
}
|
44
|
|
45
|
public Taxon putHigherTaxon(String higherName, Taxon taxon) {
|
46
|
return higherTaxonTaxonMap.put(higherName, taxon);
|
47
|
}
|
48
|
|
49
|
public Taxon removeHigherTaxon(String higherName) {
|
50
|
return higherTaxonTaxonMap.remove(higherName);
|
51
|
}
|
52
|
|
53
|
public Taxon getHigherTaxon(String higherName) {
|
54
|
return higherTaxonTaxonMap.get(higherName);
|
55
|
}
|
56
|
|
57
|
|
58
|
|
59
|
|
60
|
// public boolean containsHigherTaxonUuid(String higherName) {
|
61
|
// return higherTaxonUuidMap.containsKey(higherName);
|
62
|
// }
|
63
|
//
|
64
|
// public UUID putHigherTaxon(String higherName, UUID uuid) {
|
65
|
// return higherTaxonUuidMap.put(higherName, uuid);
|
66
|
// }
|
67
|
//
|
68
|
// public UUID removeHigherTaxon(String higherName) {
|
69
|
// return higherTaxonUuidMap.remove(higherName);
|
70
|
// }
|
71
|
//
|
72
|
// public UUID getHigherTaxon(String higherName) {
|
73
|
// return higherTaxonUuidMap.get(higherName);
|
74
|
// }
|
75
|
|
76
|
|
77
|
|
78
|
/**
|
79
|
* @return the cyprusRow
|
80
|
*/
|
81
|
public CyprusRow getCyprusRow() {
|
82
|
return cyprusRow;
|
83
|
}
|
84
|
|
85
|
/**
|
86
|
* @param cyprusRow the normalExplicitRow to set
|
87
|
*/
|
88
|
public void setCyprusRow(CyprusRow cyprusRow) {
|
89
|
this.cyprusRow = cyprusRow;
|
90
|
}
|
91
|
|
92
|
|
93
|
/**
|
94
|
* @return the cyprusRow
|
95
|
*/
|
96
|
public CyprusDistributionRow getCyprusDistributionRow() {
|
97
|
return cyprusDistributionRow;
|
98
|
}
|
99
|
|
100
|
/**
|
101
|
* @param cyprusRow the normalExplicitRow to set
|
102
|
*/
|
103
|
public void setCyprusDistributionRow(CyprusDistributionRow cyprusRow) {
|
104
|
this.cyprusDistributionRow = cyprusRow;
|
105
|
}
|
106
|
|
107
|
|
108
|
|
109
|
|
110
|
}
|