Search in sources :

Example 6 with DMNElementReference

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

the class DecisionServiceConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    DecisionService decisionService = (DecisionService) parent;
    for (DMNElementReference ref : decisionService.getOutputDecision()) {
        writeChildrenNode(writer, context, ref, OUTPUT_DECISION);
    }
    for (DMNElementReference ref : decisionService.getEncapsulatedDecision()) {
        writeChildrenNode(writer, context, ref, ENCAPSULATED_DECISION);
    }
    for (DMNElementReference ref : decisionService.getInputDecision()) {
        writeChildrenNode(writer, context, ref, INPUT_DECISION);
    }
    for (DMNElementReference ref : decisionService.getInputData()) {
        writeChildrenNode(writer, context, ref, INPUT_DATA);
    }
}
Also used : DMNElementReference(org.kie.dmn.model.v1_1.DMNElementReference) DecisionService(org.kie.dmn.model.v1_1.DecisionService)

Example 7 with DMNElementReference

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

the class ElementCollectionConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    ElementCollection ec = (ElementCollection) parent;
    for (DMNElementReference e : ec.getDrgElement()) {
        writeChildrenNode(writer, context, e, DRG_ELEMENT);
    }
}
Also used : DMNElementReference(org.kie.dmn.model.v1_1.DMNElementReference) ElementCollection(org.kie.dmn.model.v1_1.ElementCollection)

Example 8 with DMNElementReference

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

the class ElementCollectionConverter method assignChildElement.

@Override
protected void assignChildElement(Object parent, String nodeName, Object child) {
    ElementCollection ec = (ElementCollection) parent;
    if (DRG_ELEMENT.equals(nodeName)) {
        ec.getDrgElement().add((DMNElementReference) child);
    }
    super.assignChildElement(parent, nodeName, child);
}
Also used : ElementCollection(org.kie.dmn.model.v1_1.ElementCollection)

Aggregations

DMNElementReference (org.kie.dmn.model.v1_1.DMNElementReference)7 ElementCollection (org.kie.dmn.model.v1_1.ElementCollection)2 DMNModelInstrumentedBase (org.kie.dmn.model.v1_1.DMNModelInstrumentedBase)1 DecisionService (org.kie.dmn.model.v1_1.DecisionService)1 OrganizationUnit (org.kie.dmn.model.v1_1.OrganizationUnit)1 PerformanceIndicator (org.kie.dmn.model.v1_1.PerformanceIndicator)1