use of org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITNamedElement in project kie-wb-common by kiegroup.
the class NodeEntry method getName.
public String getName() {
if (name == null) {
final String type = dmnElement.getTYPE_NAME();
switch(type) {
case JSITBusinessKnowledgeModel.TYPE:
case JSITDecision.TYPE:
case JSITDecisionService.TYPE:
case JSITInputData.TYPE:
case JSITKnowledgeSource.TYPE:
final JSITNamedElement drgElement = Js.uncheckedCast(dmnElement);
name = drgElement.getName();
break;
case JSITTextAnnotation.TYPE:
final JSITTextAnnotation textAnnotation = Js.uncheckedCast(dmnElement);
name = textAnnotation.getText();
break;
}
}
return name;
}
use of org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITNamedElement in project kie-wb-common by kiegroup.
the class InformationItemPrimaryPropertyConverter method getParentName.
private static String getParentName(final Object parent) {
if (JSITNamedElement.instanceOf(parent)) {
final JSITNamedElement namedElement = (JSITNamedElement) parent;
final Optional<String> name = Optional.ofNullable(namedElement.getName());
return name.orElse(DEFAULT_NAME);
}
return DEFAULT_NAME;
}
Aggregations