Search in sources :

Example 11 with Context

use of org.kie.dmn.model.v1_1.Context in project drools by kiegroup.

the class InputClauseConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    InputClause ic = (InputClause) parent;
    writeChildrenNode(writer, context, ic.getInputExpression(), INPUT_EXPRESSION);
    if (ic.getInputValues() != null)
        writeChildrenNode(writer, context, ic.getInputValues(), INPUT_VALUES);
}
Also used : InputClause(org.kie.dmn.model.v1_1.InputClause)

Example 12 with Context

use of org.kie.dmn.model.v1_1.Context in project drools by kiegroup.

the class ItemDefinitionConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    ItemDefinition id = (ItemDefinition) parent;
    if (id.getTypeRef() != null)
        writeChildrenNode(writer, context, id.getTypeRef(), TYPE_REF);
    if (id.getAllowedValues() != null)
        writeChildrenNode(writer, context, id.getAllowedValues(), ALLOWED_VALUES);
    for (ItemDefinition ic : id.getItemComponent()) {
        writeChildrenNode(writer, context, ic, ITEM_COMPONENT);
    }
}
Also used : ItemDefinition(org.kie.dmn.model.v1_1.ItemDefinition)

Example 13 with Context

use of org.kie.dmn.model.v1_1.Context in project drools by kiegroup.

the class KnowledgeSourceConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    KnowledgeSource ks = (KnowledgeSource) parent;
    for (AuthorityRequirement ar : ks.getAuthorityRequirement()) {
        writeChildrenNode(writer, context, ar, AUTHORITY_REQUIREMENT);
    }
    if (ks.getType() != null)
        writeChildrenNode(writer, context, ks.getType(), TYPE);
    if (ks.getOwner() != null)
        writeChildrenNode(writer, context, ks.getOwner(), OWNER);
}
Also used : KnowledgeSource(org.kie.dmn.model.v1_1.KnowledgeSource) AuthorityRequirement(org.kie.dmn.model.v1_1.AuthorityRequirement)

Example 14 with Context

use of org.kie.dmn.model.v1_1.Context in project drools by kiegroup.

the class InvocationConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    Invocation i = (Invocation) parent;
    if (i.getExpression() != null)
        writeChildrenNode(writer, context, i.getExpression(), MarshallingUtils.defineExpressionNodeName(i.getExpression()));
    for (Binding b : i.getBinding()) {
        writeChildrenNode(writer, context, b, BINDING);
    }
}
Also used : Binding(org.kie.dmn.model.v1_1.Binding) Invocation(org.kie.dmn.model.v1_1.Invocation)

Example 15 with Context

use of org.kie.dmn.model.v1_1.Context in project drools by kiegroup.

the class OutputClauseConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    OutputClause oc = (OutputClause) parent;
    if (oc.getOutputValues() != null)
        writeChildrenNode(writer, context, oc.getOutputValues(), OUTPUT_VALUES);
    if (oc.getDefaultOutputEntry() != null)
        writeChildrenNode(writer, context, oc.getDefaultOutputEntry(), DEFAULT_OUTPUT_ENTRY);
}
Also used : OutputClause(org.kie.dmn.model.v1_1.OutputClause)

Aggregations

Context (org.eclipse.jst.server.tomcat.core.internal.xml.server40.Context)58 Context (com.microsoft.z3.Context)36 CoreException (org.eclipse.core.runtime.CoreException)34 Test (org.junit.Test)29 List (java.util.List)24 BoolExpr (com.microsoft.z3.BoolExpr)23 HashMap (java.util.HashMap)20 IOException (java.io.IOException)18 Map (java.util.Map)18 ArrayList (java.util.ArrayList)17 ServerInstance (org.eclipse.jst.server.tomcat.core.internal.xml.server40.ServerInstance)17 Context (org.kie.workbench.common.dmn.api.definition.v1_1.Context)17 DMNMessage (org.kie.dmn.api.core.DMNMessage)14 File (java.io.File)13 Solver (com.microsoft.z3.Solver)12 Status (com.microsoft.z3.Status)12 IPath (org.eclipse.core.runtime.IPath)11 IStatus (org.eclipse.core.runtime.IStatus)11 Status (org.eclipse.core.runtime.Status)11 Factory (org.eclipse.jst.server.tomcat.core.internal.xml.Factory)11