Search in sources :

Example 26 with InformationItem

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

the class InformationItemConverter method writeAttributes.

@Override
protected void writeAttributes(HierarchicalStreamWriter writer, Object parent) {
    super.writeAttributes(writer, parent);
    InformationItem ii = (InformationItem) parent;
    if (ii.getTypeRef() != null) {
        writer.addAttribute(TYPE_REF, MarshallingUtils.formatQName(ii.getTypeRef(), ii));
    }
}
Also used : InformationItem(org.kie.dmn.model.api.InformationItem) TInformationItem(org.kie.dmn.model.v1_4.TInformationItem)

Example 27 with InformationItem

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

the class FunctionItemConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    FunctionItem ii = (FunctionItem) parent;
    for (InformationItem ic : ii.getParameters()) {
        writeChildrenNode(writer, context, ic, PARAMETERS);
    }
}
Also used : InformationItem(org.kie.dmn.model.api.InformationItem) TFunctionItem(org.kie.dmn.model.v1_4.TFunctionItem) FunctionItem(org.kie.dmn.model.api.FunctionItem)

Example 28 with InformationItem

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

the class FunctionItemConverter method writeChildren.

@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
    super.writeChildren(writer, context, parent);
    FunctionItem ii = (FunctionItem) parent;
    for (InformationItem ic : ii.getParameters()) {
        writeChildrenNode(writer, context, ic, PARAMETERS);
    }
}
Also used : InformationItem(org.kie.dmn.model.api.InformationItem) TFunctionItem(org.kie.dmn.model.v1_3.TFunctionItem) FunctionItem(org.kie.dmn.model.api.FunctionItem)

Example 29 with InformationItem

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

the class InformationItemConverter method writeAttributes.

@Override
protected void writeAttributes(HierarchicalStreamWriter writer, Object parent) {
    super.writeAttributes(writer, parent);
    InformationItem ii = (InformationItem) parent;
    if (ii.getTypeRef() != null) {
        writer.addAttribute(TYPE_REF, MarshallingUtils.formatQName(ii.getTypeRef(), ii));
    }
}
Also used : TInformationItem(org.kie.dmn.model.v1_3.TInformationItem) InformationItem(org.kie.dmn.model.api.InformationItem)

Example 30 with InformationItem

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

the class InformationItemConverter method assignAttributes.

@Override
protected void assignAttributes(HierarchicalStreamReader reader, Object parent) {
    super.assignAttributes(reader, parent);
    InformationItem ii = (InformationItem) parent;
    String typeRef = reader.getAttribute(TYPE_REF);
    ii.setTypeRef(MarshallingUtils.parseQNameString(typeRef));
}
Also used : TInformationItem(org.kie.dmn.model.v1_3.TInformationItem) InformationItem(org.kie.dmn.model.api.InformationItem)

Aggregations

InformationItem (org.kie.dmn.model.api.InformationItem)32 QName (javax.xml.namespace.QName)9 TInformationItem (org.kie.dmn.model.v1_2.TInformationItem)8 Relation (org.kie.dmn.model.api.Relation)7 FunctionDefinition (org.kie.dmn.model.api.FunctionDefinition)6 ArrayList (java.util.ArrayList)5 DMNType (org.kie.dmn.api.core.DMNType)5 DecisionNode (org.kie.dmn.api.core.ast.DecisionNode)5 List (java.util.List)4 Optional (java.util.Optional)4 Collectors (java.util.stream.Collectors)4 DMNMessage (org.kie.dmn.api.core.DMNMessage)4 BusinessKnowledgeModelNode (org.kie.dmn.api.core.ast.BusinessKnowledgeModelNode)4 DMNNode (org.kie.dmn.api.core.ast.DMNNode)4 DMNBaseNode (org.kie.dmn.core.ast.DMNBaseNode)4 DMNModelImpl (org.kie.dmn.core.impl.DMNModelImpl)4 Msg (org.kie.dmn.core.util.Msg)4 MsgUtil (org.kie.dmn.core.util.MsgUtil)4 DRGElement (org.kie.dmn.model.api.DRGElement)4 Decision (org.kie.dmn.model.api.Decision)4