use of org.kie.dmn.model.api.dmndi.DiagramElement 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.DiagramElement in project drools by kiegroup.
the class DiagramElementConverter method writeAttributes.
@Override
protected void writeAttributes(HierarchicalStreamWriter writer, Object parent) {
super.writeAttributes(writer, parent);
DiagramElement abs = (DiagramElement) parent;
if (abs.getId() != null) {
writer.addAttribute(ID, abs.getId());
}
if (abs.getSharedStyle() != null) {
writer.addAttribute(SHARED_STYLE, abs.getSharedStyle().getId());
}
}
use of org.kie.dmn.model.api.dmndi.DiagramElement in project drools by kiegroup.
the class DiagramElementConverter method writeChildren.
@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
super.writeChildren(writer, context, parent);
DiagramElement abs = (DiagramElement) parent;
if (abs.getExtension() != null) {
writeChildrenNode(writer, context, abs.getExtension(), EXTENSION);
}
if (abs.getStyle() != null) {
writeChildrenNode(writer, context, abs.getStyle(), STYLE);
}
}
use of org.kie.dmn.model.api.dmndi.DiagramElement in project drools by kiegroup.
the class DiagramElementConverter method assignAttributes.
@Override
protected void assignAttributes(HierarchicalStreamReader reader, Object parent) {
super.assignAttributes(reader, parent);
DiagramElement abs = (DiagramElement) parent;
String id = reader.getAttribute(ID);
if (id != null) {
abs.setId(id);
}
String sharedStyleXmlSerialization = reader.getAttribute(SHARED_STYLE);
if (sharedStyleXmlSerialization != null) {
abs.setSharedStyle(new org.kie.dmn.model.v1_2.dmndi.Style.IDREFStubStyle(sharedStyleXmlSerialization));
}
}
use of org.kie.dmn.model.api.dmndi.DiagramElement in project drools by kiegroup.
the class DiagramElementConverter method assignAttributes.
@Override
protected void assignAttributes(HierarchicalStreamReader reader, Object parent) {
super.assignAttributes(reader, parent);
DiagramElement abs = (DiagramElement) parent;
String id = reader.getAttribute(ID);
if (id != null) {
abs.setId(id);
}
String sharedStyleXmlSerialization = reader.getAttribute(SHARED_STYLE);
if (sharedStyleXmlSerialization != null) {
abs.setSharedStyle(new org.kie.dmn.model.v1_3.dmndi.Style.IDREFStubStyle(sharedStyleXmlSerialization));
}
}
Aggregations