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