Search in sources :

Example 6 with FunctionItem

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

the class FunctionItemConverter method writeAttributes.

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

Example 7 with FunctionItem

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

the class FunctionItemConverter method assignAttributes.

@Override
protected void assignAttributes(HierarchicalStreamReader reader, Object parent) {
    super.assignAttributes(reader, parent);
    FunctionItem ii = (FunctionItem) parent;
    String typeRef = reader.getAttribute(OUTPUT_TYPE_REF);
    ii.setOutputTypeRef(MarshallingUtils.parseQNameString(typeRef));
}
Also used : TFunctionItem(org.kie.dmn.model.v1_4.TFunctionItem) FunctionItem(org.kie.dmn.model.api.FunctionItem)

Example 8 with FunctionItem

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

the class FunctionItemConverter method writeAttributes.

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

Example 9 with FunctionItem

use of org.kie.dmn.model.api.FunctionItem 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)

Aggregations

FunctionItem (org.kie.dmn.model.api.FunctionItem)9 InformationItem (org.kie.dmn.model.api.InformationItem)5 QName (javax.xml.namespace.QName)3 SimpleFnTypeImpl (org.kie.dmn.core.impl.SimpleFnTypeImpl)3 TFunctionItem (org.kie.dmn.model.v1_3.TFunctionItem)3 TFunctionItem (org.kie.dmn.model.v1_4.TFunctionItem)3 ArrayList (java.util.ArrayList)2 List (java.util.List)2 Optional (java.util.Optional)2 Function (java.util.function.Function)2 Collectors (java.util.stream.Collectors)2 DMNMessage (org.kie.dmn.api.core.DMNMessage)2 DMNType (org.kie.dmn.api.core.DMNType)2 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 Reader (java.io.Reader)1 URI (java.net.URI)1 URISyntaxException (java.net.URISyntaxException)1 URL (java.net.URL)1 Collection (java.util.Collection)1