use of org.kie.dmn.model.api.dmndi.DMNDiagram in project drools by kiegroup.
the class DMNDiagramConverter method writeChildren.
@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
super.writeChildren(writer, context, parent);
DMNDiagram style = (DMNDiagram) parent;
if (style.getSize() != null) {
writeChildrenNode(writer, context, style.getSize(), SIZE);
}
for (DiagramElement de : style.getDMNDiagramElement()) {
writeChildrenNode(writer, context, de, de.getClass().getSimpleName());
}
}
use of org.kie.dmn.model.api.dmndi.DMNDiagram in project drools by kiegroup.
the class DMNDI method normalize.
@Override
public void normalize() {
if (dmnStyle == null || dmnDiagram == null) {
return;
}
Map<String, DMNStyle> styleById = dmnStyle.stream().collect(Collectors.toMap(DMNStyle::getId, Function.identity()));
for (DMNDiagram diagram : dmnDiagram) {
for (DiagramElement element : diagram.getDMNDiagramElement()) {
replaceSharedStyleIfStubbed(element, styleById);
if (element instanceof DMNShape) {
DMNShape dmnShape = (DMNShape) element;
replaceSharedStyleIfStubbed(dmnShape.getDMNLabel(), styleById);
}
}
}
}
use of org.kie.dmn.model.api.dmndi.DMNDiagram in project drools by kiegroup.
the class DMNDI method normalize.
@Override
public void normalize() {
if (dmnStyle == null || dmnDiagram == null) {
return;
}
Map<String, DMNStyle> styleById = dmnStyle.stream().collect(Collectors.toMap(DMNStyle::getId, Function.identity()));
for (DMNDiagram diagram : dmnDiagram) {
for (DiagramElement element : diagram.getDMNDiagramElement()) {
replaceSharedStyleIfStubbed(element, styleById);
if (element instanceof DMNShape) {
DMNShape dmnShape = (DMNShape) element;
replaceSharedStyleIfStubbed(dmnShape.getDMNLabel(), styleById);
}
}
}
}
use of org.kie.dmn.model.api.dmndi.DMNDiagram in project drools by kiegroup.
the class DMNDIConverter method writeChildren.
@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
super.writeChildren(writer, context, parent);
DMNDI list = (DMNDI) parent;
for (DMNDiagram e : list.getDMNDiagram()) {
writeChildrenNode(writer, context, e, DMN_DIAGRAM);
}
for (DMNStyle e : list.getDMNStyle()) {
writeChildrenNode(writer, context, e, DMN_STYLE);
}
}
use of org.kie.dmn.model.api.dmndi.DMNDiagram in project drools by kiegroup.
the class DMNDIConverter method writeChildren.
@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
super.writeChildren(writer, context, parent);
DMNDI list = (DMNDI) parent;
for (DMNDiagram e : list.getDMNDiagram()) {
writeChildrenNode(writer, context, e, DMN_DIAGRAM);
}
for (DMNStyle e : list.getDMNStyle()) {
writeChildrenNode(writer, context, e, DMN_STYLE);
}
}
Aggregations