use of eu.esdihumboldt.hale.common.align.model.functions.join.JoinParameter in project hale by halestudio.
the class JoinMergeMigrator method mergeJoinSource.
@SuppressWarnings("unused")
private void mergeJoinSource(MutableCell cell, EntityDefinition source, Cell match, Cell originalCell, SimpleLog log, JoinContext context, boolean groovy) {
/*
* Sources: Add all from match (should be at least two)
*/
addSources(cell, source, match, log, false);
// add source that was replaced and filter/contexts were not retained
context.addStrippedSource(source);
/*
* Join order: Replace type with matched sources (use match join order)
*/
JoinParameter matchParameter = CellUtil.getFirstParameter(match, JoinFunction.PARAMETER_JOIN).as(JoinParameter.class);
if (matchParameter != null) {
context.addOrderReplacement((TypeEntityDefinition) source, matchParameter.getTypes().toArray(new TypeEntityDefinition[matchParameter.getTypes().size()]));
}
// add join match to context (for match conditions)
context.addJoinMatch(match);
if (groovy) {
addScript(match, context);
}
}
Aggregations