Search in sources :

Example 1 with NamedElement

use of org.kie.dmn.model.api.NamedElement in project drools by kiegroup.

the class NamedElementConverter method writeAttributes.

@Override
protected void writeAttributes(HierarchicalStreamWriter writer, Object parent) {
    super.writeAttributes(writer, parent);
    NamedElement ne = (NamedElement) parent;
    writer.addAttribute(NAME, ne.getName());
}
Also used : NamedElement(org.kie.dmn.model.api.NamedElement)

Example 2 with NamedElement

use of org.kie.dmn.model.api.NamedElement in project kie-wb-common by kiegroup.

the class InformationItemPrimaryPropertyConverter method getParentName.

static String getParentName(final org.kie.dmn.model.api.DMNModelInstrumentedBase parent) {
    if (parent instanceof NamedElement) {
        final NamedElement namedElement = (NamedElement) parent;
        final Optional<String> name = Optional.ofNullable(namedElement.getName());
        return name.orElse(DEFAULT_NAME);
    }
    return DEFAULT_NAME;
}
Also used : NamedElement(org.kie.dmn.model.api.NamedElement)

Aggregations

NamedElement (org.kie.dmn.model.api.NamedElement)2