use of org.kie.dmn.model.api.OutputClause in project drools by kiegroup.
the class OutputClauseConverter method assignAttributes.
@Override
protected void assignAttributes(HierarchicalStreamReader reader, Object parent) {
super.assignAttributes(reader, parent);
OutputClause oc = (OutputClause) parent;
String name = reader.getAttribute(NAME);
String typeRefValue = reader.getAttribute(TYPE_REF);
oc.setName(name);
if (typeRefValue != null)
oc.setTypeRef(MarshallingUtils.parseQNameString(typeRefValue));
}
use of org.kie.dmn.model.api.OutputClause 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);
}
}
use of org.kie.dmn.model.api.OutputClause 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);
}
use of org.kie.dmn.model.api.OutputClause in project drools by kiegroup.
the class OutputClausesWithType method inferTypeForOutputClauses.
public List<OutputClauseWithType> inferTypeForOutputClauses(List<OutputClause> outputClauses) {
List<OutputClauseWithType> outputClausesWithTypes = new ArrayList<>();
for (OutputClause outputClause : outputClauses) {
BaseDMNTypeImpl typeRef = inferTypeRef(dmnModel, decisionTable, outputClause);
outputClausesWithTypes.add(new OutputClauseWithType(outputClause, typeRef));
}
return outputClausesWithTypes;
}
use of org.kie.dmn.model.api.OutputClause 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);
}
Aggregations