Search in sources :

Example 6 with DMNElementReference

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

Example 7 with DMNElementReference

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

the class OrganizationUnitConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    OrganizationUnit ou = (OrganizationUnit) parent;
    for (DMNElementReference dm : ou.getDecisionMade()) {
        writeChildrenNode(writer, context, dm, DECISION_MADE);
    }
    for (DMNElementReference downed : ou.getDecisionOwned()) {
        writeChildrenNode(writer, context, downed, DECISION_OWNED);
    }
}
Also used : DMNElementReference(org.kie.dmn.model.api.DMNElementReference) OrganizationUnit(org.kie.dmn.model.api.OrganizationUnit) TOrganizationUnit(org.kie.dmn.model.v1_2.TOrganizationUnit)

Example 8 with DMNElementReference

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

the class DMNElementReferenceConverter method assignAttributes.

@Override
protected void assignAttributes(HierarchicalStreamReader reader, Object parent) {
    super.assignAttributes(reader, parent);
    DMNElementReference er = (DMNElementReference) parent;
    String href = reader.getAttribute(HREF);
    er.setHref(href);
}
Also used : DMNElementReference(org.kie.dmn.model.api.DMNElementReference) TDMNElementReference(org.kie.dmn.model.v1_3.TDMNElementReference)

Example 9 with DMNElementReference

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

the class DMNElementReferenceConverter method writeAttributes.

@Override
protected void writeAttributes(HierarchicalStreamWriter writer, Object parent) {
    super.writeAttributes(writer, parent);
    DMNElementReference er = (DMNElementReference) parent;
    if (er.getHref() != null)
        writer.addAttribute(HREF, er.getHref());
}
Also used : DMNElementReference(org.kie.dmn.model.api.DMNElementReference) TDMNElementReference(org.kie.dmn.model.v1_3.TDMNElementReference)

Example 10 with DMNElementReference

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

the class DMNElementReferenceConverter method assignAttributes.

@Override
protected void assignAttributes(HierarchicalStreamReader reader, Object parent) {
    super.assignAttributes(reader, parent);
    DMNElementReference er = (DMNElementReference) parent;
    String href = reader.getAttribute(HREF);
    er.setHref(href);
}
Also used : DMNElementReference(org.kie.dmn.model.api.DMNElementReference) TDMNElementReference(org.kie.dmn.model.v1_4.TDMNElementReference)

Aggregations

DMNElementReference (org.kie.dmn.model.api.DMNElementReference)36 Decision (org.kie.dmn.model.api.Decision)5 InformationRequirement (org.kie.dmn.model.api.InformationRequirement)5 TDMNElementReference (org.kie.dmn.model.v1_2.TDMNElementReference)5 AuthorityRequirement (org.kie.dmn.model.api.AuthorityRequirement)4 DMNModelInstrumentedBase (org.kie.dmn.model.api.DMNModelInstrumentedBase)4 DecisionService (org.kie.dmn.model.api.DecisionService)4 ElementCollection (org.kie.dmn.model.api.ElementCollection)4 Expression (org.kie.dmn.model.api.Expression)4 KnowledgeRequirement (org.kie.dmn.model.api.KnowledgeRequirement)4 OrganizationUnit (org.kie.dmn.model.api.OrganizationUnit)4 PerformanceIndicator (org.kie.dmn.model.api.PerformanceIndicator)4 TDMNElementReference (org.kie.dmn.model.v1_1.TDMNElementReference)4 TDMNElementReference (org.kie.dmn.model.v1_3.TDMNElementReference)4 TDMNElementReference (org.kie.dmn.model.v1_4.TDMNElementReference)4 IOException (java.io.IOException)2 Reader (java.io.Reader)2 Arrays (java.util.Arrays)2 List (java.util.List)2 CoreMatchers.is (org.hamcrest.CoreMatchers.is)2