@Test public void testRead() throws Exception { String csvPath = getFilePath("/data/csv/input_graph_collection"); String gdlPath = getFilePath("/data/csv/expected/expected_graph_collection.gdl"); DataSource dataSource = new CSVDataSource(csvPath, getConfig()); GraphCollection input = dataSource.getGraphCollection(); GraphCollection expected = getLoaderFromFile(gdlPath) .getGraphCollectionByVariables("expected1", "expected2"); collectAndAssertTrue(input.equalsByGraphElementData(expected)); }
@Override public GraphCollection getGraphCollection() { GraphCollectionFactory collectionFactory = getConfig().getGraphCollectionFactory(); return getCollection( new CSVLineToGraphHead(collectionFactory.getGraphHeadFactory()), new CSVLineToVertex(collectionFactory.getVertexFactory()), new CSVLineToEdge(collectionFactory.getEdgeFactory()), collectionFactory); }
CSVDataSource extends CSVBase implements DataSource { @Override public GraphCollection getGraphCollection() { GraphCollectionFactory collectionFactory = getConfig().getGraphCollectionFactory(); return getCollection( new CSVLineToGraphHead(collectionFactory.getGraphHeadFactory()), new CSVLineToVertex(collectionFactory.getVertexFactory()), new CSVLineToEdge(collectionFactory.getEdgeFactory()), collectionFactory); } }
CSVDataSource extends CSVBase implements DataSource { @Override public GraphCollection getGraphCollection() { GraphCollectionFactory collectionFactory = getConfig().getGraphCollectionFactory(); return getCollection( new CSVLineToGraphHead(collectionFactory.getGraphHeadFactory()), new CSVLineToVertex(collectionFactory.getVertexFactory()), new CSVLineToEdge(collectionFactory.getEdgeFactory()), collectionFactory); } CSVDataSource(String csvPath, GradoopFlinkConfig config); }
CSVDataSource extends CSVBase implements DataSource { @Override public GraphCollection getGraphCollection() { GraphCollectionFactory collectionFactory = getConfig().getGraphCollectionFactory(); return getCollection( new CSVLineToGraphHead(collectionFactory.getGraphHeadFactory()), new CSVLineToVertex(collectionFactory.getVertexFactory()), new CSVLineToEdge(collectionFactory.getEdgeFactory()), collectionFactory); } CSVDataSource(String csvPath, GradoopFlinkConfig config); @Override LogicalGraph getLogicalGraph(); @Override GraphCollection getGraphCollection(); }
CSVDataSource extends CSVBase implements DataSource { @Override public GraphCollection getGraphCollection() { GraphCollectionFactory collectionFactory = getConfig().getGraphCollectionFactory(); return getCollection( new CSVLineToGraphHead(collectionFactory.getGraphHeadFactory()), new CSVLineToVertex(collectionFactory.getVertexFactory()), new CSVLineToEdge(collectionFactory.getEdgeFactory()), collectionFactory); } CSVDataSource(String csvPath, GradoopFlinkConfig config); @Override LogicalGraph getLogicalGraph(); @Override GraphCollection getGraphCollection();  }