![JAR search and dependency download from the Maven repository](/logo.png)
test.RestGraphProvider Maven / Gradle / Ivy
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