Examples of GetGraphResponse


Examples of org.lab41.dendrite.web.responses.GetGraphResponse

        try {
            UserMetadata userMetadata = tx.getOrCreateUser(principal);

            for (ProjectMetadata projectMetadata : userMetadata.getProjects()) {
                for (GraphMetadata graphMetadata : projectMetadata.getGraphs()) {
                    graphs.add(new GetGraphResponse(graphMetadata));
                }
            }
        } catch (Throwable t) {
            tx.rollback();
            throw t;
View Full Code Here

Examples of org.lab41.dendrite.web.responses.GetGraphResponse

            }

            // 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

Examples of org.lab41.dendrite.web.responses.GetGraphResponse

                throw new NotFound(ProjectMetadata.class, projectId);
            }

            List<GetGraphResponse> graphs = new ArrayList<>();
            for (GraphMetadata graphMetadata : projectMetadata.getGraphs()) {
                graphs.add(new GetGraphResponse(graphMetadata));
            }

            return new GetGraphsResponse(graphs);
        } finally {
            tx.commit();
View Full Code Here

Examples of org.lab41.dendrite.web.responses.GetGraphResponse

        if (result.hasErrors()) {
            throw new BindingException(result);
        }

        MetaGraphTx tx = metaGraphService.newTransaction();
        GetGraphResponse getGraphResponse;
        HttpHeaders headers = new HttpHeaders();

        try {
            ProjectMetadata projectMetadata = tx.getProject(projectId);
            if (projectMetadata == null) {
                throw new NotFound(ProjectMetadata.class, projectId);
            }

            GraphMetadata graphMetadata = tx.createGraph(projectMetadata);
            graphMetadata.setProperties(item.getProperties());

            headers.setLocation(builder.path("/graphs/{graphId}").buildAndExpand(projectMetadata.getId()).toUri());

            getGraphResponse = new GetGraphResponse(graphMetadata);
        } catch (Throwable t) {
            tx.rollback();
            throw t;
        }
View Full Code Here

Examples of org.lab41.dendrite.web.responses.GetGraphResponse

            GraphMetadata graphMetadata = projectMetadata.getCurrentGraph();

            // 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.