Revision 2aa7bf5f
Added by Andreas Müller about 15 years ago
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/tcsxml/TcsXmlMetaDataImport.java | ||
---|---|---|
15 | 15 |
import eu.etaxonomy.cdm.io.common.ICdmIO; |
16 | 16 |
import eu.etaxonomy.cdm.io.common.IImportConfigurator; |
17 | 17 |
import eu.etaxonomy.cdm.io.common.MapWrapper; |
18 |
import eu.etaxonomy.cdm.io.tcsrdf.TcsRdfImportState; |
|
18 | 19 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
19 | 20 |
|
20 | 21 |
/** |
... | ... | |
41 | 42 |
} |
42 | 43 |
|
43 | 44 |
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 | 45 |
|
49 | 46 |
@Override |
50 |
public boolean doInvoke(IImportConfigurator config, |
|
51 |
Map<String, MapWrapper<? extends CdmBase>> stores){ |
|
47 |
public boolean doInvoke(TcsXmlImportState state){ |
|
52 | 48 |
logger.info("start make MetaData ..."); |
53 | 49 |
boolean success = true; |
54 | 50 |
String childName; |
... | ... | |
56 | 52 |
|
57 | 53 |
// MapWrapper<ReferenceBase> referenceMap = (MapWrapper<ReferenceBase>)stores.get(ICdmIO.REFERENCE_STORE); |
58 | 54 |
|
59 |
TcsXmlImportConfigurator tcsConfig = (TcsXmlImportConfigurator)config;
|
|
60 |
Element elDataSet = getDataSetElement(tcsConfig);
|
|
61 |
Namespace tcsNamespace = tcsConfig.getTcsXmlNamespace();
|
|
55 |
TcsXmlImportConfigurator config = state.getConfig();
|
|
56 |
Element elDataSet = getDataSetElement(config);
|
|
57 |
Namespace tcsNamespace = config.getTcsXmlNamespace();
|
|
62 | 58 |
|
63 | 59 |
DoubleResult<Element, Boolean> doubleResult; |
64 | 60 |
childName = "MetaData"; |
... | ... | |
80 | 76 |
success &= doubleResult.getSecondResult(); |
81 | 77 |
Element elMetaDataDetailed = doubleResult.getFirstResult(); |
82 | 78 |
|
83 |
success &= tcsConfig.getPlaceholderClass().makeMetaDataDetailed(tcsConfig, elMetaDataDetailed);
|
|
79 |
success &= config.getPlaceholderClass().makeMetaDataDetailed(config, elMetaDataDetailed);
|
|
84 | 80 |
// try { |
85 | 81 |
// List<Object> args = Arrays.asList(tcsConfig, elMetaDataDetailed); |
86 | 82 |
// tcsConfig.getFunctionMetaDataDetailed().invoke(this, args); |
Also available in: Unified diff
Refactoring for Imports