Search in sources :

Example 6 with DMNElement

use of org.kie.workbench.common.dmn.api.definition.model.DMNElement in project kie-wb-common by kiegroup.

the class WrapperUtils method getImportPrefix.

private static Optional<String> getImportPrefix(final Definitions definitions, final DMNElement dmnElement) {
    if (!(dmnElement instanceof NamedElement)) {
        return Optional.empty();
    }
    final NamedElement namedElement = (NamedElement) dmnElement;
    final Optional<String> name = Optional.ofNullable(namedElement.getName().getValue());
    return definitions.getImport().stream().filter(anImport -> {
        final String importName = anImport.getName().getValue();
        return name.map(n -> n.startsWith(importName + ".")).orElse(false);
    }).map(anImport -> {
        final String importNamespace = anImport.getNamespace();
        return getNsContextsByNamespace(definitions, importNamespace);
    }).findFirst();
}
Also used : TextAnnotation(org.kie.workbench.common.dmn.api.definition.model.TextAnnotation) JSIDMNDiagram(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNDiagram) Definitions(org.kie.workbench.common.dmn.api.definition.model.Definitions) JSIDMNDecisionServiceDividerLine(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNDecisionServiceDividerLine) JSITTextAnnotation(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITTextAnnotation) RectangleDimensionsSet(org.kie.workbench.common.dmn.api.property.dimensions.RectangleDimensionsSet) JSITDecisionTable(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDecisionTable) PointUtils.upperLeftBound(org.kie.workbench.common.dmn.client.marshaller.converters.dd.PointUtils.upperLeftBound) JSIPoint(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dc.JSIPoint) JSIDMNEdge(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNEdge) IdUtils.getShapeId(org.kie.workbench.common.dmn.client.marshaller.common.IdUtils.getShapeId) JSITContext(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITContext) View(org.kie.workbench.common.stunner.core.graph.content.view.View) DMNElement(org.kie.workbench.common.dmn.api.definition.model.DMNElement) Js(jsinterop.base.Js) JSIBounds(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dc.JSIBounds) JSIName(org.kie.workbench.common.dmn.webapp.kogito.marshaller.mapper.JSIName) Map(java.util.Map) JSITDRGElement(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDRGElement) JSITList(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITList) NamedElement(org.kie.workbench.common.dmn.api.definition.model.NamedElement) XMLConstants(javax.xml.XMLConstants) JSIDMNLabel(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNLabel) JSITAttachment(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.kie.JSITAttachment) BusinessKnowledgeModel(org.kie.workbench.common.dmn.api.definition.model.BusinessKnowledgeModel) StylingSet(org.kie.workbench.common.dmn.api.property.styling.StylingSet) JSITAssociation(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITAssociation) JSITFunctionDefinition(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITFunctionDefinition) StringUtils.isEmpty(org.kie.workbench.common.stunner.core.util.StringUtils.isEmpty) PointUtils.xOfBound(org.kie.workbench.common.dmn.client.marshaller.converters.dd.PointUtils.xOfBound) PointUtils.yOfBound(org.kie.workbench.common.dmn.client.marshaller.converters.dd.PointUtils.yOfBound) InputData(org.kie.workbench.common.dmn.api.definition.model.InputData) JSIDMNShape(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNShape) JSITRelation(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITRelation) Objects(java.util.Objects) List(java.util.List) DecisionService(org.kie.workbench.common.dmn.api.definition.model.DecisionService) JsUtils(org.kie.workbench.common.dmn.webapp.kogito.marshaller.mapper.JsUtils) JSITInvocation(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInvocation) JSITLiteralExpression(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITLiteralExpression) JSIDMNStyle(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNStyle) KnowledgeSource(org.kie.workbench.common.dmn.api.definition.model.KnowledgeSource) Optional(java.util.Optional) Decision(org.kie.workbench.common.dmn.api.definition.model.Decision) JSITComponentsWidthsExtension(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.kie.JSITComponentsWidthsExtension) QName(javax.xml.namespace.QName) ColorUtils(org.kie.workbench.common.dmn.client.marshaller.converters.dd.ColorUtils) NamedElement(org.kie.workbench.common.dmn.api.definition.model.NamedElement)

Example 7 with DMNElement

use of org.kie.workbench.common.dmn.api.definition.model.DMNElement in project kie-wb-common by kiegroup.

the class WrapperUtils method getDmnElementRef.

static QName getDmnElementRef(final Definitions definitions, final View<? extends DMNElement> v, final String namespaceURI) {
    final DMNElement dmnElement = v.getDefinition();
    final String dmnElementId = dmnElement.getId().getValue();
    return getImportPrefix(definitions, dmnElement).map(prefix -> new QName(namespaceURI, prefix + ":" + dmnElementId, XMLConstants.DEFAULT_NS_PREFIX)).orElse(new QName(namespaceURI, dmnElementId, XMLConstants.DEFAULT_NS_PREFIX));
}
Also used : TextAnnotation(org.kie.workbench.common.dmn.api.definition.model.TextAnnotation) JSIDMNDiagram(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNDiagram) Definitions(org.kie.workbench.common.dmn.api.definition.model.Definitions) JSIDMNDecisionServiceDividerLine(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNDecisionServiceDividerLine) JSITTextAnnotation(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITTextAnnotation) RectangleDimensionsSet(org.kie.workbench.common.dmn.api.property.dimensions.RectangleDimensionsSet) JSITDecisionTable(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDecisionTable) PointUtils.upperLeftBound(org.kie.workbench.common.dmn.client.marshaller.converters.dd.PointUtils.upperLeftBound) JSIPoint(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dc.JSIPoint) JSIDMNEdge(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNEdge) IdUtils.getShapeId(org.kie.workbench.common.dmn.client.marshaller.common.IdUtils.getShapeId) JSITContext(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITContext) View(org.kie.workbench.common.stunner.core.graph.content.view.View) DMNElement(org.kie.workbench.common.dmn.api.definition.model.DMNElement) Js(jsinterop.base.Js) JSIBounds(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dc.JSIBounds) JSIName(org.kie.workbench.common.dmn.webapp.kogito.marshaller.mapper.JSIName) Map(java.util.Map) JSITDRGElement(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDRGElement) JSITList(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITList) NamedElement(org.kie.workbench.common.dmn.api.definition.model.NamedElement) XMLConstants(javax.xml.XMLConstants) JSIDMNLabel(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNLabel) JSITAttachment(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.kie.JSITAttachment) BusinessKnowledgeModel(org.kie.workbench.common.dmn.api.definition.model.BusinessKnowledgeModel) StylingSet(org.kie.workbench.common.dmn.api.property.styling.StylingSet) JSITAssociation(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITAssociation) JSITFunctionDefinition(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITFunctionDefinition) StringUtils.isEmpty(org.kie.workbench.common.stunner.core.util.StringUtils.isEmpty) PointUtils.xOfBound(org.kie.workbench.common.dmn.client.marshaller.converters.dd.PointUtils.xOfBound) PointUtils.yOfBound(org.kie.workbench.common.dmn.client.marshaller.converters.dd.PointUtils.yOfBound) InputData(org.kie.workbench.common.dmn.api.definition.model.InputData) JSIDMNShape(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNShape) JSITRelation(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITRelation) Objects(java.util.Objects) List(java.util.List) DecisionService(org.kie.workbench.common.dmn.api.definition.model.DecisionService) JsUtils(org.kie.workbench.common.dmn.webapp.kogito.marshaller.mapper.JsUtils) JSITInvocation(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInvocation) JSITLiteralExpression(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITLiteralExpression) JSIDMNStyle(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNStyle) KnowledgeSource(org.kie.workbench.common.dmn.api.definition.model.KnowledgeSource) Optional(java.util.Optional) Decision(org.kie.workbench.common.dmn.api.definition.model.Decision) JSITComponentsWidthsExtension(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.kie.JSITComponentsWidthsExtension) QName(javax.xml.namespace.QName) ColorUtils(org.kie.workbench.common.dmn.client.marshaller.converters.dd.ColorUtils) QName(javax.xml.namespace.QName) DMNElement(org.kie.workbench.common.dmn.api.definition.model.DMNElement)

Example 8 with DMNElement

