Examples of GraphMetadata


Examples of org.lab41.dendrite.metagraph.models.GraphMetadata

            return new ResponseEntity<>(response, HttpStatus.NOT_FOUND);
        }

        MetaGraphTx tx = metaGraphService.newTransaction();

        GraphMetadata graphMetadata = tx.getGraph(graphId);
        if (graphMetadata == null) {
            response.put("status", "error");
            response.put("msg", "missing graph metadata '" + graphId + "'");
            tx.rollback();
            return new ResponseEntity<>(response, HttpStatus.NOT_FOUND);
        }

        ProjectMetadata projectMetadata = graphMetadata.getProject();
        if (projectMetadata == null) {
            response.put("status", "error");
            response.put("msg", "missing project metadata for graph '" + graphId + "'");
            tx.rollback();
            return new ResponseEntity<>(response, HttpStatus.NOT_FOUND);
View Full Code Here

Examples of org.lab41.dendrite.metagraph.models.GraphMetadata

            return new ResponseEntity<>(response, HttpStatus.NOT_FOUND);
        }

        MetaGraphTx tx = metaGraphService.newTransaction();

        GraphMetadata graphMetadata = tx.getGraph(graphId);
        if (graphMetadata == null) {
            response.put("status", "error");
            response.put("msg", "missing graph metadata '" + graphId + "'");
            tx.rollback();
            return new ResponseEntity<>(response, HttpStatus.NOT_FOUND);
        }

        ProjectMetadata projectMetadata = graphMetadata.getProject();
        if (projectMetadata == null) {
            response.put("status", "error");
            response.put("msg", "missing project metadata for graph '" + graphId + "'");
            tx.rollback();
            return new ResponseEntity<>(response, HttpStatus.NOT_FOUND);
View Full Code Here

Examples of org.lab41.dendrite.metagraph.models.GraphMetadata

            return new ResponseEntity<>(response, HttpStatus.NOT_FOUND);
        }

        MetaGraphTx tx = metaGraphService.newTransaction();

        GraphMetadata graphMetadata = tx.getGraph(graphId);
        if (graphMetadata == null) {
            response.put("status", "error");
            response.put("msg", "missing graph metadata '" + graphId + "'");
            tx.rollback();
            return new ResponseEntity<>(response, HttpStatus.NOT_FOUND);
        }

        ProjectMetadata projectMetadata = graphMetadata.getProject();
        if (projectMetadata == null) {
            response.put("status", "error");
            response.put("msg", "missing project metadata for graph '" + graphId + "'");
            tx.rollback();
            return new ResponseEntity<>(response, HttpStatus.NOT_FOUND);
View Full Code Here

Examples of org.lab41.dendrite.metagraph.models.GraphMetadata

        Assert.assertNotNull(userMetadata);

        ProjectMetadata projectMetadata = tx.createProject("test", userMetadata);
        Assert.assertNotNull(projectMetadata);

        GraphMetadata graphMetadata = projectMetadata.getCurrentGraph();
        Assert.assertNotNull(graphMetadata);

        tx.commit();

        DendriteGraph graph = metaGraph.getGraph(graphMetadata.getId());
        Assert.assertNotNull(graph);
    }
View Full Code Here

Examples of org.lab41.dendrite.metagraph.models.GraphMetadata

        Assert.assertEquals(branchMetadata.getName(), "master");
        Assert.assertEquals(branchMetadata.getProject(), projectMetadata);
        Assert.assertThat(projectMetadata.getBranches(), hasItem(branchMetadata));

        // Make sure the graph is linked to the project.
        GraphMetadata graphMetadata = branchMetadata.getGraph();
        Assert.assertNotNull(graphMetadata);
        Assert.assertEquals(graphMetadata.getProject(), projectMetadata);
        Assert.assertThat(projectMetadata.getGraphs(), hasItem(graphMetadata));

        // Make sure the graph links are empty.
        Assert.assertNull(graphMetadata.getParentGraph());
        Assert.assertEquals(graphMetadata.getChildGraphs().iterator().hasNext(), false);
    }
View Full Code Here

Examples of org.lab41.dendrite.metagraph.models.GraphMetadata

        super.setUp();

        MetaGraphTx tx = metaGraph.newTransaction();
        UserMetadata userMetadata = tx.createUser("test");
        ProjectMetadata projectMetadata = tx.createProject("test", userMetadata);
        GraphMetadata graphMetadata = projectMetadata.getCurrentGraph();
        tx.commit();

        graph = metaGraph.getGraph(graphMetadata.getId());
    }
View Full Code Here

Examples of org.lab41.dendrite.metagraph.models.GraphMetadata

        ProjectMetadata projectMetadata = branchMetadata.getProject();
        if (projectMetadata != null) {
            this.projectId = branchMetadata.getProject().getId().toString();
        }

        GraphMetadata graphMetadata = branchMetadata.getGraph();
        if (graphMetadata != null) {
            this.graphId = branchMetadata.getGraph().getId().toString();
        }

        if (jobMetadata != null) {
View Full Code Here

Examples of org.lab41.dendrite.metagraph.models.GraphMetadata

        BranchMetadata branchMetadata = projectMetadata.getCurrentBranch();
        if (branchMetadata != null) {
            current_branch = branchMetadata.getId().toString();

            GraphMetadata graphMetadata = branchMetadata.getGraph();
            if (graphMetadata != null) {
                this.current_graph = graphMetadata.getId().toString();
            }
        }
    }
View Full Code Here

Examples of org.lab41.dendrite.metagraph.models.GraphMetadata

        ProjectMetadata projectMetadata = graphMetadata.getProject();
        if (projectMetadata != null) {
            this.projectId = projectMetadata.getId().toString();
        }

        GraphMetadata parentGraphMetadata = graphMetadata.getParentGraph();
        if (parentGraphMetadata != null) {
            this.parentGraphId = parentGraphMetadata.getId().toString();
        }
    }
View Full Code Here

Examples of org.lab41.dendrite.metagraph.models.GraphMetadata

    public GetGraphResponse getGraph(@PathVariable String graphId) throws NotFound {

        MetaGraphTx tx = metaGraphService.buildTransaction().readOnly().start();

        try {
            GraphMetadata graphMetadata = tx.getGraph(graphId);
            if (graphMetadata == null) {
                throw new NotFound(GraphMetadata.class, graphId);
            }

            // FIXME: Temporary hack to force loading the graph until the UI can handle it occurring asynchronously.
            metaGraphService.getDendriteGraph(graphMetadata.getId());

            return new GetGraphResponse(graphMetadata);
        } finally {
            tx.commit();
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.