@Test public void testImportLogicalGraphWithoutHeader() throws Exception { String csvPath = MinimalCSVImporterTest.class .getResource("/csv/inputWithoutHeader.csv").getPath(); String gdlPath = MinimalCSVImporterTest.class.getResource("/csv/expected.gdl").getPath(); FlinkAsciiGraphLoader loader = getLoaderFromFile(gdlPath); List<String> columnNames = Arrays.asList("name", "value1", "value2", "value3"); DataSource importVertexImporter = new MinimalCSVImporter(csvPath, DELIMITER, getConfig(), columnNames, false); LogicalGraph resultGraph = importVertexImporter.getLogicalGraph(); LogicalGraph expectedGraph = loader.getLogicalGraphByVariable("expected"); collectAndAssertTrue(expectedGraph.equalsByElementData(resultGraph)); }
@Override public LogicalGraph getLogicalGraph() throws IOException { DataSet<EPGMVertex> vertices; if (columnNames == null) { vertices = readCSVFile(readHeaderRow(), checkReoccurringHeader); } else { vertices = readCSVFile(columnNames, checkReoccurringHeader); } return config.getLogicalGraphFactory().fromDataSets(vertices); }
MinimalCSVImporter implements DataSource { @Override public LogicalGraph getLogicalGraph() throws IOException { DataSet<EPGMVertex> vertices; if (columnNames == null) { vertices = readCSVFile(readHeaderRow(), checkReoccurringHeader); } else { vertices = readCSVFile(columnNames, checkReoccurringHeader); } return config.getLogicalGraphFactory().fromDataSets(vertices); } }
MinimalCSVImporter implements DataSource { @Override public LogicalGraph getLogicalGraph() throws IOException { DataSet<EPGMVertex> vertices; if (columnNames == null) { vertices = readCSVFile(readHeaderRow(), checkReoccurringHeader); } else { vertices = readCSVFile(columnNames, checkReoccurringHeader); } return config.getLogicalGraphFactory().fromDataSets(vertices); } MinimalCSVImporter(String path, String tokenSeparator, GradoopFlinkConfig config,
                            List<String> columnNames, boolean checkReoccurringHeader);  MinimalCSVImporter(String path, String tokenSeparator, GradoopFlinkConfig config,
                            boolean checkReoccurringHeader);  MinimalCSVImporter(String path, String tokenSeparator, GradoopFlinkConfig config,
                            String charset, boolean checkReoccurringHeader); }
MinimalCSVImporter implements DataSource { @Override public LogicalGraph getLogicalGraph() throws IOException { DataSet<EPGMVertex> vertices; if (columnNames == null) { vertices = readCSVFile(readHeaderRow(), checkReoccurringHeader); } else { vertices = readCSVFile(columnNames, checkReoccurringHeader); } return config.getLogicalGraphFactory().fromDataSets(vertices); } MinimalCSVImporter(String path, String tokenSeparator, GradoopFlinkConfig config,
                            List<String> columnNames, boolean checkReoccurringHeader);  MinimalCSVImporter(String path, String tokenSeparator, GradoopFlinkConfig config,
                            boolean checkReoccurringHeader);  MinimalCSVImporter(String path, String tokenSeparator, GradoopFlinkConfig config,
                            String charset, boolean checkReoccurringHeader); @Override LogicalGraph getLogicalGraph(); @Override GraphCollection getGraphCollection(); }
MinimalCSVImporter implements DataSource { @Override public LogicalGraph getLogicalGraph() throws IOException { DataSet<EPGMVertex> vertices; if (columnNames == null) { vertices = readCSVFile(readHeaderRow(), checkReoccurringHeader); } else { vertices = readCSVFile(columnNames, checkReoccurringHeader); } return config.getLogicalGraphFactory().fromDataSets(vertices); } MinimalCSVImporter(String path, String tokenSeparator, GradoopFlinkConfig config,
                            List<String> columnNames, boolean checkReoccurringHeader);  MinimalCSVImporter(String path, String tokenSeparator, GradoopFlinkConfig config,
                            boolean checkReoccurringHeader);  MinimalCSVImporter(String path, String tokenSeparator, GradoopFlinkConfig config,
                            String charset, boolean checkReoccurringHeader); @Override LogicalGraph getLogicalGraph(); @Override GraphCollection getGraphCollection();  }