Revision 2aa7bf5f
Added by Andreas Müller about 15 years ago
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/tcsxml/TcsXmlPublicationsImport.java | ||
---|---|---|
18 | 18 |
import eu.etaxonomy.cdm.io.common.IImportConfigurator; |
19 | 19 |
import eu.etaxonomy.cdm.io.common.ImportHelper; |
20 | 20 |
import eu.etaxonomy.cdm.io.common.MapWrapper; |
21 |
import eu.etaxonomy.cdm.io.tcsrdf.TcsRdfImportState; |
|
21 | 22 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
22 | 23 |
import eu.etaxonomy.cdm.model.reference.Generic; |
23 | 24 |
import eu.etaxonomy.cdm.model.reference.ReferenceBase; |
... | ... | |
62 | 63 |
|
63 | 64 |
|
64 | 65 |
@Override |
65 |
public boolean doInvoke(IImportConfigurator config, |
|
66 |
Map<String, MapWrapper<? extends CdmBase>> stores){ |
|
66 |
public boolean doInvoke(TcsXmlImportState state){ |
|
67 | 67 |
|
68 | 68 |
logger.info("start make Publications ..."); |
69 | 69 |
boolean success = true; |
70 | 70 |
String childName; |
71 | 71 |
boolean obligatory; |
72 | 72 |
|
73 |
MapWrapper<ReferenceBase> referenceMap = (MapWrapper<ReferenceBase>)stores.get(ICdmIO.REFERENCE_STORE);
|
|
73 |
MapWrapper<ReferenceBase> referenceMap = (MapWrapper<ReferenceBase>)state.getStore(ICdmIO.REFERENCE_STORE);
|
|
74 | 74 |
IReferenceService referenceService = getReferenceService(); |
75 | 75 |
|
76 |
TcsXmlImportConfigurator tcsConfig = (TcsXmlImportConfigurator)config;
|
|
77 |
Element elDataSet = getDataSetElement(tcsConfig);
|
|
78 |
Namespace tcsNamespace = tcsConfig.getTcsXmlNamespace();
|
|
76 |
TcsXmlImportConfigurator config = state.getConfig();
|
|
77 |
Element elDataSet = getDataSetElement(config);
|
|
78 |
Namespace tcsNamespace = config.getTcsXmlNamespace();
|
|
79 | 79 |
|
80 | 80 |
DoubleResult<Element, Boolean> doubleResult; |
81 | 81 |
childName = "Publications"; |
... | ... | |
112 | 112 |
success &= doubleResult.getSecondResult(); |
113 | 113 |
Element elPublicationDetailed = doubleResult.getFirstResult(); |
114 | 114 |
|
115 |
success &= tcsConfig.getPlaceholderClass().makePublicationDetailed(tcsConfig, elPublicationDetailed, reference);
|
|
115 |
success &= config.getPlaceholderClass().makePublicationDetailed(config, elPublicationDetailed, reference);
|
|
116 | 116 |
ImportHelper.setOriginalSource(reference, config.getSourceReference(), strId, idNamespace); |
117 | 117 |
|
118 | 118 |
referenceMap.put(strId, reference); |
Also available in: Unified diff
Refactoring for Imports