Search in sources :

Example 6 with ProjectDiagramImpl

use of org.kie.workbench.common.stunner.project.diagram.impl.ProjectDiagramImpl in project kie-wb-common by kiegroup.

the class DMNClientProjectDiagramService method asProjectDiagramImpl.

ProjectDiagramImpl asProjectDiagramImpl(final Diagram diagram, final DMNContentResource resource) {
    final String name = removeExtension(diagram.getName());
    final Graph graph = diagram.getGraph();
    final ProjectMetadata metadata = (ProjectMetadata) resource.getMetadata();
    return new ProjectDiagramImpl(name, graph, metadata);
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) ProjectMetadata(org.kie.workbench.common.stunner.project.diagram.ProjectMetadata) ProjectDiagramImpl(org.kie.workbench.common.stunner.project.diagram.impl.ProjectDiagramImpl)

Aggregations

ProjectDiagramImpl (org.kie.workbench.common.stunner.project.diagram.impl.ProjectDiagramImpl)6 Test (org.junit.Test)4 Graph (org.kie.workbench.common.stunner.core.graph.Graph)3 ProjectMetadata (org.kie.workbench.common.stunner.project.diagram.ProjectMetadata)3 Metadata (org.guvnor.common.services.shared.metadata.model.Metadata)2 DMNContentResource (org.kie.workbench.common.dmn.api.DMNContentResource)2 Diagram (org.kie.workbench.common.stunner.core.diagram.Diagram)2 ProjectDiagram (org.kie.workbench.common.stunner.project.diagram.ProjectDiagram)2 Path (org.uberfire.backend.vfs.Path)2 Before (org.junit.Before)1 GraphNodeStoreImpl (org.kie.workbench.common.stunner.core.graph.store.GraphNodeStoreImpl)1