use of org.kie.dmn.trisotech.model.api.NamedExpression in project drools by kiegroup.
the class NamedExpressionConverter method assignAttributes.
@Override
protected void assignAttributes(HierarchicalStreamReader reader, Object parent) {
super.assignAttributes(reader, parent);
NamedExpression exp = (NamedExpression) parent;
String typeRef = reader.getAttribute("typeRef");
exp.setTypeRef(MarshallingUtils.parseQNameString(typeRef));
}
use of org.kie.dmn.trisotech.model.api.NamedExpression in project drools by kiegroup.
the class NamedExpressionConverter method assignChildElement.
@Override
protected void assignChildElement(Object parent, String nodeName, Object child) {
NamedExpression namedExp = (NamedExpression) parent;
if (child instanceof Expression) {
namedExp.setExpression((Expression) child);
namedExp.setName(nodeName);
} else
super.assignChildElement(parent, nodeName, child);
}
use of org.kie.dmn.trisotech.model.api.NamedExpression in project drools by kiegroup.
the class NamedExpressionConverter method writeAttributes.
@Override
protected void writeAttributes(HierarchicalStreamWriter writer, Object parent) {
super.writeAttributes(writer, parent);
NamedExpression exp = (NamedExpression) parent;
if (exp.getTypeRef() != null) {
writer.addAttribute("typeRef", MarshallingUtils.formatQName(exp.getTypeRef(), exp));
}
}
use of org.kie.dmn.trisotech.model.api.NamedExpression in project drools by kiegroup.
the class NamedExpressionConverter method writeChildren.
@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
super.writeChildren(writer, context, parent);
NamedExpression namedExp = (NamedExpression) parent;
writeChildrenNode(writer, context, namedExp.getExpression(), MarshallingUtils.defineExpressionNodeName(xstream, namedExp.getExpression()));
}
use of org.kie.dmn.trisotech.model.api.NamedExpression in project drools by kiegroup.
the class IteratorConverter method assignChildElement.
@Override
protected void assignChildElement(Object parent, String nodeName, Object child) {
Iterator filter = (Iterator) parent;
if (IN.equals(nodeName)) {
Expression expression = ((NamedExpression) child).getExpression();
if (((NamedExpression) child).getTypeRef() != null) {
expression.setTypeRef(((NamedExpression) child).getTypeRef());
}
filter.setIn(expression);
} else if (RETURN.equals(nodeName)) {
filter.setReturn(((NamedExpression) child).getExpression());
} else {
super.assignChildElement(parent, nodeName, child);
}
}
Aggregations