use of eu.esdihumboldt.hale.common.align.io.impl.internal.ParameterValueBean in project hale by halestudio.
the class NilReasonTranslator method getNewParameters.
/**
* @see FunctionTranslator#getNewParameters(List, CellBean, IOReporter,
* ICell)
*/
@Override
public List<ParameterValueBean> getNewParameters(List<ParameterValueBean> params, CellBean cellBean, IOReporter reporter, ICell cell) {
// update target, adding nilReason child to path
ChildContextBean nilReason = new ChildContextBean();
nilReason.setChildName(new QName("nilReason"));
PropertyBean target = (PropertyBean) cellBean.getTarget().get(0).getEntity();
target.getProperties().add(nilReason);
// updated parameters
List<ParameterValueBean> newList = new ArrayList<ParameterValueBean>();
for (ParameterValueBean val : params) {
// translate the nilReason type to the value being assigned
if (val.getName().equals(PARAMETER_NIL_REASON_TYPE)) {
newList.add(new ParameterValueBean(PARAMETER_VALUE, val.getValue()));
} else {
newList.add(val);
}
}
return newList;
}
use of eu.esdihumboldt.hale.common.align.io.impl.internal.ParameterValueBean in project hale by halestudio.
the class RenameTranslator method getNewParameters.
/**
* @see eu.esdihumboldt.hale.io.oml.helper.FunctionTranslator#getNewParameters(java.util.List,
* eu.esdihumboldt.hale.common.align.io.impl.internal.CellBean,
* eu.esdihumboldt.hale.common.core.io.report.IOReporter,
* eu.esdihumboldt.hale.io.oml.internal.model.align.ICell)
*/
@Override
public List<ParameterValueBean> getNewParameters(List<ParameterValueBean> params, CellBean cellBean, IOReporter reporter, ICell cell) {
List<ParameterValueBean> newList = new ArrayList<ParameterValueBean>();
newList.add(new ParameterValueBean("structuralRename", "false"));
return newList;
}
Aggregations