use of org.kie.dmn.model.api.LiteralExpression in project kie-wb-common by kiegroup.
the class OutputClausePropertyConverter method dmnFromWB.
public static org.kie.dmn.model.api.OutputClause dmnFromWB(final OutputClause wb) {
final org.kie.dmn.model.api.OutputClause result = new org.kie.dmn.model.v1_2.TOutputClause();
result.setId(wb.getId().getValue());
result.setName(wb.getName());
result.setDescription(DescriptionPropertyConverter.dmnFromWB(wb.getDescription()));
final UnaryTests outputValues = UnaryTestsPropertyConverter.dmnFromWB(wb.getOutputValues());
if (outputValues != null && StringUtils.nonEmpty(outputValues.getText())) {
outputValues.setParent(result);
result.setOutputValues(outputValues);
}
final LiteralExpression defaultOutputEntry = LiteralExpressionPropertyConverter.dmnFromWB(wb.getDefaultOutputEntry());
if (defaultOutputEntry != null && StringUtils.nonEmpty(defaultOutputEntry.getText())) {
defaultOutputEntry.setParent(result);
result.setDefaultOutputEntry(defaultOutputEntry);
}
QNamePropertyConverter.setDMNfromWB(wb.getTypeRef(), result::setTypeRef);
return result;
}
Aggregations