@Test public void testDMNFromWB_NullConversion() { assertThat(ExpressionPropertyConverter.dmnFromWB(null, componentWidthsConsumer)).isNull(); }
public static org.kie.dmn.model.api.Expression dmnFromWB(final Expression wb, final Consumer<ComponentWidths> componentWidthsConsumer) { if (Objects.isNull(wb)) { return null; } final String uuid = wb.getId().getValue(); if (Objects.nonNull(uuid)) { final ComponentWidths componentWidths = new ComponentWidths(); componentWidths.setDmnElementRef(new QName(uuid)); componentWidths.setWidths(new ArrayList<>(wb.getComponentWidths())); componentWidthsConsumer.accept(componentWidths); } if (wb instanceof IsLiteralExpression) { return LiteralExpressionPropertyConverter.dmnFromWB((IsLiteralExpression) wb); } else if (wb instanceof Context) { return ContextPropertyConverter.dmnFromWB((Context) wb, componentWidthsConsumer); } else if (wb instanceof Relation) { return RelationPropertyConverter.dmnFromWB((Relation) wb, componentWidthsConsumer); } else if (wb instanceof List) { return ListPropertyConverter.dmnFromWB((List) wb, componentWidthsConsumer); } else if (wb instanceof Invocation) { return InvocationPropertyConverter.dmnFromWB((Invocation) wb, componentWidthsConsumer); } else if (wb instanceof FunctionDefinition) { return FunctionDefinitionPropertyConverter.dmnFromWB((FunctionDefinition) wb, componentWidthsConsumer); } else if (wb instanceof DecisionTable) { return DecisionTablePropertyConverter.dmnFromWB((DecisionTable) wb); } return null; }
ExpressionPropertyConverter { public static org.kie.dmn.model.api.Expression dmnFromWB(final Expression wb, final Consumer<ComponentWidths> componentWidthsConsumer) { if (Objects.isNull(wb)) { return null; } final String uuid = wb.getId().getValue(); if (Objects.nonNull(uuid)) { final ComponentWidths componentWidths = new ComponentWidths(); componentWidths.setDmnElementRef(new QName(uuid)); componentWidths.setWidths(new ArrayList<>(wb.getComponentWidths())); componentWidthsConsumer.accept(componentWidths); } if (wb instanceof IsLiteralExpression) { return LiteralExpressionPropertyConverter.dmnFromWB((IsLiteralExpression) wb); } else if (wb instanceof Context) { return ContextPropertyConverter.dmnFromWB((Context) wb, componentWidthsConsumer); } else if (wb instanceof Relation) { return RelationPropertyConverter.dmnFromWB((Relation) wb, componentWidthsConsumer); } else if (wb instanceof List) { return ListPropertyConverter.dmnFromWB((List) wb, componentWidthsConsumer); } else if (wb instanceof Invocation) { return InvocationPropertyConverter.dmnFromWB((Invocation) wb, componentWidthsConsumer); } else if (wb instanceof FunctionDefinition) { return FunctionDefinitionPropertyConverter.dmnFromWB((FunctionDefinition) wb, componentWidthsConsumer); } else if (wb instanceof DecisionTable) { return DecisionTablePropertyConverter.dmnFromWB((DecisionTable) wb); } return null; } }
ExpressionPropertyConverter { public static org.kie.dmn.model.api.Expression dmnFromWB(final Expression wb, final Consumer<ComponentWidths> componentWidthsConsumer) { if (Objects.isNull(wb)) { return null; } final String uuid = wb.getId().getValue(); if (Objects.nonNull(uuid)) { final ComponentWidths componentWidths = new ComponentWidths(); componentWidths.setDmnElementRef(new QName(uuid)); componentWidths.setWidths(new ArrayList<>(wb.getComponentWidths())); componentWidthsConsumer.accept(componentWidths); } if (wb instanceof IsLiteralExpression) { return LiteralExpressionPropertyConverter.dmnFromWB((IsLiteralExpression) wb); } else if (wb instanceof Context) { return ContextPropertyConverter.dmnFromWB((Context) wb, componentWidthsConsumer); } else if (wb instanceof Relation) { return RelationPropertyConverter.dmnFromWB((Relation) wb, componentWidthsConsumer); } else if (wb instanceof List) { return ListPropertyConverter.dmnFromWB((List) wb, componentWidthsConsumer); } else if (wb instanceof Invocation) { return InvocationPropertyConverter.dmnFromWB((Invocation) wb, componentWidthsConsumer); } else if (wb instanceof FunctionDefinition) { return FunctionDefinitionPropertyConverter.dmnFromWB((FunctionDefinition) wb, componentWidthsConsumer); } else if (wb instanceof DecisionTable) { return DecisionTablePropertyConverter.dmnFromWB((DecisionTable) wb); } return null; }  }
ExpressionPropertyConverter { public static org.kie.dmn.model.api.Expression dmnFromWB(final Expression wb, final Consumer<ComponentWidths> componentWidthsConsumer) { if (Objects.isNull(wb)) { return null; } final String uuid = wb.getId().getValue(); if (Objects.nonNull(uuid)) { final ComponentWidths componentWidths = new ComponentWidths(); componentWidths.setDmnElementRef(new QName(uuid)); componentWidths.setWidths(new ArrayList<>(wb.getComponentWidths())); componentWidthsConsumer.accept(componentWidths); } if (wb instanceof IsLiteralExpression) { return LiteralExpressionPropertyConverter.dmnFromWB((IsLiteralExpression) wb); } else if (wb instanceof Context) { return ContextPropertyConverter.dmnFromWB((Context) wb, componentWidthsConsumer); } else if (wb instanceof Relation) { return RelationPropertyConverter.dmnFromWB((Relation) wb, componentWidthsConsumer); } else if (wb instanceof List) { return ListPropertyConverter.dmnFromWB((List) wb, componentWidthsConsumer); } else if (wb instanceof Invocation) { return InvocationPropertyConverter.dmnFromWB((Invocation) wb, componentWidthsConsumer); } else if (wb instanceof FunctionDefinition) { return FunctionDefinitionPropertyConverter.dmnFromWB((FunctionDefinition) wb, componentWidthsConsumer); } else if (wb instanceof DecisionTable) { return DecisionTablePropertyConverter.dmnFromWB((DecisionTable) wb); } return null; }  static Expression wbFromDMN(final org.kie.dmn.model.api.Expression dmn,
                                       final BiConsumer<String, HasComponentWidths> hasComponentWidthsConsumer); static org.kie.dmn.model.api.Expression dmnFromWB(final Expression wb,
                                                             final Consumer<ComponentWidths> componentWidthsConsumer); }
