@Test public void testCreateEmptyCollection() throws Exception { final GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> layout = factory.createEmptyCollection(); Collection<TemporalGraphHead> loadedGraphHeads = new ArrayList<>(); Collection<TemporalVertex> loadedVertices = new ArrayList<>(); Collection<TemporalEdge> loadedEdges = new ArrayList<>(); layout.getGraphHeads().output(new LocalCollectionOutputFormat<>(loadedGraphHeads)); layout.getVertices().output(new LocalCollectionOutputFormat<>(loadedVertices)); layout.getEdges().output(new LocalCollectionOutputFormat<>(loadedEdges)); getExecutionEnvironment().execute(); assertEquals(0, loadedGraphHeads.size()); assertEquals(0, loadedVertices.size()); assertEquals(0, loadedEdges.size()); }
@Override public GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> createEmptyCollection() { return fromCollections(Collections.emptyList(), Collections.emptyList(), Collections.emptyList()); }
TemporalGraphCollectionLayoutFactory extends TemporalBaseLayoutFactory implements GraphCollectionLayoutFactory<TemporalGraphHead, TemporalVertex, TemporalEdge> { @Override public GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> createEmptyCollection() { return fromCollections(Collections.emptyList(), Collections.emptyList(), Collections.emptyList()); } }
TemporalGraphCollectionLayoutFactory extends TemporalBaseLayoutFactory implements GraphCollectionLayoutFactory<TemporalGraphHead, TemporalVertex, TemporalEdge> { @Override public GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> createEmptyCollection() { return fromCollections(Collections.emptyList(), Collections.emptyList(), Collections.emptyList()); }  }
TemporalGraphCollectionLayoutFactory extends TemporalBaseLayoutFactory implements GraphCollectionLayoutFactory<TemporalGraphHead, TemporalVertex, TemporalEdge> { @Override public GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> createEmptyCollection() { return fromCollections(Collections.emptyList(), Collections.emptyList(), Collections.emptyList()); }  @Override GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> fromDataSets(
    DataSet<TemporalGraphHead> graphHeads, DataSet<TemporalVertex> vertices); @Override GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> fromDataSets(
    DataSet<TemporalGraphHead> graphHeads, DataSet<TemporalVertex> vertices,
    DataSet<TemporalEdge> edges); @Override GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> fromIndexedDataSets(
    Map<String, DataSet<TemporalGraphHead>> graphHeads,
    Map<String, DataSet<TemporalVertex>> vertices, Map<String, DataSet<TemporalEdge>> edges); @Override GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> fromCollections(
    Collection<TemporalGraphHead> graphHeads,
    Collection<TemporalVertex> vertices,
    Collection<TemporalEdge> edges); @Override GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> fromGraphLayout(
    LogicalGraphLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> logicalGraphLayout); @Override GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> fromTransactions(
    DataSet<GraphTransaction> transactions); @Override GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> fromTransactions(
    DataSet<GraphTransaction> transactions,
    GroupReduceFunction<TemporalVertex, TemporalVertex> vertexMergeReducer,
    GroupReduceFunction<TemporalEdge, TemporalEdge> edgeMergeReducer); @Override GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> createEmptyCollection(); }
TemporalGraphCollectionLayoutFactory extends TemporalBaseLayoutFactory implements GraphCollectionLayoutFactory<TemporalGraphHead, TemporalVertex, TemporalEdge> { @Override public GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> createEmptyCollection() { return fromCollections(Collections.emptyList(), Collections.emptyList(), Collections.emptyList()); }  @Override GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> fromDataSets(
    DataSet<TemporalGraphHead> graphHeads, DataSet<TemporalVertex> vertices); @Override GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> fromDataSets(
    DataSet<TemporalGraphHead> graphHeads, DataSet<TemporalVertex> vertices,
    DataSet<TemporalEdge> edges); @Override GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> fromIndexedDataSets(
    Map<String, DataSet<TemporalGraphHead>> graphHeads,
    Map<String, DataSet<TemporalVertex>> vertices, Map<String, DataSet<TemporalEdge>> edges); @Override GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> fromCollections(
    Collection<TemporalGraphHead> graphHeads,
    Collection<TemporalVertex> vertices,
    Collection<TemporalEdge> edges); @Override GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> fromGraphLayout(
    LogicalGraphLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> logicalGraphLayout); @Override GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> fromTransactions(
    DataSet<GraphTransaction> transactions); @Override GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> fromTransactions(
    DataSet<GraphTransaction> transactions,
    GroupReduceFunction<TemporalVertex, TemporalVertex> vertexMergeReducer,
    GroupReduceFunction<TemporalEdge, TemporalEdge> edgeMergeReducer); @Override GraphCollectionLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> createEmptyCollection();  }