2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.io
.eflora
.centralAfrica
.ferns
;
12 import java
.util
.HashMap
;
15 import org
.apache
.log4j
.Logger
;
17 import eu
.etaxonomy
.cdm
.io
.common
.DbImportStateBase
;
18 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTermBase
;
19 import eu
.etaxonomy
.cdm
.model
.common
.MarkerType
;
20 import eu
.etaxonomy
.cdm
.model
.common
.User
;
21 import eu
.etaxonomy
.cdm
.model
.name
.Rank
;
28 public class CentralAfricaFernsImportState
extends DbImportStateBase
<CentralAfricaFernsImportConfigurator
, CentralAfricaFernsImportState
>{
29 @SuppressWarnings("unused")
30 private static final Logger logger
= Logger
.getLogger(CentralAfricaFernsImportState
.class);
32 Map
<String
, DefinedTermBase
> dbCdmDefTermMap
= new HashMap
<String
, DefinedTermBase
>();
34 Map
<String
, User
> usernameMap
= new HashMap
<String
, User
>();
36 private String taxonNumber
;
37 private Rank currentRank
;
41 * @see eu.etaxonomy.cdm.io.common.IoStateBase#initialize(eu.etaxonomy.cdm.io.common.IoConfiguratorBase)
44 public void initialize(CentralAfricaFernsImportConfigurator config
) {
46 String tableName
= "WebMarkerCategory_";
48 dbCdmDefTermMap
.put(tableName
+ 1, MarkerType
.COMPLETE());
51 public CentralAfricaFernsImportState(CentralAfricaFernsImportConfigurator config
) {
55 public Map
<String
, DefinedTermBase
> getDbCdmDefinedTermMap(){
56 return this.dbCdmDefTermMap
;
59 public void putDefinedTermToMap(String tableName
, String id
, DefinedTermBase term
){
60 this.dbCdmDefTermMap
.put(tableName
+ "_" + id
, term
);
63 public void putDefinedTermToMap(String tableName
, int id
, DefinedTermBase term
){
64 putDefinedTermToMap(tableName
, String
.valueOf(id
), term
);
67 public User
getUser(String username
){
68 return usernameMap
.get(username
);
71 public void putUser(String username
, User user
){
72 usernameMap
.put(username
, user
);
75 public void setTaxonNumber(String taxonNumber
) {
76 this.taxonNumber
= taxonNumber
;
79 public String
getTaxonNumber() {
83 public void setCurrentRank(Rank currentRank
) {
84 this.currentRank
= currentRank
;
87 public Rank
getCurrentRank() {