Revision 925afb79
Added by Andreas Müller over 4 years ago
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/indexFungorum/IndexFungorumGeneraImport.java | ||
---|---|---|
78 | 78 |
try { |
79 | 79 |
while (rs.next()){ |
80 | 80 |
|
81 |
//TODO |
|
82 |
//DisplayName, NomRefCache |
|
81 |
//Don't use (created bei Marc): DisplayName, NomRefCache |
|
83 | 82 |
|
84 | 83 |
Double id = (Double)rs.getObject("RECORD NUMBER"); |
85 | 84 |
|
... | ... | |
114 | 113 |
success = false; |
115 | 114 |
} |
116 | 115 |
return success; |
117 |
|
|
118 | 116 |
} |
119 | 117 |
|
120 | 118 |
private Taxon getParentTaxon(IndexFungorumImportState state, ResultSet rs) throws SQLException { |
... | ... | |
159 | 157 |
@Override |
160 | 158 |
public Map<Object, Map<String, ? extends CdmBase>> getRelatedObjectsForPartition(ResultSet rs, IndexFungorumImportState state) { |
161 | 159 |
String nameSpace; |
162 |
Class<?> cdmClass; |
|
163 |
Set<String> idSet; |
|
164 |
Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<Object, Map<String, ? extends CdmBase>>();
|
|
160 |
// Class<?> cdmClass;
|
|
161 |
// Set<String> idSet;
|
|
162 |
Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<>(); |
|
165 | 163 |
|
166 | 164 |
try{ |
167 |
Set<String> taxonNameSet = new HashSet<String>();
|
|
165 |
// Set<String> taxonNameSet = new HashSet<>();
|
|
168 | 166 |
while (rs.next()){ |
169 | 167 |
// handleForeignKey(rs, taxonIdSet,"tu_acctaxon" ); |
170 | 168 |
} |
171 | 169 |
|
172 | 170 |
//taxon map |
173 | 171 |
nameSpace = NAMESPACE_SUPRAGENERIC_NAMES ; |
174 |
cdmClass = TaxonBase.class;
|
|
172 |
// cdmClass = Taxon.class;
|
|
175 | 173 |
// idSet = taxonNameSet; |
176 |
Map<String, TaxonBase<?>> taxonMap = new HashMap<String, TaxonBase<?>>(); |
|
177 |
List<TaxonBase> list = getTaxonService().listTaxaByName(Taxon.class, "*", null, null, null, "*", null, 1000000, null); |
|
174 |
Map<String, TaxonBase<?>> taxonMap = new HashMap<>(); |
|
175 |
@SuppressWarnings("rawtypes") |
|
176 |
List<TaxonBase> list = getTaxonService().listTaxaByName(Taxon.class, "*", null, null, null, "*", null, 1000000, null); |
|
178 | 177 |
for (TaxonBase<?> taxon : list){ |
179 | 178 |
taxonMap.put(CdmBase.deproxy(taxon.getName()).getGenusOrUninomial(), taxon); |
180 | 179 |
} |
... | ... | |
182 | 181 |
|
183 | 182 |
//sourceReference |
184 | 183 |
Reference sourceReference = getReferenceService().find(PesiTransformer.uuidSourceRefIndexFungorum); |
185 |
Map<String, Reference> referenceMap = new HashMap<String, Reference>();
|
|
184 |
Map<String, Reference> referenceMap = new HashMap<>(); |
|
186 | 185 |
referenceMap.put(SOURCE_REFERENCE, sourceReference); |
187 | 186 |
result.put(NAMESPACE_REFERENCE, referenceMap); |
188 | 187 |
|
Also available in: Unified diff
cleanup