Search in sources :

Example 6 with Expression

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

the class DMNListConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    List list = (List) parent;
    for (Expression e : list.getExpression()) {
        writeChildrenNode(writer, context, e, MarshallingUtils.defineExpressionNodeName(e));
    }
}
Also used : Expression(org.kie.dmn.model.api.Expression) List(org.kie.dmn.model.api.List) TList(org.kie.dmn.model.v1_2.TList)

Example 7 with Expression

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

Example 8 with Expression

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

the class DMNListConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    List list = (List) parent;
    for (Expression e : list.getExpression()) {
        writeChildrenNode(writer, context, e, MarshallingUtils.defineExpressionNodeName(xstream, e));
    }
}
Also used : Expression(org.kie.dmn.model.api.Expression) List(org.kie.dmn.model.api.List) TList(org.kie.dmn.model.v1_4.TList)

Example 9 with Expression

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

Example 10 with Expression

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

the class DMNEvaluatorCompiler method compileList.

private DMNExpressionEvaluator compileList(DMNCompilerContext ctx, DMNModelImpl model, DMNBaseNode node, String listName, org.kie.dmn.model.api.List expression) {
    org.kie.dmn.model.api.List listDef = expression;
    DMNListEvaluator listEval = new DMNListEvaluator(node.getName(), node.getSource(), listDef);
    for (Expression expr : listDef.getExpression()) {
        listEval.addElement(compileExpression(ctx, model, node, listName, expr));
    }
    return listEval;
}
Also used : LiteralExpression(org.kie.dmn.model.api.LiteralExpression) CompiledExpression(org.kie.dmn.feel.lang.CompiledExpression) Expression(org.kie.dmn.model.api.Expression) DMNListEvaluator(org.kie.dmn.core.ast.DMNListEvaluator)

Aggregations

Expression (org.kie.dmn.model.api.Expression)16 AuthorityRequirement (org.kie.dmn.model.api.AuthorityRequirement)4 DMNElementReference (org.kie.dmn.model.api.DMNElementReference)4 Decision (org.kie.dmn.model.api.Decision)4 InformationRequirement (org.kie.dmn.model.api.InformationRequirement)4 KnowledgeRequirement (org.kie.dmn.model.api.KnowledgeRequirement)4 List (org.kie.dmn.model.api.List)4 UnaryTests (org.kie.dmn.model.api.UnaryTests)4 CompiledExpression (org.kie.dmn.feel.lang.CompiledExpression)2 LiteralExpression (org.kie.dmn.model.api.LiteralExpression)2 NamedExpression (org.kie.dmn.trisotech.model.api.NamedExpression)2 TNamedExpression (org.kie.dmn.trisotech.model.v1_3.TNamedExpression)2 ArrayList (java.util.ArrayList)1 DMNExpressionEvaluator (org.kie.dmn.core.api.DMNExpressionEvaluator)1 DMNListEvaluator (org.kie.dmn.core.ast.DMNListEvaluator)1 DMNRelationEvaluator (org.kie.dmn.core.ast.DMNRelationEvaluator)1 InformationItem (org.kie.dmn.model.api.InformationItem)1 Relation (org.kie.dmn.model.api.Relation)1 TDecision (org.kie.dmn.model.v1_1.TDecision)1 TList (org.kie.dmn.model.v1_1.TList)1