1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
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.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.cdm.io.eflora.centralAfrica.ferns;
|
11
|
|
12
|
import java.util.HashMap;
|
13
|
import java.util.Map;
|
14
|
|
15
|
import org.apache.log4j.Logger;
|
16
|
|
17
|
import eu.etaxonomy.cdm.io.common.DbImportStateBase;
|
18
|
import eu.etaxonomy.cdm.model.common.MarkerType;
|
19
|
import eu.etaxonomy.cdm.model.common.User;
|
20
|
import eu.etaxonomy.cdm.model.name.Rank;
|
21
|
import eu.etaxonomy.cdm.model.term.DefinedTermBase;
|
22
|
|
23
|
/**
|
24
|
* @author a.mueller
|
25
|
* @since 11.05.2009
|
26
|
* @version 1.0
|
27
|
*/
|
28
|
public class CentralAfricaFernsImportState extends DbImportStateBase<CentralAfricaFernsImportConfigurator, CentralAfricaFernsImportState>{
|
29
|
@SuppressWarnings("unused")
|
30
|
private static final Logger logger = Logger.getLogger(CentralAfricaFernsImportState.class);
|
31
|
|
32
|
Map<String, DefinedTermBase> dbCdmDefTermMap = new HashMap<String, DefinedTermBase>();
|
33
|
|
34
|
Map<String, User> usernameMap = new HashMap<String, User>();
|
35
|
|
36
|
private String taxonNumber;
|
37
|
private Rank currentRank;
|
38
|
|
39
|
|
40
|
/* (non-Javadoc)
|
41
|
* @see eu.etaxonomy.cdm.io.common.IoStateBase#initialize(eu.etaxonomy.cdm.io.common.IoConfiguratorBase)
|
42
|
*/
|
43
|
@Override
|
44
|
public void initialize(CentralAfricaFernsImportConfigurator config) {
|
45
|
// super(config);
|
46
|
String tableName = "WebMarkerCategory_";
|
47
|
//webMarkerCategory
|
48
|
dbCdmDefTermMap.put(tableName + 1, MarkerType.COMPLETE());
|
49
|
}
|
50
|
|
51
|
public CentralAfricaFernsImportState(CentralAfricaFernsImportConfigurator config) {
|
52
|
super(config);
|
53
|
}
|
54
|
|
55
|
public Map<String, DefinedTermBase> getDbCdmDefinedTermMap(){
|
56
|
return this.dbCdmDefTermMap;
|
57
|
}
|
58
|
|
59
|
public void putDefinedTermToMap(String tableName, String id, DefinedTermBase term){
|
60
|
this.dbCdmDefTermMap.put(tableName + "_" + id, term);
|
61
|
}
|
62
|
|
63
|
public void putDefinedTermToMap(String tableName, int id, DefinedTermBase term){
|
64
|
putDefinedTermToMap(tableName, String.valueOf(id), term);
|
65
|
}
|
66
|
|
67
|
public User getUser(String username){
|
68
|
return usernameMap.get(username);
|
69
|
}
|
70
|
|
71
|
public void putUser(String username, User user){
|
72
|
usernameMap.put(username, user);
|
73
|
}
|
74
|
|
75
|
public void setTaxonNumber(String taxonNumber) {
|
76
|
this.taxonNumber = taxonNumber;
|
77
|
}
|
78
|
|
79
|
public String getTaxonNumber() {
|
80
|
return taxonNumber;
|
81
|
}
|
82
|
|
83
|
public void setCurrentRank(Rank currentRank) {
|
84
|
this.currentRank = currentRank;
|
85
|
}
|
86
|
|
87
|
public Rank getCurrentRank() {
|
88
|
return currentRank;
|
89
|
}
|
90
|
|
91
|
|
92
|
|
93
|
}
|