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
.cyprus
;
13 import java
.util
.HashMap
;
15 import java
.util
.UUID
;
17 import org
.apache
.log4j
.Logger
;
19 import eu
.etaxonomy
.cdm
.io
.common
.DbImportStateBase
;
20 import eu
.etaxonomy
.cdm
.io
.excel
.common
.ExcelImportState
;
21 import eu
.etaxonomy
.cdm
.io
.excel
.taxa
.NormalExplicitRow
;
22 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
23 import eu
.etaxonomy
.cdm
.model
.common
.MarkerType
;
24 import eu
.etaxonomy
.cdm
.model
.common
.User
;
25 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
26 import eu
.etaxonomy
.cdm
.model
.taxon
.Taxon
;
33 public class CyprusImportState
extends ExcelImportState
{
34 @SuppressWarnings("unused")
35 private static final Logger logger
= Logger
.getLogger(CyprusImportState
.class);
37 private Map
<String
, DefinedTermBase
> dbCdmDefTermMap
= new HashMap
<String
, DefinedTermBase
>();
39 // private String lastFamily;
40 // private String lastGenus;
41 // private Map<String, UUID> higherTaxonUuidMap = new HashMap<String, UUID>();
42 private Map
<String
, Taxon
> higherTaxonTaxonMap
= new HashMap
<String
, Taxon
>();
44 private CyprusRow cyprusRow
;
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
);
65 // public boolean containsHigherTaxonUuid(String higherName) {
66 // return higherTaxonUuidMap.containsKey(higherName);
69 // public UUID putHigherTaxon(String higherName, UUID uuid) {
70 // return higherTaxonUuidMap.put(higherName, uuid);
73 // public UUID removeHigherTaxon(String higherName) {
74 // return higherTaxonUuidMap.remove(higherName);
77 // public UUID getHigherTaxon(String higherName) {
78 // return higherTaxonUuidMap.get(higherName);
84 * @return the cyprusRow
86 public CyprusRow
getCyprusRow() {
91 * @param cyprusRow the normalExplicitRow to set
93 public void setCyprusRow(CyprusRow cyprusRow
) {
94 this.cyprusRow
= cyprusRow
;
97 public CyprusImportState(CyprusImportConfigurator config
) {
101 public Map
<String
, DefinedTermBase
> getDbCdmDefinedTermMap(){
102 return this.dbCdmDefTermMap
;
105 public void putDefinedTermToMap(String tableName
, String id
, DefinedTermBase term
){
106 this.dbCdmDefTermMap
.put(tableName
+ "_" + id
, term
);
109 public void putDefinedTermToMap(String tableName
, int id
, DefinedTermBase term
){
110 putDefinedTermToMap(tableName
, String
.valueOf(id
), term
);
116 // public void setLastFamily(String lastFamily) {
117 // this.lastFamily = lastFamily;
120 // public String getLastFamily() {
121 // return lastFamily;
124 // public void setLastGenus(String lastGenus) {
125 // this.lastGenus = lastGenus;
128 // public String getLastGenus() {