use of org.kie.dmn.model.api.dmndi.DMNDI in project drools by kiegroup.
the class DefinitionsConverter method assignChildElement.
@Override
protected void assignChildElement(Object parent, String nodeName, Object child) {
Definitions def = (Definitions) parent;
if (IMPORT.equals(nodeName)) {
def.getImport().add((Import) child);
} else if (ITEM_DEFINITION.equals(nodeName)) {
def.getItemDefinition().add((ItemDefinition) child);
} else if (child instanceof DRGElement) {
def.getDrgElement().add((DRGElement) child);
} else if (child instanceof Artifact) {
def.getArtifact().add((Artifact) child);
} else if (ELEMENT_COLLECTION.equals(nodeName)) {
def.getElementCollection().add((ElementCollection) child);
} else if (child instanceof BusinessContextElement) {
def.getBusinessContextElement().add((BusinessContextElement) child);
} else if (child instanceof DMNDI) {
DMNDI dmndi = (DMNDI) child;
dmndi.normalize();
def.setDMNDI(dmndi);
} else {
super.assignChildElement(def, nodeName, child);
}
}
use of org.kie.dmn.model.api.dmndi.DMNDI in project drools by kiegroup.
the class DefinitionsConverter method assignChildElement.
@Override
protected void assignChildElement(Object parent, String nodeName, Object child) {
Definitions def = (Definitions) parent;
if (IMPORT.equals(nodeName)) {
def.getImport().add((Import) child);
} else if (ITEM_DEFINITION.equals(nodeName)) {
def.getItemDefinition().add((ItemDefinition) child);
} else if (child instanceof DRGElement) {
def.getDrgElement().add((DRGElement) child);
} else if (child instanceof Artifact) {
def.getArtifact().add((Artifact) child);
} else if (ELEMENT_COLLECTION.equals(nodeName)) {
def.getElementCollection().add((ElementCollection) child);
} else if (child instanceof BusinessContextElement) {
def.getBusinessContextElement().add((BusinessContextElement) child);
} else if (child instanceof DMNDI) {
DMNDI dmndi = (DMNDI) child;
dmndi.normalize();
def.setDMNDI(dmndi);
} else {
super.assignChildElement(def, nodeName, child);
}
}
use of org.kie.dmn.model.api.dmndi.DMNDI 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.DMNDI in project drools by kiegroup.
the class DefinitionsConverter method assignChildElement.
@Override
protected void assignChildElement(Object parent, String nodeName, Object child) {
Definitions def = (Definitions) parent;
if (IMPORT.equals(nodeName)) {
def.getImport().add((Import) child);
} else if (ITEM_DEFINITION.equals(nodeName)) {
def.getItemDefinition().add((ItemDefinition) child);
} else if (child instanceof DRGElement) {
def.getDrgElement().add((DRGElement) child);
} else if (child instanceof Artifact) {
def.getArtifact().add((Artifact) child);
} else if (ELEMENT_COLLECTION.equals(nodeName)) {
def.getElementCollection().add((ElementCollection) child);
} else if (child instanceof BusinessContextElement) {
def.getBusinessContextElement().add((BusinessContextElement) child);
} else if (child instanceof DMNDI) {
DMNDI dmndi = (DMNDI) child;
dmndi.normalize();
def.setDMNDI(dmndi);
} else {
super.assignChildElement(def, nodeName, child);
}
}
use of org.kie.dmn.model.api.dmndi.DMNDI 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