}\r
\r
@Override\r
- public boolean doPartition(ResultSetPartitioner partitioner, BerlinModelImportState state) {\r
+ public boolean doPartition(@SuppressWarnings("rawtypes") ResultSetPartitioner partitioner, BerlinModelImportState state) {\r
boolean success = true ;\r
- Set<TaxonBase> taxaToSave = new HashSet<>();\r
- Map<String, TaxonBase> taxonMap = partitioner.getObjectMap(BerlinModelTaxonImport.NAMESPACE);\r
+ @SuppressWarnings("rawtypes")\r
+ Set<TaxonBase> taxaToSave = new HashSet<>();\r
+ @SuppressWarnings({ "unchecked", "rawtypes" })\r
+ Map<String, TaxonBase> taxonMap = partitioner.getObjectMap(BerlinModelTaxonImport.NAMESPACE);\r
Map<Integer, Classification> classificationMap = new HashMap<>();\r
- Map<String, Reference> refMap = partitioner.getObjectMap(BerlinModelReferenceImport.REFERENCE_NAMESPACE);\r
+ @SuppressWarnings("unchecked")\r
+ Map<String, Reference> refMap = partitioner.getObjectMap(BerlinModelReferenceImport.REFERENCE_NAMESPACE);\r
\r
ResultSet rs = partitioner.getResultSet();\r
\r
\r
@Override\r
public Map<Object, Map<String, ? extends CdmBase>> getRelatedObjectsForPartition(ResultSet rs, BerlinModelImportState state) {\r
- String nameSpace;\r
- Class<?> cdmClass;\r
+\r
+ String nameSpace;\r
Set<String> idSet;\r
Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<>();\r
\r
\r
//taxon map\r
nameSpace = BerlinModelTaxonImport.NAMESPACE;\r
- cdmClass = TaxonBase.class;\r
idSet = taxonIdSet;\r
- Map<String, TaxonBase> taxonMap = (Map<String, TaxonBase>)getCommonService().getSourcedObjectsByIdInSource(cdmClass, idSet, nameSpace);\r
+ @SuppressWarnings("rawtypes")\r
+ Map<String, TaxonBase> taxonMap = getCommonService().getSourcedObjectsByIdInSourceC(TaxonBase.class, idSet, nameSpace);\r
result.put(nameSpace, taxonMap);\r
\r
// //tree map\r
// nameSpace = "Classification";\r
-// cdmClass = Classification.class;\r
// idSet = classificationIdSet;\r
-// Map<String, Classification> treeMap = (Map<String, Classification>)getCommonService().getSourcedObjectsByIdInSource(cdmClass, idSet, nameSpace);\r
+// Map<String, Classification> treeMap = getCommonService().getSourcedObjectsByIdInSourceC(Classification.class, idSet, nameSpace);\r
// result.put(cdmClass, treeMap);\r
// Set<UUID> treeUuidSet = state\r
// getClassificationService().find(uuidSet);\r
//\r
//reference map\r
nameSpace = BerlinModelReferenceImport.REFERENCE_NAMESPACE;\r
- cdmClass = Reference.class;\r
idSet = referenceIdSet;\r
- Map<String, Reference> referenceMap = (Map<String, Reference>)getCommonService().getSourcedObjectsByIdInSource(cdmClass, idSet, nameSpace);\r
+ Map<String, Reference> referenceMap = getCommonService().getSourcedObjectsByIdInSourceC(Reference.class, idSet, nameSpace);\r
result.put(nameSpace, referenceMap);\r
\r
} catch (SQLException e) {\r
protected boolean isIgnore(BerlinModelImportState state){\r
return ! state.getConfig().isDoRelTaxa();\r
}\r
-\r
-\r
}\r