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
.cuba
;
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
.io
.excel
.common
.ExcelRowBase
;
21 import eu
.etaxonomy
.cdm
.model
.taxon
.Classification
;
22 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
28 public class CubaImportState
extends ExcelImportState
<CubaImportConfigurator
, ExcelRowBase
>{
29 @SuppressWarnings("unused")
30 private static final Logger logger
= Logger
.getLogger(CubaImportState
.class);
32 private final Map
<String
, Taxon
> higherTaxonTaxonMap
= new HashMap
<String
, Taxon
>();
33 private final Map
<String
, UUID
> higherTaxonUuidMap
= new HashMap
<String
, UUID
>();
35 // private CyprusRow cyprusRow;
36 // private CyprusDistributionRow cyprusDistributionRow;
38 private Classification classification
;
41 public CubaImportState(CubaImportConfigurator config
) {
46 public boolean containsHigherTaxon(String higherName
) {
47 return higherTaxonTaxonMap
.containsKey(higherName
);
50 public Taxon
putHigherTaxon(String higherName
, Taxon taxon
) {
51 return higherTaxonTaxonMap
.put(higherName
, taxon
);
54 public Taxon
removeHigherTaxon(String higherName
) {
55 return higherTaxonTaxonMap
.remove(higherName
);
58 public Taxon
getHigherTaxon(String higherName
) {
59 return higherTaxonTaxonMap
.get(higherName
);
63 public boolean containsHigherTaxonUuid(String higherName
) {
64 return higherTaxonUuidMap
.containsKey(higherName
);
67 public UUID
putHigherTaxon(String higherName
, UUID uuid
) {
68 return higherTaxonUuidMap
.put(higherName
, uuid
);
71 public UUID
removeHigherTaxonUuid(String higherName
) {
72 return higherTaxonUuidMap
.remove(higherName
);
75 public UUID
getHigherTaxonUuid(String higherName
) {
76 return higherTaxonUuidMap
.get(higherName
);
83 public Classification
getClassification() {
84 return classification
;
89 * @param classification the classification to set
91 public void setClassification(Classification classification
) {
92 this.classification
= classification
;
100 // * @return the cyprusRow
102 // public CyprusRow getCyprusRow() {
107 // * @param cyprusRow the normalExplicitRow to set
109 // public void setCyprusRow(CyprusRow cyprusRow) {
110 // this.cyprusRow = cyprusRow;
115 // * @return the cyprusRow
117 // public CyprusDistributionRow getCyprusDistributionRow() {
118 // return cyprusDistributionRow;
122 // * @param cyprusRow the normalExplicitRow to set
124 // public void setCyprusDistributionRow(CyprusDistributionRow cyprusRow) {
125 // this.cyprusDistributionRow = cyprusRow;