use of org.kie.dmn.model.api.UnaryTests in project drools by kiegroup.
the class DecisionRuleConverter method writeChildren.
@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
super.writeChildren(writer, context, parent);
DecisionRule dr = (DecisionRule) parent;
for (UnaryTests ie : dr.getInputEntry()) {
writeChildrenNode(writer, context, ie, INPUT_ENTRY);
}
for (LiteralExpression oe : dr.getOutputEntry()) {
writeChildrenNode(writer, context, oe, OUTPUT_ENTRY);
}
for (RuleAnnotation a : dr.getAnnotationEntry()) {
writeChildrenNode(writer, context, a, ANNOTATION_ENTRY);
}
}
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 drools by kiegroup.
the class ExpressionConverter method writeAttributes.
@Override
protected void writeAttributes(HierarchicalStreamWriter writer, Object parent) {
super.writeAttributes(writer, parent);
Expression e = (Expression) parent;
if (!(e instanceof UnaryTests) && e.getTypeRef() != null) {
writer.addAttribute(TYPE_REF, MarshallingUtils.formatQName(e.getTypeRef(), e));
}
}
Aggregations