use of org.kie.dmn.model.api.InformationItem in project kie-wb-common by kiegroup.
the class DMNMarshallerImportsHelperStandaloneImpl method updateInformationItem.
private void updateInformationItem(final String namespace, final DRGElement drgElement) {
getInformationItem(drgElement).ifPresent(informationItem -> {
final InformationItem tInformationItem = new TInformationItem();
final QName qName = informationItem.getTypeRef();
if (qName != null && !isBuiltInType(qName.getLocalPart())) {
tInformationItem.setTypeRef(new QName(qName.getNamespaceURI(), namespace + "." + qName.getLocalPart(), qName.getPrefix()));
setInformationItem(drgElement, tInformationItem);
}
});
}
use of org.kie.dmn.model.api.InformationItem in project kie-wb-common by kiegroup.
the class InformationItemPrimaryPropertyConverterTest method testDmnFromWBWhenWBIsNull.
@Test
public void testDmnFromWBWhenWBIsNull() {
final InformationItemPrimary wb = null;
final InformationItem informationItem = InformationItemPrimaryPropertyConverter.dmnFromWB(wb, wb);
assertNull(informationItem);
}
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(fd.getExpression()));
}
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()));
}
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));
}
Aggregations