Package org.lab41.dendrite.metagraph

Examples of org.lab41.dendrite.metagraph.NotFound


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

            // FIXME: Temporary hack to force loading the graph until the UI can handle it occurring asynchronously.
            metaGraphService.getDendriteGraph(projectMetadata.getCurrentGraph().getId());
View Full Code Here


        HttpHeaders headers = new HttpHeaders();

        try {
            UserMetadata userMetadata = tx.getOrCreateUser(principal);
            if (userMetadata == null) {
                throw new NotFound(UserMetadata.class, principal.getName());
            }

            ProjectMetadata projectMetadata = tx.createProject(name, userMetadata, createGraph);

            headers.setLocation(builder.path("/projects/{projectId}").buildAndExpand(projectMetadata.getId()).toUri());
View Full Code Here

        MetaGraphTx tx = metaGraphService.newTransaction();

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

            tx.deleteProject(projectMetadata);
        } catch (Throwable t) {
            tx.rollback();
View Full Code Here

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

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

            List<GetUserResponse> users = new ArrayList<>();

            for (UserMetadata userMetadata : projectMetadata.getUsers()) {
View Full Code Here

        MetaGraphTx tx = metaGraphService.newTransaction();

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

            UserMetadata otherUserMetadata = tx.getUserByName(item.getName());
            if (otherUserMetadata == null) {
                throw new NotFound(UserMetadata.class);
            }

            projectMetadata.addUser(otherUserMetadata);
        } catch (Throwable t) {
            tx.rollback();
View Full Code Here

        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());
View Full Code Here

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

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

            DendriteGraph graph = metaGraphService.getDendriteGraph(graphId);

            DendriteGraphTx dendriteGraphTx = graph.buildTransaction().readOnly().start();
View Full Code Here

        MetaGraphTx tx = metaGraphService.newTransaction();

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

            try {
                tx.deleteGraph(graphMetadata);
            } catch (Exception e) {
View Full Code Here

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

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

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

        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());
View Full Code Here

TOP

Related Classes of org.lab41.dendrite.metagraph.NotFound

Copyright © 2018 www.massapicom. 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.