use of org.kie.workbench.common.dmn.api.definition.model.DMNElement in project kie-wb-common by kiegroup.

the class ObserverBuilderControlTest method testUpdateIdFromDefinition.

@Test
public void testUpdateIdFromDefinition() {
    final String expectedId = "happyId";
    final Element element = mock(Element.class);
    final View elementContent = mock(View.class);
    final DMNElement newDefinition = mock(DMNElement.class);
    final Id newDefinitionId = mock(Id.class);
    final DMNElement definition = mock(DMNElement.class);
    final Id definitionId = mock(Id.class);
    when(element.getContent()).thenReturn(elementContent);
    when(elementContent.getDefinition()).thenReturn(newDefinition);
    when(newDefinition.getId()).thenReturn(newDefinitionId);
    when(definition.getId()).thenReturn(definitionId);
    when(definitionId.getValue()).thenReturn(expectedId);
    observerBuilderControl.updateElementFromDefinition(element, definition);
    verify(newDefinitionId).setValue(expectedId);
}
Also used : DMNElement(org.kie.workbench.common.dmn.api.definition.model.DMNElement) Element(org.kie.workbench.common.stunner.core.graph.Element) DRGElement(org.kie.workbench.common.dmn.api.definition.model.DRGElement) DMNDiagramElement(org.kie.workbench.common.dmn.api.definition.model.DMNDiagramElement) DMNElement(org.kie.workbench.common.dmn.api.definition.model.DMNElement) Id(org.kie.workbench.common.dmn.api.property.dmn.Id) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Test(org.junit.Test)

Example 9 with DMNElement

use of org.kie.workbench.common.dmn.api.definition.model.DMNElement in project kie-wb-common by kiegroup.

the class ObserverBuilderControl method updateElementFromDefinition.

@Override
@SuppressWarnings("unchecked")
protected void updateElementFromDefinition(final Element element, final Object definition) {
    final Object content = element.getContent();
    if (!(content instanceof View)) {
        return;
    }
    final Object newDefinition = ((View) content).getDefinition();
    if (newDefinition instanceof HasName && definition instanceof HasName) {
        ((HasName) newDefinition).getName().setValue(((HasName) definition).getName().getValue());
    }
    if (newDefinition instanceof DynamicReadOnly && definition instanceof DynamicReadOnly) {
        ((DynamicReadOnly) newDefinition).setAllowOnlyVisualChange(((DynamicReadOnly) definition).isAllowOnlyVisualChange());
    }
    if (newDefinition instanceof HasVariable && definition instanceof HasVariable) {
        ((HasVariable) newDefinition).setVariable(((HasVariable) definition).getVariable());
    }
    if (newDefinition instanceof BusinessKnowledgeModel && definition instanceof BusinessKnowledgeModel) {
        ((BusinessKnowledgeModel) newDefinition).setEncapsulatedLogic(((BusinessKnowledgeModel) definition).getEncapsulatedLogic());
    }
    if (newDefinition instanceof HasExpression && definition instanceof HasExpression) {
        ((HasExpression) newDefinition).setExpression(((HasExpression) definition).getExpression());
    }
    if (newDefinition instanceof DMNElement && definition instanceof DMNElement) {
        final DMNElement dmnElement = (DMNElement) definition;
        if (!StringUtils.isEmpty(dmnElement.getId().getValue())) {
            ((DMNElement) newDefinition).getId().setValue(dmnElement.getId().getValue());
        }
    }
    final Optional<DMNDiagramElement> currentDMNDiagramElement = getDMNDiagramsSession().getCurrentDMNDiagramElement();
    if (currentDMNDiagramElement.isPresent() && newDefinition instanceof HasContentDefinitionId) {
        ((HasContentDefinitionId) newDefinition).setDiagramId(currentDMNDiagramElement.get().getId().getValue());
    }
}
Also used : DynamicReadOnly(org.kie.workbench.common.forms.adf.definitions.DynamicReadOnly) HasExpression(org.kie.workbench.common.dmn.api.definition.HasExpression) HasContentDefinitionId(org.kie.workbench.common.stunner.core.graph.content.HasContentDefinitionId) HasName(org.kie.workbench.common.dmn.api.definition.HasName) HasVariable(org.kie.workbench.common.dmn.api.definition.HasVariable) BusinessKnowledgeModel(org.kie.workbench.common.dmn.api.definition.model.BusinessKnowledgeModel) DMNElement(org.kie.workbench.common.dmn.api.definition.model.DMNElement) DMNDiagramElement(org.kie.workbench.common.dmn.api.definition.model.DMNDiagramElement) View(org.kie.workbench.common.stunner.core.graph.content.view.View)

