@Test public void testWBFromDMN() { when(literalExpression.getId()).thenReturn(UUID); when(literalExpression.getDescription()).thenReturn(DESCRIPTION); when(literalExpression.getTypeRef()).thenReturn(TYPE_REF); when(literalExpression.getText()).thenReturn(TEXT); when(literalExpression.getExpressionLanguage()).thenReturn(EXPRESSION_LANGUAGE); when(literalExpression.getImportedValues()).thenReturn(jsitImportedValues); when(jsitImportedValues.getImportedElement()).thenReturn(IMPORTED_ELEMENT); final LiteralExpression result = LiteralExpressionPropertyConverter.wbFromDMN(literalExpression); assertThat(result.getId().getValue()).isEqualTo(UUID); assertThat(result.getDescription().getValue()).isEqualTo(DESCRIPTION); assertThat(result.getTypeRef().getNamespaceURI()).isEmpty(); assertThat(result.getTypeRef().getLocalPart()).isEqualTo(TYPE_REF); assertThat(result.getText().getValue()).isEqualTo(TEXT); assertThat(result.getExpressionLanguage().getValue()).isEqualTo(EXPRESSION_LANGUAGE); assertThat(result.getImportedValues().getImportedElement()).isEqualTo(IMPORTED_ELEMENT); assertThat(result.getImportedValues().getParent()).isEqualTo(result); }
public static LiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return null; } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(Objects.nonNull(dmn.getText()) ? dmn.getText() : ""); final ExpressionLanguage expressionLanguage = ExpressionLanguagePropertyConverter.wbFromDMN(dmn.getExpressionLanguage()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final LiteralExpression result = new LiteralExpression(id, description, typeRef, text, importedValues, expressionLanguage); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; }
LiteralExpressionPropertyConverter { public static LiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return null; } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(Objects.nonNull(dmn.getText()) ? dmn.getText() : ""); final ExpressionLanguage expressionLanguage = ExpressionLanguagePropertyConverter.wbFromDMN(dmn.getExpressionLanguage()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final LiteralExpression result = new LiteralExpression(id, description, typeRef, text, importedValues, expressionLanguage); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; } }
LiteralExpressionPropertyConverter { public static LiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return null; } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(Objects.nonNull(dmn.getText()) ? dmn.getText() : ""); final ExpressionLanguage expressionLanguage = ExpressionLanguagePropertyConverter.wbFromDMN(dmn.getExpressionLanguage()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final LiteralExpression result = new LiteralExpression(id, description, typeRef, text, importedValues, expressionLanguage); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; }  }
LiteralExpressionPropertyConverter { public static LiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return null; } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(Objects.nonNull(dmn.getText()) ? dmn.getText() : ""); final ExpressionLanguage expressionLanguage = ExpressionLanguagePropertyConverter.wbFromDMN(dmn.getExpressionLanguage()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final LiteralExpression result = new LiteralExpression(id, description, typeRef, text, importedValues, expressionLanguage); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; }  static LiteralExpression wbFromDMN(final JSITLiteralExpression dmn); static JSITLiteralExpression dmnFromWB(final IsLiteralExpression wb); }
LiteralExpressionPropertyConverter { public static LiteralExpression wbFromDMN(final JSITLiteralExpression dmn) { if (Objects.isNull(dmn)) { return null; } final Id id = IdPropertyConverter.wbFromDMN(dmn.getId()); final Description description = DescriptionPropertyConverter.wbFromDMN(dmn.getDescription()); final QName typeRef = QNamePropertyConverter.wbFromDMN(dmn.getTypeRef()); final Text text = new Text(Objects.nonNull(dmn.getText()) ? dmn.getText() : ""); final ExpressionLanguage expressionLanguage = ExpressionLanguagePropertyConverter.wbFromDMN(dmn.getExpressionLanguage()); final ImportedValues importedValues = ImportedValuesConverter.wbFromDMN(dmn.getImportedValues()); final LiteralExpression result = new LiteralExpression(id, description, typeRef, text, importedValues, expressionLanguage); if (Objects.nonNull(importedValues)) { importedValues.setParent(result); } return result; }  static LiteralExpression wbFromDMN(final JSITLiteralExpression dmn); static JSITLiteralExpression dmnFromWB(final IsLiteralExpression wb);  }