3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
11 package eu
.etaxonomy
.cdm
.io
.specimen
.excel
.in
;
13 import java
.util
.HashMap
;
15 import java
.util
.UUID
;
17 import org
.apache
.log4j
.Logger
;
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
;
33 public class SpecimenCdmExcelImportState
extends ExcelImportState
<SpecimenCdmExcelImportConfigurator
, SpecimenRow
>{
34 @SuppressWarnings("unused")
35 private static final Logger logger
= Logger
.getLogger(SpecimenCdmExcelImportState
.class);
37 private SpecimenRow specimenRow
;
38 private NamedAreaLevellRow namedAreaLevelRow
;
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
>();
48 private Map
<String
, NamedAreaLevel
> postfixLevels
= new HashMap
<String
, NamedAreaLevel
>();
49 private Map
<String
, ExtensionType
> postfixExtensionTypes
= new HashMap
<String
, ExtensionType
>();
53 public SpecimenCdmExcelImportState(SpecimenCdmExcelImportConfigurator config
) {
57 public Reference
<?
> getReference(String key
) {
58 return references
.get(key
);
61 public Reference
<?
> putReference(String key
, Reference
<?
> value
){
62 return this.references
.put(key
, value
);
65 public Collection
getCollection(String key
) {
66 return collections
.get(key
);
69 public Collection
putCollection(String key
, Collection value
){
70 return this.collections
.put(key
, value
);
73 public Person
getPerson(String key
) {
74 return persons
.get(key
);
77 public Person
putPerson(String key
, Person value
){
78 return this.persons
.put(key
, value
);
81 public Team
getTeam(String key
) {
82 return teams
.get(key
);
85 public Team
putTeam(String key
, Team value
){
86 return this.teams
.put(key
, value
);
89 public TaxonNameBase
getName(String key
) {
90 return names
.get(key
);
93 public TaxonNameBase
putName(String key
, TaxonNameBase value
){
94 return this.names
.put(key
, value
);
97 public void setNamedAreaLevelRow(NamedAreaLevellRow namedAreaLabelRow
) {
98 this.namedAreaLevelRow
= namedAreaLabelRow
;
101 public NamedAreaLevellRow
getNamedAreaLevelRow() {
102 return namedAreaLevelRow
;
105 public NamedAreaLevel
getPostfixLevel(String postfix
){
106 return this.postfixLevels
.get(postfix
);
109 public NamedAreaLevel
putPostfixLevel(String postfix
, NamedAreaLevel level
) {
110 return this.postfixLevels
.put(postfix
, level
);
114 public ExtensionType
getPostfixExtensionType(String postfix
){
115 return this.postfixExtensionTypes
.get(postfix
);
118 public ExtensionType
putPostfixExtensionType(String postfix
, ExtensionType type
) {
119 return this.postfixExtensionTypes
.put(postfix
, type
);
123 public UUID
putArea(String key
, UUID areaUuid
) {
124 return this.areas
.put(key
, areaUuid
);
127 public UUID
getArea(String key
) {
128 return areas
.get(key
);