All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.visallo.web.routes.edge.EdgeGetCount Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
package org.visallo.web.routes.edge;

import com.google.inject.Inject;
import com.v5analytics.webster.ParameterizedHandler;
import com.v5analytics.webster.annotations.Handle;
import org.vertexium.Authorizations;
import org.vertexium.Graph;
import org.visallo.web.clientapi.model.ClientApiVertexCount;

public class EdgeGetCount implements ParameterizedHandler {
    private final Graph graph;

    @Inject
    public EdgeGetCount(Graph graph) {
        this.graph = graph;
    }

    @Handle
    public ClientApiVertexCount handle(Authorizations authorizations) throws Exception {
        long vertexCount = graph.getEdgeCount(authorizations);
        return new ClientApiVertexCount(vertexCount);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy