use of org.kie.dmn.model.api.FunctionDefinition in project drools by kiegroup.
the class FunctionDefinitionConverter method writeChildren.
@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
super.writeChildren(writer, context, parent);
FunctionDefinition fd = (FunctionDefinition) parent;
for (InformationItem fparam : fd.getFormalParameter()) {
writeChildrenNode(writer, context, fparam, FORMAL_PARAMETER);
}
if (fd.getExpression() != null)
writeChildrenNode(writer, context, fd.getExpression(), MarshallingUtils.defineExpressionNodeName(fd.getExpression()));
}
use of org.kie.dmn.model.api.FunctionDefinition in project drools by kiegroup.
the class FunctionDefinitionConverter method assignAttributes.
@Override
protected void assignAttributes(HierarchicalStreamReader reader, Object parent) {
super.assignAttributes(reader, parent);
FunctionDefinition i = (FunctionDefinition) parent;
String kind = reader.getAttribute(KIND);
if (kind != null) {
i.setKind(FunctionKind.fromValue(kind));
}
}
use of org.kie.dmn.model.api.FunctionDefinition in project drools by kiegroup.
the class FunctionDefinitionConverter method writeChildren.
@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
super.writeChildren(writer, context, parent);
FunctionDefinition fd = (FunctionDefinition) parent;
for (InformationItem fparam : fd.getFormalParameter()) {
writeChildrenNode(writer, context, fparam, FORMAL_PARAMETER);
}
if (fd.getExpression() != null)
writeChildrenNode(writer, context, fd.getExpression(), MarshallingUtils.defineExpressionNodeName(xstream, fd.getExpression()));
}
use of org.kie.dmn.model.api.FunctionDefinition in project drools by kiegroup.
the class FunctionDefinitionConverter method assignAttributes.
@Override
protected void assignAttributes(HierarchicalStreamReader reader, Object parent) {
super.assignAttributes(reader, parent);
FunctionDefinition i = (FunctionDefinition) parent;
String kind = reader.getAttribute(KIND);
if (kind != null) {
i.setKind(FunctionKind.fromValue(kind));
}
}
use of org.kie.dmn.model.api.FunctionDefinition in project drools by kiegroup.
the class FunctionDefinitionConverter method writeChildren.
@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
super.writeChildren(writer, context, parent);
FunctionDefinition fd = (FunctionDefinition) parent;
for (InformationItem fparam : fd.getFormalParameter()) {
writeChildrenNode(writer, context, fparam, FORMAL_PARAMETER);
}
if (fd.getExpression() != null)
writeChildrenNode(writer, context, fd.getExpression(), MarshallingUtils.defineExpressionNodeName(xstream, fd.getExpression()));
}
Aggregations