Search in sources :

Example 11 with ElementCollection

use of org.kie.dmn.model.api.ElementCollection 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 : TElementCollection(org.kie.dmn.model.v1_3.TElementCollection) ElementCollection(org.kie.dmn.model.api.ElementCollection)

Example 12 with ElementCollection

use of org.kie.dmn.model.api.ElementCollection 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.api.DMNElementReference) ElementCollection(org.kie.dmn.model.api.ElementCollection) TElementCollection(org.kie.dmn.model.v1_4.TElementCollection)

Aggregations

ElementCollection (org.kie.dmn.model.api.ElementCollection)12 Artifact (org.kie.dmn.model.api.Artifact)4 Association (org.kie.dmn.model.api.Association)4 BusinessContextElement (org.kie.dmn.model.api.BusinessContextElement)4 BusinessKnowledgeModel (org.kie.dmn.model.api.BusinessKnowledgeModel)4 DMNElementReference (org.kie.dmn.model.api.DMNElementReference)4 DRGElement (org.kie.dmn.model.api.DRGElement)4 Decision (org.kie.dmn.model.api.Decision)4 Definitions (org.kie.dmn.model.api.Definitions)4 Import (org.kie.dmn.model.api.Import)4 InputData (org.kie.dmn.model.api.InputData)4 ItemDefinition (org.kie.dmn.model.api.ItemDefinition)4 KnowledgeSource (org.kie.dmn.model.api.KnowledgeSource)4 OrganizationUnit (org.kie.dmn.model.api.OrganizationUnit)4 PerformanceIndicator (org.kie.dmn.model.api.PerformanceIndicator)4 TextAnnotation (org.kie.dmn.model.api.TextAnnotation)4 DecisionService (org.kie.dmn.model.api.DecisionService)3 Group (org.kie.dmn.model.api.Group)2 TElementCollection (org.kie.dmn.model.v1_1.TElementCollection)2 TElementCollection (org.kie.dmn.model.v1_2.TElementCollection)2