Example 10 with DMNElement

use of org.kie.workbench.common.dmn.api.definition.model.DMNElement in project kie-wb-common by kiegroup.

the class DMNMarshaller method marshall.

public JSITDefinitions marshall() {
    final Map<String, JSITDRGElement> nodes = new HashMap<>();
    final Map<String, JSITTextAnnotation> textAnnotations = new HashMap<>();
    final Node<View<DMNDiagram>, ?> dmnDiagramRoot = (Node<View<DMNDiagram>, ?>) DMNGraphUtils.findDMNDiagramRoot(dmnDiagramsSession.getDRGDiagram().getGraph());
    final Definitions definitionsStunnerPojo = ((DMNDiagram) getElementDefinition(dmnDiagramRoot)).getDefinitions();
    final List<String> dmnDiagramElementIds = new ArrayList<>();
    final JSITDefinitions definitions = DefinitionsConverter.dmnFromWB(definitionsStunnerPojo, true);
    if (Objects.isNull(definitions.getExtensionElements())) {
        JSITDMNElement.JSIExtensionElements jsiExtensionElements = new JSITDMNElement.JSIExtensionElements();
        definitions.setExtensionElements(jsiExtensionElements);
    }
    final JsArrayLike<JSIDMNDiagram> dmnDiagrams = definitions.getDMNDI().getNativeDMNDiagram();
    for (int i = 0; i < dmnDiagrams.getLength(); i++) {
        JSIDMNDiagram diagram = Js.uncheckedCast(dmnDiagrams.getAt(i));
        final String elementDiagramId = diagram.getId();
        final List<JSIDMNEdge> dmnEdges = new ArrayList<>();
        final List<Node> diagramNodes = getNodeStream(dmnDiagramsSession.getDiagram(elementDiagramId));
        // Setup callback for marshalling ComponentWidths
        if (Objects.isNull(diagram.getExtension())) {
            diagram.setExtension(new JSIDiagramElement.JSIExtension());
        }
        final JSITComponentsWidthsExtension componentsWidthsExtension = new JSITComponentsWidthsExtension();
        final JSIDiagramElement.JSIExtension extension = diagram.getExtension();
        JSITComponentsWidthsExtension wrappedComponentsWidthsExtension = WrapperUtils.getWrappedJSITComponentsWidthsExtension(componentsWidthsExtension);
        extension.addAny(wrappedComponentsWidthsExtension);
        final Consumer<JSITComponentWidths> componentWidthsConsumer = (cw) -> componentsWidthsExtension.addComponentWidths(cw);
        // Convert relative positioning to absolute
        for (final Node<?, ?> node : diagramNodes) {
            PointUtils.convertToAbsoluteBounds(node);
        }
        // Iterate Graph processing nodes..
        for (final Node<?, ?> node : diagramNodes) {
            if (!(node.getContent() instanceof View<?>)) {
                continue;
            }
            final View<?> view = (View<?>) node.getContent();
            final Object viewDefinition = view.getDefinition();
            if (!(viewDefinition instanceof HasContentDefinitionId)) {
                continue;
            }
            final HasContentDefinitionId hasContentDefinitionId = (HasContentDefinitionId) viewDefinition;
            final String nodeDiagramId = hasContentDefinitionId.getDiagramId();
            if (!Objects.equals(nodeDiagramId, elementDiagramId)) {
                continue;
            }
            if (viewDefinition instanceof DRGElement) {
                final DRGElement drgElement = (DRGElement) viewDefinition;
                if (!drgElement.isAllowOnlyVisualChange()) {
                    if (nodes.containsKey(drgElement.getId().getValue())) {
                        final JSITDRGElement currentValue = nodes.get(drgElement.getId().getValue());
                        mergeNodeRequirements(stunnerToDMN(withIncludedModels(node, definitionsStunnerPojo), componentWidthsConsumer), currentValue);
                    } else {
                        nodes.put(drgElement.getId().getValue(), stunnerToDMN(withIncludedModels(node, definitionsStunnerPojo), componentWidthsConsumer));
                    }
                }
                final String namespaceURI = definitionsStunnerPojo.getDefaultNamespace();
                diagram.addDMNDiagramElement(WrapperUtils.getWrappedJSIDMNShape(diagram, dmnDiagramElementIds, definitionsStunnerPojo, (View<? extends DMNElement>) view, namespaceURI));
            }
            if (viewDefinition instanceof TextAnnotation) {
                final TextAnnotation textAnnotation = (TextAnnotation) viewDefinition;
                if (!textAnnotation.isAllowOnlyVisualChange()) {
                    textAnnotations.put(textAnnotation.getId().getValue(), textAnnotationConverter.dmnFromNode((Node<View<TextAnnotation>, ?>) node, componentWidthsConsumer));
                }
                final String namespaceURI = definitionsStunnerPojo.getDefaultNamespace();
                diagram.addDMNDiagramElement(WrapperUtils.getWrappedJSIDMNShape(diagram, dmnDiagramElementIds, definitionsStunnerPojo, (View<? extends DMNElement>) view, namespaceURI));
                final List<JSITAssociation> associations = AssociationConverter.dmnFromWB((Node<View<TextAnnotation>, ?>) node);
                forEach(associations, association -> {
                    final JSITAssociation wrappedJSITAssociation = WrapperUtils.getWrappedJSITAssociation(Js.uncheckedCast(association));
                    definitions.addArtifact(wrappedJSITAssociation);
                });
            }
            connect(diagram, dmnDiagramElementIds, definitionsStunnerPojo, dmnEdges, node, view);
        }
        nodes.values().forEach(node -> {
            addNodeToDefinitionsIfNotPresent(node, definitions);
        });
        textAnnotations.values().forEach(text -> {
            final boolean exists = anyMatch(definitions.getArtifact(), artifact -> Objects.equals(artifact.getId(), text.getId()));
            if (!exists) {
                definitions.addArtifact(WrapperUtils.getWrappedJSITTextAnnotation(text));
            }
        });
        forEach(dmnEdges, dmnEdge -> {
            final boolean exists = anyMatch(diagram.getDMNDiagramElement(), diagramElement -> {
                if (JSIDMNEdge.instanceOf(diagramElement)) {
                    final JSIDMNEdge jsidmnEdge = Js.uncheckedCast(diagramElement);
                    return Objects.equals(jsidmnEdge.getDmnElementRef(), dmnEdge.getDmnElementRef());
                }
                return false;
            });
            if (!exists) {
                diagram.addDMNDiagramElement(WrapperUtils.getWrappedJSIDMNEdge(Js.uncheckedCast(dmnEdge)));
            }
        });
        // Convert absolute positioning to relative
        for (final Node<?, ?> node : diagramNodes) {
            PointUtils.convertToRelativeBounds(node);
        }
    }
    ;
    return definitions;
}
Also used : TextAnnotation(org.kie.workbench.common.dmn.api.definition.model.TextAnnotation) JSIDMNDiagram(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNDiagram) Definitions(org.kie.workbench.common.dmn.api.definition.model.Definitions) KnowledgeSourceConverter(org.kie.workbench.common.dmn.client.marshaller.converters.KnowledgeSourceConverter) JsInteropUtils.anyMatch(org.kie.workbench.common.dmn.client.marshaller.common.JsInteropUtils.anyMatch) JSITDMNElement(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDMNElement) JSITTextAnnotation(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITTextAnnotation) Edge(org.kie.workbench.common.stunner.core.graph.Edge) PointUtils.upperLeftBound(org.kie.workbench.common.dmn.client.marshaller.converters.dd.PointUtils.upperLeftBound) JSITDecision(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDecision) JSIDMNEdge(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNEdge) Import(org.kie.workbench.common.dmn.api.definition.model.Import) DMNElement(org.kie.workbench.common.dmn.api.definition.model.DMNElement) Map(java.util.Map) FactoryManager(org.kie.workbench.common.stunner.core.api.FactoryManager) Diagram(org.kie.workbench.common.stunner.core.diagram.Diagram) IdUtils.getEdgeId(org.kie.workbench.common.dmn.client.marshaller.common.IdUtils.getEdgeId) Point2D(org.kie.workbench.common.stunner.core.graph.content.view.Point2D) BusinessKnowledgeModel(org.kie.workbench.common.dmn.api.definition.model.BusinessKnowledgeModel) DecisionServiceConverter(org.kie.workbench.common.dmn.client.marshaller.converters.DecisionServiceConverter) PointUtils.yOfBound(org.kie.workbench.common.dmn.client.marshaller.converters.dd.PointUtils.yOfBound) DMNDiagram(org.kie.workbench.common.dmn.api.definition.model.DMNDiagram) Collectors(java.util.stream.Collectors) JSITComponentWidths(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.kie.JSITComponentWidths) Objects(java.util.Objects) DRGElement(org.kie.workbench.common.dmn.api.definition.model.DRGElement) JSITDecisionService(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDecisionService) TextAnnotationConverter(org.kie.workbench.common.dmn.client.marshaller.converters.TextAnnotationConverter) List(java.util.List) Stream(java.util.stream.Stream) DMNDiagramsSession(org.kie.workbench.common.dmn.client.docks.navigator.drds.DMNDiagramsSession) BusinessKnowledgeModelConverter(org.kie.workbench.common.dmn.client.marshaller.converters.BusinessKnowledgeModelConverter) DMNGraphUtils(org.kie.workbench.common.dmn.client.marshaller.common.DMNGraphUtils) PostConstruct(javax.annotation.PostConstruct) DefinitionUtils.getElementDefinition(org.kie.workbench.common.stunner.core.util.DefinitionUtils.getElementDefinition) Optional(java.util.Optional) JSITBusinessKnowledgeModel(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITBusinessKnowledgeModel) ApplicationScoped(javax.enterprise.context.ApplicationScoped) JSITKnowledgeSource(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITKnowledgeSource) QName(javax.xml.namespace.QName) Node(org.kie.workbench.common.stunner.core.graph.Node) JSIDiagramElement(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.di.JSIDiagramElement) ControlPoint(org.kie.workbench.common.stunner.core.graph.content.view.ControlPoint) AssociationConverter(org.kie.workbench.common.dmn.client.marshaller.converters.AssociationConverter) InputDataConverter(org.kie.workbench.common.dmn.client.marshaller.converters.InputDataConverter) JSITInputData(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITInputData) HashMap(java.util.HashMap) HasContentDefinitionId(org.kie.workbench.common.stunner.core.graph.content.HasContentDefinitionId) View(org.kie.workbench.common.stunner.core.graph.content.view.View) ArrayList(java.util.ArrayList) WrapperUtils(org.kie.workbench.common.dmn.client.marshaller.common.WrapperUtils) Inject(javax.inject.Inject) Js(jsinterop.base.Js) JsArrayLike(jsinterop.base.JsArrayLike) IdUtils.getRawId(org.kie.workbench.common.dmn.client.marshaller.common.IdUtils.getRawId) StreamSupport(java.util.stream.StreamSupport) JSITDRGElement(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDRGElement) DMNViewDefinition(org.kie.workbench.common.dmn.api.definition.DMNViewDefinition) XMLConstants(javax.xml.XMLConstants) JSITDefinitions(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDefinitions) MainJs(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.MainJs) JSITAssociation(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITAssociation) DefinitionsConverter(org.kie.workbench.common.dmn.client.marshaller.converters.DefinitionsConverter) PointUtils.xOfBound(org.kie.workbench.common.dmn.client.marshaller.converters.dd.PointUtils.xOfBound) PointUtils(org.kie.workbench.common.dmn.client.marshaller.converters.dd.PointUtils) InputData(org.kie.workbench.common.dmn.api.definition.model.InputData) DecisionConverter(org.kie.workbench.common.dmn.client.marshaller.converters.DecisionConverter) ViewConnector(org.kie.workbench.common.stunner.core.graph.content.view.ViewConnector) Association(org.kie.workbench.common.dmn.api.definition.model.Association) Consumer(java.util.function.Consumer) DMNModelInstrumentedBase(org.kie.workbench.common.dmn.api.definition.model.DMNModelInstrumentedBase) DecisionService(org.kie.workbench.common.dmn.api.definition.model.DecisionService) Graph(org.kie.workbench.common.stunner.core.graph.Graph) KnowledgeSource(org.kie.workbench.common.dmn.api.definition.model.KnowledgeSource) Decision(org.kie.workbench.common.dmn.api.definition.model.Decision) JSITComponentsWidthsExtension(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.kie.JSITComponentsWidthsExtension) JsInteropUtils.forEach(org.kie.workbench.common.dmn.client.marshaller.common.JsInteropUtils.forEach) DiscreteConnection(org.kie.workbench.common.stunner.core.graph.content.view.DiscreteConnection) HasContentDefinitionId(org.kie.workbench.common.stunner.core.graph.content.HasContentDefinitionId) JSITComponentsWidthsExtension(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.kie.JSITComponentsWidthsExtension) JSITAssociation(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITAssociation) HashMap(java.util.HashMap) JSITTextAnnotation(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITTextAnnotation) Node(org.kie.workbench.common.stunner.core.graph.Node) ArrayList(java.util.ArrayList) JSITDMNElement(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDMNElement) JSITDMNElement(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDMNElement) DMNElement(org.kie.workbench.common.dmn.api.definition.model.DMNElement) TextAnnotation(org.kie.workbench.common.dmn.api.definition.model.TextAnnotation) JSITTextAnnotation(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITTextAnnotation) JSITComponentWidths(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.kie.JSITComponentWidths) JSIDMNDiagram(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNDiagram) DMNDiagram(org.kie.workbench.common.dmn.api.definition.model.DMNDiagram) JSIDiagramElement(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.di.JSIDiagramElement) Definitions(org.kie.workbench.common.dmn.api.definition.model.Definitions) JSITDefinitions(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDefinitions) View(org.kie.workbench.common.stunner.core.graph.content.view.View) ControlPoint(org.kie.workbench.common.stunner.core.graph.content.view.ControlPoint) JSITDefinitions(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDefinitions) JSIDMNDiagram(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNDiagram) JSITDRGElement(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDRGElement) JSIDMNEdge(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmndi12.JSIDMNEdge) DRGElement(org.kie.workbench.common.dmn.api.definition.model.DRGElement) JSITDRGElement(org.kie.workbench.common.dmn.webapp.kogito.marshaller.js.model.dmn12.JSITDRGElement)

Aggregations

DMNElement (org.kie.workbench.common.dmn.api.definition.model.DMNElement)12 View (org.kie.workbench.common.stunner.core.graph.content.view.View)11 BusinessKnowledgeModel (org.kie.workbench.common.dmn.api.definition.model.BusinessKnowledgeModel)8 Decision (org.kie.workbench.common.dmn.api.definition.model.Decision)7 DecisionService (org.kie.workbench.common.dmn.api.definition.model.DecisionService)7 InputData (org.kie.workbench.common.dmn.api.definition.model.InputData)7 KnowledgeSource (org.kie.workbench.common.dmn.api.definition.model.KnowledgeSource)7 TextAnnotation (org.kie.workbench.common.dmn.api.definition.model.TextAnnotation)7 List (java.util.List)6 Map (java.util.Map)6 Objects (java.util.Objects)6 Optional (java.util.Optional)6 QName (javax.xml.namespace.QName)6 Definitions (org.kie.workbench.common.dmn.api.definition.model.Definitions)6 DRGElement (org.kie.workbench.common.dmn.api.definition.model.DRGElement)5 NamedElement (org.kie.workbench.common.dmn.api.definition.model.NamedElement)5 RectangleDimensionsSet (org.kie.workbench.common.dmn.api.property.dimensions.RectangleDimensionsSet)5 Id (org.kie.workbench.common.dmn.api.property.dmn.Id)5 StylingSet (org.kie.workbench.common.dmn.api.property.styling.StylingSet)5 Node (org.kie.workbench.common.stunner.core.graph.Node)5