use of org.kie.dmn.model.api.RuleAnnotation in project drools by kiegroup.
the class RuleAnnotationConverter method assignChildElement.
@Override
protected void assignChildElement(Object parent, String nodeName, Object child) {
super.assignChildElement(parent, nodeName, child);
RuleAnnotation e = (RuleAnnotation) parent;
if (TEXT.equals(nodeName)) {
e.setText((String) child);
} else {
super.assignChildElement(parent, nodeName, child);
}
}
use of org.kie.dmn.model.api.RuleAnnotation in project drools by kiegroup.
the class RuleAnnotationConverter method writeChildren.
@Override
protected void writeChildren(HierarchicalStreamWriter writer, MarshallingContext context, Object parent) {
super.writeChildren(writer, context, parent);
RuleAnnotation r = (RuleAnnotation) parent;
writeChildrenNode(writer, context, r.getText(), TEXT);
}
use of org.kie.dmn.model.api.RuleAnnotation in project drools by kiegroup.
the class RuleAnnotationConverter method assignChildElement.
@Override
protected void assignChildElement(Object parent, String nodeName, Object child) {
super.assignChildElement(parent, nodeName, child);
RuleAnnotation e = (RuleAnnotation) parent;
if (TEXT.equals(nodeName)) {
e.setText((String) child);
} else {
super.assignChildElement(parent, nodeName, child);
}
}
use of org.kie.dmn.model.api.RuleAnnotation in project drools by kiegroup.
the class RuleAnnotationConverter method assignChildElement.
@Override
protected void assignChildElement(Object parent, String nodeName, Object child) {
super.assignChildElement(parent, nodeName, child);
RuleAnnotation e = (RuleAnnotation) parent;
if (TEXT.equals(nodeName)) {
e.setText((String) child);
} else {
super.assignChildElement(parent, nodeName, child);
}
}
use of org.kie.dmn.model.api.RuleAnnotation in project kie-wb-common by kiegroup.
the class RuleAnnotationClauseTextConverterTest method testDmnFromWB.
@Test
public void testDmnFromWB() {
final String text = "text";
final Text textObject = new Text(text);
when(ruleAnnotationClauseText.getText()).thenReturn(textObject);
final RuleAnnotation converted = RuleAnnotationClauseTextConverter.dmnFromWB(ruleAnnotationClauseText);
assertEquals(text, converted.getText());
}
Aggregations