Revision b313991f
Added by Andreas Müller over 4 years ago
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/erms/ErmsNotesSourcesImport.java | ||
---|---|---|
87 | 87 |
|
88 | 88 |
@Override |
89 | 89 |
public Map<Object, Map<String, ? extends CdmBase>> getRelatedObjectsForPartition(ResultSet rs, ErmsImportState state) { |
90 |
String nameSpace; |
|
91 |
Class<?> cdmClass;
|
|
90 |
|
|
91 |
String nameSpace;
|
|
92 | 92 |
Set<String> idSet; |
93 | 93 |
Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<>(); |
94 | 94 |
|
... | ... | |
102 | 102 |
|
103 | 103 |
//note map |
104 | 104 |
nameSpace = ErmsImportBase.NOTES_NAMESPACE; |
105 |
cdmClass = TextData.class; |
|
106 | 105 |
idSet = noteIdSet; |
107 |
Map<String, CommonTaxonName> noteMap = (Map<String, CommonTaxonName>)getCommonService().getSourcedObjectsByIdInSource(cdmClass, idSet, nameSpace);
|
|
106 |
Map<String, TextData> noteMap = getCommonService().getSourcedObjectsByIdInSourceC(TextData.class, idSet, nameSpace);
|
|
108 | 107 |
result.put(nameSpace, noteMap); |
109 | 108 |
|
110 | 109 |
//reference map |
111 | 110 |
nameSpace = ErmsImportBase.REFERENCE_NAMESPACE; |
112 |
cdmClass = Reference.class; |
|
113 | 111 |
idSet = sourceIdSet; |
114 |
@SuppressWarnings("unchecked") |
|
115 |
Map<String, Reference> referenceMap = (Map<String, Reference>)getCommonService().getSourcedObjectsByIdInSource(cdmClass, idSet, nameSpace); |
|
112 |
Map<String, Reference> referenceMap = getCommonService().getSourcedObjectsByIdInSourceC(Reference.class, idSet, nameSpace); |
|
116 | 113 |
result.put(nameSpace, referenceMap); |
117 | 114 |
|
118 | 115 |
} catch (SQLException e) { |
Also available in: Unified diff
adapt some classes to new CommonService.getSourcedObjectSByIdInSource and cleanup