use of org.kie.dmn.model.v1_1.DMNElementReference in project drools by kiegroup.
the class PerformanceIndicatorConverter method writeChildren.
@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
super.writeChildren(writer, context, parent);
PerformanceIndicator pi = (PerformanceIndicator) parent;
for (DMNElementReference id : pi.getImpactingDecision()) {
writeChildrenNode(writer, context, id, IMPACTING_DECISION);
}
}
use of org.kie.dmn.model.v1_1.DMNElementReference in project drools by kiegroup.
the class DMNElementReferenceConverter method assignAttributes.
@Override
protected void assignAttributes(HierarchicalStreamReader reader, Object parent) {
super.assignAttributes(reader, parent);
DMNElementReference er = (DMNElementReference) parent;
String href = reader.getAttribute(HREF);
er.setHref(href);
}
use of org.kie.dmn.model.v1_1.DMNElementReference in project drools by kiegroup.
the class OrganizationUnitConverter method writeChildren.
@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
super.writeChildren(writer, context, parent);
OrganizationUnit ou = (OrganizationUnit) parent;
for (DMNElementReference dm : ou.getDecisionMade()) {
writeChildrenNode(writer, context, dm, DECISION_MADE);
}
for (DMNElementReference downed : ou.getDecisionOwned()) {
writeChildrenNode(writer, context, downed, DECISION_OWNED);
}
}
use of org.kie.dmn.model.v1_1.DMNElementReference in project drools by kiegroup.
the class DMNElementReferenceConverter method writeAttributes.
@Override
protected void writeAttributes(HierarchicalStreamWriter writer, Object parent) {
super.writeAttributes(writer, parent);
DMNElementReference er = (DMNElementReference) parent;
if (er.getHref() != null)
writer.addAttribute(HREF, er.getHref());
}
use of org.kie.dmn.model.v1_1.DMNElementReference in project drools by kiegroup.
the class DecisionServiceConverter method parseElements.
@Override
protected void parseElements(HierarchicalStreamReader reader, UnmarshallingContext context, Object parent) {
while (reader.hasMoreChildren()) {
reader.moveDown();
Object object = null;
String nodeName = reader.getNodeName();
if (nodeName.equals(INPUT_DATA)) {
// Patch because the tag name inputData is used in both decision services and as a DRG Element
DMNElementReference ref = new DMNElementReference();
ref.setHref(reader.getAttribute("href"));
object = ref;
} else {
// Default behaviour
object = readItem(reader, context, null);
}
if (object instanceof DMNModelInstrumentedBase) {
((DMNModelInstrumentedBase) object).setParent((DMNModelInstrumentedBase) parent);
((DMNModelInstrumentedBase) parent).addChildren((DMNModelInstrumentedBase) object);
}
reader.moveUp();
assignChildElement(parent, nodeName, object);
}
}
Aggregations