@Test public void testWriteWithVertexDictionary() throws Exception { String tmpPath = temporaryFolder.getRoot().getPath(); String tlfFileImport = getFilePath("/data/tlf/io_test.tlf"); String tlfVertexDictionaryFileImport = getFilePath("/data/tlf/io_test_vertex_dictionary.tlf"); String tlfFileExport = getFilePath("/data/tlf") + "/io_test_output"; String tlfVertexDictionaryFileExport = tmpPath + "/data/tlf/dictionaries/io_test_output_vertex_dictionary"; DataSource dataSource = new TLFDataSource(tlfFileImport, tlfVertexDictionaryFileImport, "", getConfig()); DataSink dataSink = new TLFDataSink(tlfFileExport, tlfVertexDictionaryFileExport, "", getConfig()); dataSink.write(dataSource.getGraphCollection(), true); dataSource = new TLFDataSource(tlfFileExport, getConfig()); DataSet<GraphTransaction> graphTransactions = dataSource .getGraphCollection() .getGraphTransactions(); GraphTransaction graphTransaction = graphTransactions.collect().get(0); Vertex[] vertexArray = graphTransaction.getVertices().toArray( new Vertex[graphTransaction.getVertices().size()]); Arrays.sort(vertexArray, new Comparator<Vertex>() { @Override public int compare(Vertex vertex1, Vertex vertex2) { return vertex1.getLabel().compareTo(vertex2.getLabel()); } }); assertEquals("Wrong vertex label", "0", vertexArray[0].getLabel()); assertEquals("Wrong vertex label", "1", vertexArray[1].getLabel()); assertEquals("Wrong graph count", 2, graphTransactions.count()); }
@Override public void write(LogicalGraph logicalGraph) throws IOException { write(logicalGraph, false); }
TLFDataSink extends TLFBase implements DataSink { @Override public void write(LogicalGraph logicalGraph) throws IOException { write(logicalGraph, false); } }
TLFDataSink extends TLFBase implements DataSink { @Override public void write(LogicalGraph logicalGraph) throws IOException { write(logicalGraph, false); } TLFDataSink(String tlfPath, GradoopFlinkConfig config);  TLFDataSink(String tlfPath, String tlfVertexDictionaryPath,
    String tlfEdgeDictionaryPath, GradoopFlinkConfig config); }
TLFDataSink extends TLFBase implements DataSink { @Override public void write(LogicalGraph logicalGraph) throws IOException { write(logicalGraph, false); } TLFDataSink(String tlfPath, GradoopFlinkConfig config);  TLFDataSink(String tlfPath, String tlfVertexDictionaryPath,
    String tlfEdgeDictionaryPath, GradoopFlinkConfig config); @Override void write(LogicalGraph logicalGraph); @Override void write(GraphCollection graphCollection); @Override void write(LogicalGraph logicalGraph, boolean overwrite); @Override void write(GraphCollection graphCollection, boolean overWrite); }
TLFDataSink extends TLFBase implements DataSink { @Override public void write(LogicalGraph logicalGraph) throws IOException { write(logicalGraph, false); } TLFDataSink(String tlfPath, GradoopFlinkConfig config);  TLFDataSink(String tlfPath, String tlfVertexDictionaryPath,
    String tlfEdgeDictionaryPath, GradoopFlinkConfig config); @Override void write(LogicalGraph logicalGraph); @Override void write(GraphCollection graphCollection); @Override void write(LogicalGraph logicalGraph, boolean overwrite); @Override void write(GraphCollection graphCollection, boolean overWrite);  }