ExpressionPropertyConverter { public static org.kie.dmn.model.api.Expression dmnFromWB(final Expression wb, final Consumer<ComponentWidths> componentWidthsConsumer) { if (Objects.isNull(wb)) { return null; } final String uuid = wb.getId().getValue(); if (Objects.nonNull(uuid)) { final ComponentWidths componentWidths = new ComponentWidths(); componentWidths.setDmnElementRef(new QName(uuid)); componentWidths.setWidths(new ArrayList<>(wb.getComponentWidths())); componentWidthsConsumer.accept(componentWidths); } if (wb instanceof IsLiteralExpression) { return LiteralExpressionPropertyConverter.dmnFromWB((IsLiteralExpression) wb); } else if (wb instanceof Context) { return ContextPropertyConverter.dmnFromWB((Context) wb, componentWidthsConsumer); } else if (wb instanceof Relation) { return RelationPropertyConverter.dmnFromWB((Relation) wb, componentWidthsConsumer); } else if (wb instanceof List) { return ListPropertyConverter.dmnFromWB((List) wb, componentWidthsConsumer); } else if (wb instanceof Invocation) { return InvocationPropertyConverter.dmnFromWB((Invocation) wb, componentWidthsConsumer); } else if (wb instanceof FunctionDefinition) { return FunctionDefinitionPropertyConverter.dmnFromWB((FunctionDefinition) wb, componentWidthsConsumer); } else if (wb instanceof DecisionTable) { return DecisionTablePropertyConverter.dmnFromWB((DecisionTable) wb); } return null; }  static Expression wbFromDMN(final org.kie.dmn.model.api.Expression dmn,
                                       final BiConsumer<String, HasComponentWidths> hasComponentWidthsConsumer); static org.kie.dmn.model.api.Expression dmnFromWB(final Expression wb,
                                                             final Consumer<ComponentWidths> componentWidthsConsumer);  }