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

test.RestGraphProvider Maven / Gradle / Ivy

There is a newer version: 0.2.1
Show newest version
package test;

import com.mashape.unirest.http.Unirest;
import org.apache.commons.configuration.Configuration;
import org.apache.tinkerpop.gremlin.LoadGraphWith;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.unipop.elastic.common.ElasticClient;

import java.util.Collections;

/**
 * Created by sbarzilay on 4/12/16.
 */
public class RestGraphProvider extends ElasticGraphProvider {
    public RestGraphProvider() throws Exception {
    }

    @Override
    public void loadGraphData(Graph graph, LoadGraphWith loadGraphWith, Class testClass, String testName) {
        ElasticClient client = new ElasticClient(Collections.singletonList("http://localhost:9200"));
        client.validateIndex("edge");
        client.validateIndex("vertex");
        super.loadGraphData(graph, loadGraphWith, testClass, testName);
    }

    @Override
    public void clear(Graph g, Configuration configuration) throws Exception {
        super.clear(g, configuration);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy