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
.excel
.taxa
;
13 import java
.util
.HashMap
;
14 import java
.util
.HashSet
;
17 import java
.util
.UUID
;
19 import org
.apache
.log4j
.Logger
;
21 import eu
.etaxonomy
.cdm
.io
.excel
.common
.ExcelImportConfiguratorBase
;
22 import eu
.etaxonomy
.cdm
.io
.excel
.common
.ExcelImportState
;
23 import eu
.etaxonomy
.cdm
.model
.agent
.TeamOrPersonBase
;
24 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
25 import eu
.etaxonomy
.cdm
.model
.taxon
.TaxonBase
;
32 public class TaxonExcelImportState
extends ExcelImportState
<ExcelImportConfiguratorBase
>{
33 @SuppressWarnings("unused")
34 private static final Logger logger
= Logger
.getLogger(TaxonExcelImportState
.class);
36 /** Already processed authors */
37 private Set
<String
> authors
= new HashSet
<String
>();
38 /** Taxon "light" containing all string info from columns */
39 private NormalExplicitRow normalExplicitRow
= null;
41 private Map
<Integer
, TaxonBase
> taxonMap
= new HashMap
<Integer
, TaxonBase
>();
42 private Map
<String
, TeamOrPersonBase
> authorMap
= new HashMap
<String
, TeamOrPersonBase
>();
45 public TaxonExcelImportState(ExcelImportConfiguratorBase config
) {
50 * @return the normalExplicitRow
52 public NormalExplicitRow
getTaxonLight() {
53 return normalExplicitRow
;
57 * @param normalExplicitRow the normalExplicitRow to set
59 public void setTaxonLight(NormalExplicitRow normalExplicitRow
) {
60 this.normalExplicitRow
= normalExplicitRow
;
66 public Set
<String
> getAuthors() {
71 * @param author the author to set
73 public void setAuthors(Set
<String
> authors
) {
74 this.authors
= authors
;
82 public TaxonBase
getTaxonBase(Integer taxonId
) {
83 return taxonMap
.get(taxonId
);
91 public void putTaxon(Integer taxonId
, TaxonBase taxonBase
) {
92 taxonMap
.put(taxonId
, taxonBase
);