use of org.kie.dmn.model.api.UnaryTests in project drools by kiegroup.
the class UnaryTestsConverter method writeAttributes.
@Override
protected void writeAttributes(HierarchicalStreamWriter writer, Object parent) {
super.writeAttributes(writer, parent);
UnaryTests ut = (UnaryTests) parent;
if (ut.getExpressionLanguage() != null)
writer.addAttribute(EXPRESSION_LANGUAGE, ut.getExpressionLanguage());
}
use of org.kie.dmn.model.api.UnaryTests in project drools by kiegroup.
the class UnaryTestsConverter method writeChildren.
@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
super.writeChildren(writer, context, parent);
UnaryTests ut = (UnaryTests) parent;
writeChildrenNode(writer, context, ut.getText(), TEXT);
}
use of org.kie.dmn.model.api.UnaryTests in project drools by kiegroup.
the class UnaryTestsConverter method writeAttributes.
@Override
protected void writeAttributes(HierarchicalStreamWriter writer, Object parent) {
super.writeAttributes(writer, parent);
UnaryTests ut = (UnaryTests) parent;
if (ut.getExpressionLanguage() != null)
writer.addAttribute(EXPRESSION_LANGUAGE, ut.getExpressionLanguage());
}
use of org.kie.dmn.model.api.UnaryTests in project drools by kiegroup.
the class UnaryTestsConverter method assignAttributes.
@Override
protected void assignAttributes(HierarchicalStreamReader reader, Object parent) {
super.assignAttributes(reader, parent);
UnaryTests ut = (UnaryTests) parent;
String expressionLanguage = reader.getAttribute(EXPRESSION_LANGUAGE);
ut.setExpressionLanguage(expressionLanguage);
}
use of org.kie.dmn.model.api.UnaryTests in project kie-wb-common by kiegroup.
the class DecisionRulePropertyConverterTest method testWbFromDMN.
@Test
public void testWbFromDMN() {
final UnaryTests inputEntry = new TUnaryTests();
final LiteralExpression outputEntry = new TLiteralExpression();
final org.kie.dmn.model.api.DecisionRule dmn = new TDecisionRule();
dmn.setId(ID);
dmn.setDescription(DESCRIPTION);
dmn.getInputEntry().add(inputEntry);
dmn.getOutputEntry().add(outputEntry);
final org.kie.workbench.common.dmn.api.definition.model.DecisionRule wb = DecisionRulePropertyConverter.wbFromDMN(dmn);
assertEquals(ID, wb.getId().getValue());
assertEquals("", wb.getDescription().getValue());
assertEquals(wb, wb.getInputEntry().get(0).getParent());
assertEquals(wb, wb.getOutputEntry().get(0).getParent());
assertEquals(1, wb.getAnnotationEntry().size());
assertEquals(DESCRIPTION, wb.getAnnotationEntry().get(0).getText().getValue());
}
Aggregations