use of org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem 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.workbench.common.dmn.api.definition.v1_1.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()));
}
use of org.kie.workbench.common.dmn.api.definition.v1_1.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));
}
use of org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem in project kie-wb-common by kiegroup.
the class BindingPropertyConverter method wbFromDMN.
public static Binding wbFromDMN(final org.kie.dmn.model.v1_1.Binding dmn) {
if (dmn == null) {
return null;
}
InformationItem convertedParameter = InformationItemPropertyConverter.wbFromDMN(dmn.getParameter());
Expression convertedExpression = ExpressionPropertyConverter.wbFromDMN(dmn.getExpression());
Binding result = new Binding();
result.setParameter(convertedParameter);
result.setExpression(convertedExpression);
return result;
}
use of org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem in project kie-wb-common by kiegroup.
the class ContextEntryPropertyConverter method wbFromDMN.
public static ContextEntry wbFromDMN(final org.kie.dmn.model.v1_1.ContextEntry dmn) {
InformationItem variable = InformationItemPropertyConverter.wbFromDMN(dmn.getVariable());
Expression expression = ExpressionPropertyConverter.wbFromDMN(dmn.getExpression());
ContextEntry result = new ContextEntry();
result.setVariable(variable);
result.setExpression(expression);
return result;
}
Aggregations