Revision 307c8d15
Added by Andreas Müller over 5 years ago
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/erms/ErmsImportState.java | ||
---|---|---|
1 | 1 |
/** |
2 | 2 |
* Copyright (C) 2007 EDIT |
3 |
* European Distributed Institute of Taxonomy
|
|
3 |
* European Distributed Institute of Taxonomy |
|
4 | 4 |
* http://www.e-taxonomy.eu |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
... | ... | |
24 | 24 |
/** |
25 | 25 |
* @author a.mueller |
26 | 26 |
* @since 11.05.2009 |
27 |
* @version 1.0 |
|
28 | 27 |
*/ |
29 | 28 |
public class ErmsImportState extends DbImportStateBase<ErmsImportConfigurator, ErmsImportState>{ |
30 | 29 |
@SuppressWarnings("unused") |
31 | 30 |
private static final Logger logger = Logger.getLogger(ErmsImportState.class); |
32 | 31 |
|
33 |
private Map<String, DefinedTermBase> dbCdmDefTermMap = new HashMap<String, DefinedTermBase>();
|
|
34 |
|
|
35 |
private Map<String, User> usernameMap = new HashMap<String, User>();
|
|
36 |
|
|
32 |
private Map<String, DefinedTermBase> dbCdmDefTermMap = new HashMap<>(); |
|
33 |
|
|
34 |
private Map<String, User> usernameMap = new HashMap<>(); |
|
35 |
|
|
37 | 36 |
private Map<Integer, Map<Integer,Rank>> rankMap; |
38 |
|
|
37 |
|
|
39 | 38 |
private Set<Integer> acceptedTaxaKeys; |
40 |
|
|
41 |
/* (non-Javadoc) |
|
42 |
* @see eu.etaxonomy.cdm.io.common.IoStateBase#initialize(eu.etaxonomy.cdm.io.common.IoConfiguratorBase) |
|
43 |
*/ |
|
39 |
|
|
44 | 40 |
@Override |
45 | 41 |
public void initialize(ErmsImportConfigurator config) { |
46 | 42 |
// super(config); |
... | ... | |
56 | 52 |
public Map<String, DefinedTermBase> getDbCdmDefinedTermMap(){ |
57 | 53 |
return this.dbCdmDefTermMap; |
58 | 54 |
} |
59 |
|
|
55 |
|
|
60 | 56 |
public void putDefinedTermToMap(String tableName, String id, DefinedTermBase term){ |
61 | 57 |
this.dbCdmDefTermMap.put(tableName + "_" + id, term); |
62 | 58 |
} |
63 |
|
|
59 |
|
|
64 | 60 |
public void putDefinedTermToMap(String tableName, int id, DefinedTermBase term){ |
65 | 61 |
putDefinedTermToMap(tableName, String.valueOf(id), term); |
66 | 62 |
} |
67 |
|
|
68 |
public User getUser(String username){ |
|
63 |
|
|
64 |
@Override |
|
65 |
public User getUser(String username){ |
|
69 | 66 |
return usernameMap.get(username); |
70 | 67 |
} |
71 | 68 |
|
72 |
public void putUser(String username, User user){ |
|
69 |
@Override |
|
70 |
public void putUser(String username, User user){ |
|
73 | 71 |
usernameMap.put(username, user); |
74 | 72 |
} |
75 | 73 |
|
... | ... | |
80 | 78 |
this.rankMap = rankMap; |
81 | 79 |
} |
82 | 80 |
|
83 |
// /** |
|
84 |
// * @return the rankMap |
|
85 |
// */ |
|
86 |
// public Map<Integer, Map<Integer,Rank>> getRankMap() { |
|
87 |
// return rankMap; |
|
88 |
// } |
|
89 |
|
|
90 |
|
|
81 |
|
|
91 | 82 |
/** |
92 | 83 |
* Returns the CDM rank depending on the ERMS rankId and the ERMS kingdomId. Returns <code> |
93 | 84 |
* null</code> if the rank does not exist. |
... | ... | |
121 | 112 |
this.acceptedTaxaKeys = acceptedTaxaKeys; |
122 | 113 |
} |
123 | 114 |
|
124 |
|
|
115 |
|
|
125 | 116 |
} |
Also available in: Unified diff
cleanup some ERMS imports