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

org.visallo.web.routes.vertex.VertexGetCount Maven / Gradle / Ivy

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

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 VertexGetCount implements ParameterizedHandler {
    private final Graph graph;

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy