Search in sources :

Example 1 with BusinessContextElement

use of org.kie.dmn.model.api.BusinessContextElement in project drools by kiegroup.

the class BusinessContextElementConverter method writeAttributes.

@Override
protected void writeAttributes(HierarchicalStreamWriter writer, Object parent) {
    super.writeAttributes(writer, parent);
    BusinessContextElement bce = (BusinessContextElement) parent;
    if (bce.getURI() != null)
        writer.addAttribute(URI, bce.getURI());
}
Also used : BusinessContextElement(org.kie.dmn.model.api.BusinessContextElement)

Example 2 with BusinessContextElement

use of org.kie.dmn.model.api.BusinessContextElement in project drools by kiegroup.

the class BusinessContextElementConverter method writeAttributes.

@Override
protected void writeAttributes(HierarchicalStreamWriter writer, Object parent) {
    super.writeAttributes(writer, parent);
    BusinessContextElement bce = (BusinessContextElement) parent;
    if (bce.getURI() != null)
        writer.addAttribute(URI, bce.getURI());
}
Also used : BusinessContextElement(org.kie.dmn.model.api.BusinessContextElement)

Example 3 with BusinessContextElement

use of org.kie.dmn.model.api.BusinessContextElement in project drools by kiegroup.

the class BusinessContextElementConverter method assignAttributes.

@Override
protected void assignAttributes(HierarchicalStreamReader reader, Object parent) {
    super.assignAttributes(reader, parent);
    BusinessContextElement bce = (BusinessContextElement) parent;
    String uri = reader.getAttribute(URI);
    bce.setURI(uri);
}
Also used : BusinessContextElement(org.kie.dmn.model.api.BusinessContextElement)

Example 4 with BusinessContextElement

use of org.kie.dmn.model.api.BusinessContextElement 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);
    }
}
Also used : TDefinitions(org.kie.dmn.model.v1_2.TDefinitions) Definitions(org.kie.dmn.model.api.Definitions) ItemDefinition(org.kie.dmn.model.api.ItemDefinition) DMNDI(org.kie.dmn.model.api.dmndi.DMNDI) BusinessContextElement(org.kie.dmn.model.api.BusinessContextElement) Artifact(org.kie.dmn.model.api.Artifact) DRGElement(org.kie.dmn.model.api.DRGElement)

Example 5 with BusinessContextElement

use of org.kie.dmn.model.api.BusinessContextElement in project drools by kiegroup.

the class BusinessContextElementConverter method writeAttributes.

@Override
protected void writeAttributes(HierarchicalStreamWriter writer, Object parent) {
    super.writeAttributes(writer, parent);
    BusinessContextElement bce = (BusinessContextElement) parent;
    if (bce.getURI() != null)
        writer.addAttribute(URI, bce.getURI());
}
Also used : BusinessContextElement(org.kie.dmn.model.api.BusinessContextElement)

Aggregations

BusinessContextElement (org.kie.dmn.model.api.BusinessContextElement)15 Artifact (org.kie.dmn.model.api.Artifact)7 DRGElement (org.kie.dmn.model.api.DRGElement)7 Definitions (org.kie.dmn.model.api.Definitions)7 ItemDefinition (org.kie.dmn.model.api.ItemDefinition)7 Association (org.kie.dmn.model.api.Association)4 BusinessKnowledgeModel (org.kie.dmn.model.api.BusinessKnowledgeModel)4 Decision (org.kie.dmn.model.api.Decision)4 ElementCollection (org.kie.dmn.model.api.ElementCollection)4 Import (org.kie.dmn.model.api.Import)4 InputData (org.kie.dmn.model.api.InputData)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 DMNDI (org.kie.dmn.model.api.dmndi.DMNDI)3 Group (org.kie.dmn.model.api.Group)2 TDefinitions (org.kie.dmn.model.v1_2.TDefinitions)2 TDefinitions (org.kie.dmn.model.v1_3.TDefinitions)2