Search in sources :

Example 16 with InputClause

use of org.kie.dmn.model.api.InputClause in project drools by kiegroup.

the class DecisionTableConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    DecisionTable dt = (DecisionTable) parent;
    for (InputClause i : dt.getInput()) {
        writeChildrenNode(writer, context, i, INPUT);
    }
    for (OutputClause o : dt.getOutput()) {
        writeChildrenNode(writer, context, o, OUTPUT);
    }
    for (RuleAnnotationClause a : dt.getAnnotation()) {
        writeChildrenNode(writer, context, a, ANNOTATION);
    }
    for (DecisionRule r : dt.getRule()) {
        writeChildrenNode(writer, context, r, RULE);
    }
}
Also used : OutputClause(org.kie.dmn.model.api.OutputClause) DecisionTable(org.kie.dmn.model.api.DecisionTable) TDecisionTable(org.kie.dmn.model.v1_3.TDecisionTable) RuleAnnotationClause(org.kie.dmn.model.api.RuleAnnotationClause) InputClause(org.kie.dmn.model.api.InputClause) DecisionRule(org.kie.dmn.model.api.DecisionRule)

Example 17 with InputClause

use of org.kie.dmn.model.api.InputClause in project drools by kiegroup.

the class DecisionTableConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    DecisionTable dt = (DecisionTable) parent;
    for (InputClause i : dt.getInput()) {
        writeChildrenNode(writer, context, i, INPUT);
    }
    for (OutputClause o : dt.getOutput()) {
        writeChildrenNode(writer, context, o, OUTPUT);
    }
    for (RuleAnnotationClause a : dt.getAnnotation()) {
        writeChildrenNode(writer, context, a, ANNOTATION);
    }
    for (DecisionRule r : dt.getRule()) {
        writeChildrenNode(writer, context, r, RULE);
    }
}
Also used : OutputClause(org.kie.dmn.model.api.OutputClause) DecisionTable(org.kie.dmn.model.api.DecisionTable) TDecisionTable(org.kie.dmn.model.v1_4.TDecisionTable) RuleAnnotationClause(org.kie.dmn.model.api.RuleAnnotationClause) InputClause(org.kie.dmn.model.api.InputClause) DecisionRule(org.kie.dmn.model.api.DecisionRule)

Aggregations

InputClause (org.kie.dmn.model.api.InputClause)17 DecisionTable (org.kie.dmn.model.api.DecisionTable)8 OutputClause (org.kie.dmn.model.api.OutputClause)7 DecisionRule (org.kie.dmn.model.api.DecisionRule)6 QName (javax.xml.namespace.QName)4 LiteralExpression (org.kie.dmn.model.api.LiteralExpression)4 List (java.util.List)3 Collectors (java.util.stream.Collectors)3 DMNType (org.kie.dmn.api.core.DMNType)3 HitPolicy (org.kie.dmn.model.api.HitPolicy)3 ArrayList (java.util.ArrayList)2 Collections (java.util.Collections)2 DMNMessage (org.kie.dmn.api.core.DMNMessage)2 Msg (org.kie.dmn.core.util.Msg)2 MsgUtil (org.kie.dmn.core.util.MsgUtil)2 Decision (org.kie.dmn.model.api.Decision)2 InformationItem (org.kie.dmn.model.api.InformationItem)2 RuleAnnotationClause (org.kie.dmn.model.api.RuleAnnotationClause)2 TDecisionTable (org.kie.dmn.model.v1_2.TDecisionTable)2 Logger (org.slf4j.Logger)2