Search in sources :

Example 1 with RuleAnnotation

use of org.kie.dmn.model.api.RuleAnnotation 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);
    }
}
Also used : RuleAnnotation(org.kie.dmn.model.api.RuleAnnotation) LiteralExpression(org.kie.dmn.model.api.LiteralExpression) UnaryTests(org.kie.dmn.model.api.UnaryTests) DecisionRule(org.kie.dmn.model.api.DecisionRule) TDecisionRule(org.kie.dmn.model.v1_3.TDecisionRule)

Example 2 with RuleAnnotation

use of org.kie.dmn.model.api.RuleAnnotation 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);
    }
}
Also used : RuleAnnotation(org.kie.dmn.model.api.RuleAnnotation) LiteralExpression(org.kie.dmn.model.api.LiteralExpression) UnaryTests(org.kie.dmn.model.api.UnaryTests) DecisionRule(org.kie.dmn.model.api.DecisionRule) TDecisionRule(org.kie.dmn.model.v1_2.TDecisionRule)

Example 3 with RuleAnnotation

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

the class RuleAnnotationConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    RuleAnnotation r = (RuleAnnotation) parent;
    writeChildrenNode(writer, context, r.getText(), TEXT);
}
Also used : RuleAnnotation(org.kie.dmn.model.api.RuleAnnotation) TRuleAnnotation(org.kie.dmn.model.v1_3.TRuleAnnotation)

Example 4 with RuleAnnotation

use of org.kie.dmn.model.api.RuleAnnotation 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);
    }
}
Also used : RuleAnnotation(org.kie.dmn.model.api.RuleAnnotation) LiteralExpression(org.kie.dmn.model.api.LiteralExpression) UnaryTests(org.kie.dmn.model.api.UnaryTests) DecisionRule(org.kie.dmn.model.api.DecisionRule) TDecisionRule(org.kie.dmn.model.v1_4.TDecisionRule)

Example 5 with RuleAnnotation

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

the class RuleAnnotationConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    RuleAnnotation r = (RuleAnnotation) parent;
    writeChildrenNode(writer, context, r.getText(), TEXT);
}
Also used : TRuleAnnotation(org.kie.dmn.model.v1_4.TRuleAnnotation) RuleAnnotation(org.kie.dmn.model.api.RuleAnnotation)

Aggregations

RuleAnnotation (org.kie.dmn.model.api.RuleAnnotation)11 DecisionRule (org.kie.dmn.model.api.DecisionRule)3 LiteralExpression (org.kie.dmn.model.api.LiteralExpression)3 UnaryTests (org.kie.dmn.model.api.UnaryTests)3 TRuleAnnotation (org.kie.dmn.model.v1_2.TRuleAnnotation)2 TRuleAnnotation (org.kie.dmn.model.v1_3.TRuleAnnotation)2 TRuleAnnotation (org.kie.dmn.model.v1_4.TRuleAnnotation)2 Test (org.junit.Test)1 TDecisionRule (org.kie.dmn.model.v1_2.TDecisionRule)1 TDecisionRule (org.kie.dmn.model.v1_3.TDecisionRule)1 TDecisionRule (org.kie.dmn.model.v1_4.TDecisionRule)1 RuleAnnotationClauseText (org.kie.workbench.common.dmn.api.definition.model.RuleAnnotationClauseText)1 Text (org.kie.workbench.common.dmn.api.property.dmn.Text)1