Revision 86536e03
Added by Andreas Müller almost 7 years ago
app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelNameFactsImport.java | ||
---|---|---|
47 | 47 |
import eu.etaxonomy.cdm.model.media.Media; |
48 | 48 |
import eu.etaxonomy.cdm.model.media.MediaRepresentation; |
49 | 49 |
import eu.etaxonomy.cdm.model.media.MediaRepresentationPart; |
50 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
|
|
50 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
|
51 | 51 |
import eu.etaxonomy.cdm.model.reference.Reference; |
52 | 52 |
|
53 | 53 |
|
... | ... | |
105 | 105 |
return strQuery; |
106 | 106 |
} |
107 | 107 |
|
108 |
/* (non-Javadoc) |
|
109 |
* @see eu.etaxonomy.cdm.io.berlinModel.in.IPartitionedIO#doPartition(eu.etaxonomy.cdm.io.berlinModel.in.ResultSetPartitioner, eu.etaxonomy.cdm.io.berlinModel.in.BerlinModelImportState) |
|
110 |
*/ |
|
111 | 108 |
@Override |
112 | 109 |
public boolean doPartition(ResultSetPartitioner partitioner, BerlinModelImportState state) { |
113 | 110 |
boolean success = true ; |
114 | 111 |
BerlinModelImportConfigurator config = state.getConfig(); |
115 |
Set<TaxonNameBase> nameToSave = new HashSet<TaxonNameBase>();
|
|
116 |
Map<String, TaxonNameBase> nameMap = partitioner.getObjectMap(BerlinModelTaxonNameImport.NAMESPACE);
|
|
112 |
Set<TaxonName> nameToSave = new HashSet<>();
|
|
113 |
Map<String, TaxonName> nameMap = partitioner.getObjectMap(BerlinModelTaxonNameImport.NAMESPACE); |
|
117 | 114 |
Map<String, Reference> refMap = partitioner.getObjectMap(BerlinModelReferenceImport.REFERENCE_NAMESPACE); |
118 | 115 |
|
119 | 116 |
ResultSet rs = partitioner.getResultSet(); |
... | ... | |
134 | 131 |
String category = CdmUtils.Nz(rs.getString("NameFactCategory")); |
135 | 132 |
String nameFact = CdmUtils.Nz(rs.getString("nameFact")); |
136 | 133 |
|
137 |
TaxonNameBase<?,?> taxonNameBase = nameMap.get(String.valueOf(nameId));
|
|
134 |
TaxonName<?,?> taxonNameBase = nameMap.get(String.valueOf(nameId)); |
|
138 | 135 |
String nameFactRefFk = String.valueOf(nameFactRefFkObj); |
139 | 136 |
Reference citation = refMap.get(nameFactRefFk); |
140 | 137 |
|
... | ... | |
243 | 240 |
|
244 | 241 |
//name map |
245 | 242 |
nameSpace = BerlinModelTaxonNameImport.NAMESPACE; |
246 |
cdmClass = TaxonNameBase.class;
|
|
243 |
cdmClass = TaxonName.class; |
|
247 | 244 |
idSet = nameIdSet; |
248 | 245 |
Map<String, Person> objectMap = (Map<String, Person>)getCommonService().getSourcedObjectsByIdInSource(cdmClass, idSet, nameSpace); |
249 | 246 |
result.put(nameSpace, objectMap); |
Also available in: Unified diff
fix #6368 rename table and class TaxonNameBase in app-import