Package org.lab41.dendrite.services.analysis.jung

Examples of org.lab41.dendrite.services.analysis.jung.EigenvectorCentralityService


    MetaGraphService metaGraphService;

    protected void setJobName(JobMetadata.Id jobId, String name) {
        MetaGraphTx tx = metaGraphService.newTransaction();
        try {
            JobMetadata jobMetadata = tx.getJob(jobId);
            jobMetadata.setName(name);
            tx.commit();
        } catch (TitanException e) {
            logger.debug("exception", e);
            throw e;
        }
View Full Code Here


    }

    protected void setJobState(JobMetadata.Id jobId, String state, String msg) {
        MetaGraphTx tx = metaGraphService.newTransaction();
        try {
            JobMetadata jobMetadata = tx.getJob(jobId);
            jobMetadata.setState(state);
            jobMetadata.setMessage(msg);

            if (state.equals(JobMetadata.DONE)) {
                jobMetadata.setProgress(1.0f);
            }

            tx.commit();
        } catch (TitanException e) {
            logger.debug("exception", e);
View Full Code Here

    }

    protected void setJobProgress(JobMetadata.Id jobId, float progress) {
        MetaGraphTx tx = metaGraphService.newTransaction();
        try {
            JobMetadata jobMetadata = tx.getJob(jobId);
            jobMetadata.setProgress(progress);
            tx.commit();
        } catch (TitanException e) {
            logger.debug("exception", e);
            throw e;
        }
View Full Code Here

    }

    protected void setJobName(JobMetadata.Id jobId, String name) {
        MetaGraphTx tx = metaGraph.newTransaction();
        try {
            JobMetadata jobMetadata = tx.getJob(jobId);
            jobMetadata.setName(name);
            tx.commit();
        } catch (TitanException e) {
            logger.debug("exception", e);
            throw e;
        }
View Full Code Here

    }

    protected void setJobState(JobMetadata.Id jobId, String state, String msg) {
        MetaGraphTx tx = metaGraph.newTransaction();
        try {
            JobMetadata jobMetadata = tx.getJob(jobId);
            jobMetadata.setState(state);
            jobMetadata.setMessage(msg);

            if (state.equals(JobMetadata.DONE)) {
                jobMetadata.setProgress(1.0f);
            }

            tx.commit();
        } catch (TitanException e) {
            logger.debug("exception", e);
View Full Code Here

    }

    protected void setJobProgress(JobMetadata.Id jobId, float progress) {
        MetaGraphTx tx = metaGraph.newTransaction();
        try {
            JobMetadata jobMetadata = tx.getJob(jobId);
            jobMetadata.setProgress(progress);
            tx.commit();
        } catch (TitanException e) {
            logger.debug("exception", e);
            throw e;
        }
View Full Code Here

    public GetJobsResponse getJobs(@PathVariable String projectId) throws NotFound {

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

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

            List<GetJobResponse> jobs = new ArrayList<>();
            for (JobMetadata jobMetadata : project.getJobs()) {
                jobs.add(new GetJobResponse(jobMetadata));
            }

            return new GetJobsResponse(jobs);
        } finally {
View Full Code Here

            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

            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

            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

TOP

Related Classes of org.lab41.dendrite.services.analysis.jung.EigenvectorCentralityService

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.