use of org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITUnaryTests in project kie-wb-common by kiegroup.
the class ItemDefinitionPropertyConverter method dmnFromWB.
public static JSITItemDefinition dmnFromWB(final ItemDefinition wb) {
if (Objects.isNull(wb)) {
return null;
}
final JSITItemDefinition result = new JSITItemDefinition();
result.setId(wb.getId().getValue());
final Optional<String> description = Optional.ofNullable(DescriptionPropertyConverter.dmnFromWB(wb.getDescription()));
description.ifPresent(result::setDescription);
result.setName(wb.getName().getValue());
QNamePropertyConverter.setDMNfromWB(wb.getTypeRef(), result::setTypeRef);
result.setTypeLanguage(wb.getTypeLanguage());
result.setIsCollection(wb.isIsCollection());
final JSITUnaryTests utConverted = UnaryTestsPropertyConverter.dmnFromWB(wb.getAllowedValues());
result.setAllowedValues(utConverted);
for (ItemDefinition child : wb.getItemComponent()) {
final JSITItemDefinition convertedChild = ItemDefinitionPropertyConverter.dmnFromWB(child);
result.addItemComponent(convertedChild);
}
return result;
}
use of org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITUnaryTests in project kie-wb-common by kiegroup.
the class OutputClauseUnaryTestsPropertyConverterTest method testDMNFromWBWhenNull.
@Test
public void testDMNFromWBWhenNull() {
final JSITUnaryTests dmn = OutputClauseUnaryTestsPropertyConverter.dmnFromWB(null);
assertThat(dmn).isNull();
}
Aggregations