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));
}
}
use of org.kie.dmn.model.api.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(xstream, fd.getExpression()));
}
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));
}
use of org.kie.dmn.model.api.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(xstream, fd.getExpression()));
}
use of org.kie.dmn.model.api.InformationItem in project drools by kiegroup.
the class RelationConverter method writeChildren.
@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
super.writeChildren(writer, context, parent);
Relation r = (Relation) parent;
for (InformationItem c : r.getColumn()) {
writeChildrenNode(writer, context, c, COLUMN);
}
for (org.kie.dmn.model.api.List row : r.getRow()) {
writeChildrenNode(writer, context, row, ROW);
}
}
Aggregations