Project

General

Profile

« Previous | Next » 

Revision b313991f

Added by Andreas Müller over 4 years ago

adapt some classes to new CommonService.getSourcedObjectSByIdInSource and cleanup

View differences:

cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/indexFungorum/IndexFungorumDistributionImport.java
140 140

  
141 141
	@Override
142 142
	public Map<Object, Map<String, ? extends CdmBase>> getRelatedObjectsForPartition(ResultSet rs, IndexFungorumImportState state) {
143
		String nameSpace;
144
		Class<?> cdmClass;
143

  
144
	    String nameSpace;
145 145
		Set<String> idSet;
146 146
		Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<>();
147 147

  
......
153 153

  
154 154
			//taxon map
155 155
			nameSpace = NAMESPACE_SPECIES;
156
			cdmClass = TaxonBase.class;
157 156
			idSet = taxonIdSet;
158
			@SuppressWarnings({ "unchecked", "rawtypes" })
159
            Map<String, TaxonBase> taxonMap = (Map<String, TaxonBase>)getCommonService().getSourcedObjectsByIdInSource(cdmClass, idSet, nameSpace);
157
			@SuppressWarnings({ "rawtypes" })
158
            Map<String, TaxonBase> taxonMap = getCommonService().getSourcedObjectsByIdInSourceC(TaxonBase.class, idSet, nameSpace);
160 159
			result.put(nameSpace, taxonMap);
161 160

  
162 161
			//sourceReference
163 162
			Reference sourceReference = getReferenceService().find(PesiTransformer.uuidSourceRefIndexFungorum);
164
			Map<String, Reference> referenceMap = new HashMap<String, Reference>();
163
			Map<String, Reference> referenceMap = new HashMap<>();
165 164
			referenceMap.put(SOURCE_REFERENCE, sourceReference);
166 165
			result.put(NAMESPACE_REFERENCE, referenceMap);
167 166

  

Also available in: Unified diff