Revision 4d0649fd
Added by Andreas Müller over 5 years ago
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/erms/ErmsTaxonRelationImport.java | ||
---|---|---|
55 | 55 |
super(pluralString, dbTableName, cdmTargetClass); |
56 | 56 |
} |
57 | 57 |
|
58 |
|
|
59 | 58 |
@Override |
60 | 59 |
protected DbImportMapping<ErmsImportState, ErmsImportConfigurator> getMapping() { |
61 | 60 |
if (mapping == null){ |
... | ... | |
98 | 97 |
String nameSpace; |
99 | 98 |
Class<?> cdmClass; |
100 | 99 |
Set<String> idSet; |
101 |
Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<Object, Map<String, ? extends CdmBase>>();
|
|
100 |
Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<>(); |
|
102 | 101 |
|
103 | 102 |
try{ |
104 |
Set<String> taxonIdSet = new HashSet<String>();
|
|
105 |
Set<String> nameIdSet = new HashSet<String>();
|
|
103 |
Set<String> taxonIdSet = new HashSet<>(); |
|
104 |
Set<String> nameIdSet = new HashSet<>(); |
|
106 | 105 |
while (rs.next()){ |
107 | 106 |
handleForeignKey(rs, taxonIdSet, "parentId"); |
108 | 107 |
handleForeignKey(rs, taxonIdSet, "accParentId"); |
... | ... | |
128 | 127 |
Map<String, TaxonBase<?>> taxonMap = (Map<String, TaxonBase<?>>)getCommonService().getSourcedObjectsByIdInSource(cdmClass, idSet, nameSpace); |
129 | 128 |
result.put(nameSpace, taxonMap); |
130 | 129 |
|
130 |
return result; |
|
131 |
|
|
131 | 132 |
} catch (SQLException e) { |
132 | 133 |
throw new RuntimeException(e); |
133 | 134 |
} |
134 |
return result; |
|
135 | 135 |
} |
136 | 136 |
|
137 | 137 |
@Override |
Also available in: Unified diff
ref #1444 further cleanup ERMS import