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.specimen.excel.in;
|
11
|
|
12
|
import java.util.HashMap;
|
13
|
import java.util.Map;
|
14
|
import java.util.UUID;
|
15
|
|
16
|
import org.apache.log4j.Logger;
|
17
|
|
18
|
import eu.etaxonomy.cdm.io.excel.common.ExcelImportState;
|
19
|
import eu.etaxonomy.cdm.model.agent.Person;
|
20
|
import eu.etaxonomy.cdm.model.agent.Team;
|
21
|
import eu.etaxonomy.cdm.model.common.ExtensionType;
|
22
|
import eu.etaxonomy.cdm.model.location.NamedAreaLevel;
|
23
|
import eu.etaxonomy.cdm.model.name.TaxonName;
|
24
|
import eu.etaxonomy.cdm.model.occurrence.Collection;
|
25
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
26
|
|
27
|
/**
|
28
|
* @author a.mueller
|
29
|
* @since 11.05.2009
|
30
|
* @version 1.0
|
31
|
*/
|
32
|
public class SpecimenCdmExcelImportState extends ExcelImportState<SpecimenCdmExcelImportConfigurator, SpecimenRow>{
|
33
|
@SuppressWarnings("unused")
|
34
|
private static final Logger logger = Logger.getLogger(SpecimenCdmExcelImportState.class);
|
35
|
|
36
|
private SpecimenRow specimenRow;
|
37
|
private NamedAreaLevellRow namedAreaLevelRow;
|
38
|
|
39
|
private Map<String, Reference> references = new HashMap<String, Reference>();
|
40
|
private Map<String, Collection> collections = new HashMap<String, Collection>();
|
41
|
private Map<String, Person> persons = new HashMap<String, Person>();
|
42
|
private Map<String, Team> teams = new HashMap<String, Team>();
|
43
|
private Map<String, TaxonName> names = new HashMap<String, TaxonName>();
|
44
|
private Map<String, UUID> areas = new HashMap<String, UUID>();
|
45
|
|
46
|
|
47
|
private Map<String, NamedAreaLevel> postfixLevels = new HashMap<String, NamedAreaLevel>();
|
48
|
private Map<String, ExtensionType> postfixExtensionTypes = new HashMap<String, ExtensionType>();
|
49
|
|
50
|
|
51
|
|
52
|
public SpecimenCdmExcelImportState(SpecimenCdmExcelImportConfigurator config) {
|
53
|
super(config);
|
54
|
}
|
55
|
|
56
|
public Reference getReference(String key) {
|
57
|
return references.get(key);
|
58
|
}
|
59
|
|
60
|
public Reference putReference(String key, Reference value){
|
61
|
return this.references.put(key, value);
|
62
|
}
|
63
|
|
64
|
public Collection getCollection(String key) {
|
65
|
return collections.get(key);
|
66
|
}
|
67
|
|
68
|
public Collection putCollection(String key, Collection value){
|
69
|
return this.collections.put(key, value);
|
70
|
}
|
71
|
|
72
|
public Person getPerson(String key) {
|
73
|
return persons.get(key);
|
74
|
}
|
75
|
|
76
|
public Person putPerson(String key, Person value){
|
77
|
return this.persons.put(key, value);
|
78
|
}
|
79
|
|
80
|
public Team getTeam(String key) {
|
81
|
return teams.get(key);
|
82
|
}
|
83
|
|
84
|
public Team putTeam(String key, Team value){
|
85
|
return this.teams.put(key, value);
|
86
|
}
|
87
|
|
88
|
public TaxonName getName(String key) {
|
89
|
return names.get(key);
|
90
|
}
|
91
|
|
92
|
public TaxonName putName(String key, TaxonName value){
|
93
|
return this.names.put(key, value);
|
94
|
}
|
95
|
|
96
|
public void setNamedAreaLevelRow(NamedAreaLevellRow namedAreaLabelRow) {
|
97
|
this.namedAreaLevelRow = namedAreaLabelRow;
|
98
|
}
|
99
|
|
100
|
public NamedAreaLevellRow getNamedAreaLevelRow() {
|
101
|
return namedAreaLevelRow;
|
102
|
}
|
103
|
|
104
|
public NamedAreaLevel getPostfixLevel(String postfix){
|
105
|
return this.postfixLevels.get(postfix);
|
106
|
}
|
107
|
|
108
|
public NamedAreaLevel putPostfixLevel(String postfix, NamedAreaLevel level) {
|
109
|
return this.postfixLevels.put(postfix, level);
|
110
|
|
111
|
}
|
112
|
|
113
|
public ExtensionType getPostfixExtensionType(String postfix){
|
114
|
return this.postfixExtensionTypes.get(postfix);
|
115
|
}
|
116
|
|
117
|
public ExtensionType putPostfixExtensionType(String postfix, ExtensionType type) {
|
118
|
return this.postfixExtensionTypes.put(postfix, type);
|
119
|
|
120
|
}
|
121
|
|
122
|
public UUID putArea(String key, UUID areaUuid) {
|
123
|
return this.areas.put(key, areaUuid);
|
124
|
}
|
125
|
|
126
|
public UUID getArea(String key) {
|
127
|
return areas.get(key);
|
128
|
}
|
129
|
|
130
|
|
131
|
|
132
|
}
|