.input(data) .build()) .then(new AddElements()) .build();
protected Graph createExampleGraph() { final Graph graph = new Graph.Builder() .addSchemas(StreamUtil.openStreams(getClass(), "/example/operation/schema")) .storeProperties(StreamUtil.openStream(getClass(), "/example/operation/mockaccumulostore.properties")) .build(); // Create data generator final DataGenerator dataGenerator = new DataGenerator(); // Load data into memory final List<String> data = DataUtils.loadData(StreamUtil.openStream(getClass(), "/example/operation/data.txt", true)); //add the edges to the graph using an operation chain consisting of: //generateElements - generating edges from the data (note these are directed edges) //addElements - add the edges to the graph final OperationChain addOpChain = new OperationChain.Builder() .first(new GenerateElements.Builder<String>() .generator(dataGenerator) .objects(data) .build()) .then(new AddElements()) .build(); try { graph.execute(addOpChain, new User()); } catch (OperationException e) { throw new RuntimeException(e); } return graph; }
.objects(dummyData) .build()) .then(new AddElements()) .build();
.input(dummyData) .build()) .then(new AddElements()) .build();
.input(dummyData) .build()) .then(new AddElements()) .build();
.objects(dummyData) .build()) .then(new AddElements()) .build(); graph.execute(addOpChain, user);
.objects(dummyData) .build()) .then(new AddElements()) .build();
.input(IOUtils.readLines(StreamUtil.openStream(getClass(), "RoadAndRoadUse/data.txt"))) .build()) .then(new AddElements()) .build();
.input(dummyData) .build()) .then(new AddElements()) .build();
.input(dummyData) .build()) .then(new AddElements()) .build();
.objects(dummyData) .build()) .then(new AddElements()) .build();
.input(IOUtils.readLines(StreamUtil.openStream(getClass(), "RoadAndRoadUseWithTimesAndCardinalities/data.txt"))) .build()) .then(new AddElements()) .build();
.input(dummyData) .build()) .then(new AddElements()) .build();
.input(IOUtils.readLines(StreamUtil.openStream(getClass(), "RoadAndRoadUseWithTimesAndCardinalities/data.txt"))) .build()) .then(new AddElements()) .build();
.input(IOUtils.readLines(StreamUtil.openStream(getClass(), "RoadAndRoadUseWithSecurity/data.txt"))) .build()) .then(new AddElements()) .build();
.objects(DataUtils.loadData(getData())) .build()) .then(new AddElements()) .build();
.input(dummyData) .build()) .then(new AddElements()) .build();
.input(IOUtils.readLines(StreamUtil.openStream(getClass(), "FullExample/data.txt"))) .build()) .then(new AddElements()) .build();
.objects(data) .build()) .then(new AddElements()) .build();
.objects(DataUtils.loadData(getData())) .build()) .then(new AddElements()) .build();