@Test public void testFromNonTemporalDataSets() throws Exception { GraphCollection collection = getSocialNetworkLoader().getGraphCollectionByVariables("g0", "g1"); TemporalGraphCollection temporalGraphCollection = getConfig() .getTemporalGraphCollectionFactory().fromNonTemporalDataSets( collection.getGraphHeads(), collection.getVertices(), collection.getEdges() ); Collection<TemporalGraphHead> loadedGraphHeads = new ArrayList<>(); Collection<TemporalVertex> loadedVertices = new ArrayList<>(); Collection<TemporalEdge> loadedEdges = new ArrayList<>(); temporalGraphCollection.getGraphHeads() .output(new LocalCollectionOutputFormat<>(loadedGraphHeads)); temporalGraphCollection.getVertices() .output(new LocalCollectionOutputFormat<>(loadedVertices)); temporalGraphCollection.getEdges() .output(new LocalCollectionOutputFormat<>(loadedEdges)); Collection<EPGMGraphHead> epgmGraphHeads = new ArrayList<>(); Collection<EPGMVertex> epgmVertices = new ArrayList<>(); Collection<EPGMEdge> epgmEdges = new ArrayList<>(); collection.getGraphHeads().output(new LocalCollectionOutputFormat<>(epgmGraphHeads)); collection.getVertices().output(new LocalCollectionOutputFormat<>(epgmVertices)); collection.getEdges().output(new LocalCollectionOutputFormat<>(epgmEdges)); getExecutionEnvironment().execute(); assertFalse(loadedGraphHeads.isEmpty()); assertFalse(loadedVertices.isEmpty()); assertFalse(loadedEdges.isEmpty()); validateElementCollections(epgmGraphHeads, loadedGraphHeads); validateElementCollections(epgmVertices, loadedVertices); validateElementCollections(epgmEdges, loadedEdges); validateGraphElementCollections(epgmVertices, loadedVertices); validateGraphElementCollections(epgmEdges, loadedEdges); loadedGraphHeads.forEach(this::checkDefaultTemporalElement); loadedVertices.forEach(this::checkDefaultTemporalElement); loadedEdges.forEach(this::checkDefaultTemporalElement); }
public TemporalGraphCollection fromNonTemporalDataSets( DataSet<? extends GraphHead> graphHead, DataSet<? extends Vertex> vertices, DataSet<? extends Edge> edges) { return new TemporalGraphCollection(this.layoutFactory.fromDataSets( graphHead.map(new GraphHeadToTemporalGraphHead<>(getGraphHeadFactory())), vertices.map(new VertexToTemporalVertex<>(getVertexFactory())), edges.map(new EdgeToTemporalEdge<>(getEdgeFactory()))), config); }
TemporalGraphCollectionFactory implements BaseGraphCollectionFactory<
  TemporalGraphHead, TemporalVertex, TemporalEdge, TemporalGraph, TemporalGraphCollection> { public TemporalGraphCollection fromNonTemporalDataSets( DataSet<? extends GraphHead> graphHead, DataSet<? extends Vertex> vertices, DataSet<? extends Edge> edges) { return new TemporalGraphCollection(this.layoutFactory.fromDataSets( graphHead.map(new GraphHeadToTemporalGraphHead<>(getGraphHeadFactory())), vertices.map(new VertexToTemporalVertex<>(getVertexFactory())), edges.map(new EdgeToTemporalEdge<>(getEdgeFactory()))), config); } }
TemporalGraphCollectionFactory implements BaseGraphCollectionFactory<
  TemporalGraphHead, TemporalVertex, TemporalEdge, TemporalGraph, TemporalGraphCollection> { public TemporalGraphCollection fromNonTemporalDataSets( DataSet<? extends GraphHead> graphHead, DataSet<? extends Vertex> vertices, DataSet<? extends Edge> edges) { return new TemporalGraphCollection(this.layoutFactory.fromDataSets( graphHead.map(new GraphHeadToTemporalGraphHead<>(getGraphHeadFactory())), vertices.map(new VertexToTemporalVertex<>(getVertexFactory())), edges.map(new EdgeToTemporalEdge<>(getEdgeFactory()))), config); } TemporalGraphCollectionFactory(TemporalGradoopConfig config); }
TemporalGraphCollectionFactory implements BaseGraphCollectionFactory<
  TemporalGraphHead, TemporalVertex, TemporalEdge, TemporalGraph, TemporalGraphCollection> { public TemporalGraphCollection fromNonTemporalDataSets( DataSet<? extends GraphHead> graphHead, DataSet<? extends Vertex> vertices, DataSet<? extends Edge> edges) { return new TemporalGraphCollection(this.layoutFactory.fromDataSets( graphHead.map(new GraphHeadToTemporalGraphHead<>(getGraphHeadFactory())), vertices.map(new VertexToTemporalVertex<>(getVertexFactory())), edges.map(new EdgeToTemporalEdge<>(getEdgeFactory()))), config); } TemporalGraphCollectionFactory(TemporalGradoopConfig config); @Override GraphCollectionLayoutFactory<TemporalGraphHead, TemporalVertex, TemporalEdge> getLayoutFactory(); @Override void setLayoutFactory(GraphCollectionLayoutFactory<TemporalGraphHead, TemporalVertex,
    TemporalEdge> factory); @Override TemporalGraphCollection fromDataSets(DataSet<TemporalGraphHead> graphHeads,
    DataSet<TemporalVertex> vertices); @Override TemporalGraphCollection fromDataSets(DataSet<TemporalGraphHead> graphHeads,
    DataSet<TemporalVertex> vertices, DataSet<TemporalEdge> edges); @Override TemporalGraphCollection fromIndexedDataSets(
    Map<String, DataSet<TemporalGraphHead>> graphHeads,
    Map<String, DataSet<TemporalVertex>> vertices,
    Map<String, DataSet<TemporalEdge>> edges); @Override TemporalGraphCollection fromCollections(Collection<TemporalGraphHead> graphHeads,
    Collection<TemporalVertex> vertices, Collection<TemporalEdge> edges); @Override TemporalGraphCollection fromGraph(
    LogicalGraphLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> logicalGraphLayout); @Override TemporalGraphCollection fromGraphs(
    LogicalGraphLayout<TemporalGraphHead, TemporalVertex, TemporalEdge>... logicalGraphLayout); @Override TemporalGraphCollection fromTransactions(DataSet<GraphTransaction> transactions); @Override TemporalGraphCollection fromTransactions(DataSet<GraphTransaction> transactions,
    GroupReduceFunction<TemporalVertex, TemporalVertex> vertexMergeReducer,
    GroupReduceFunction<TemporalEdge, TemporalEdge> edgeMergeReducer); @Override TemporalGraphCollection createEmptyCollection(); @Override GraphHeadFactory<TemporalGraphHead> getGraphHeadFactory(); @Override VertexFactory<TemporalVertex> getVertexFactory(); @Override EdgeFactory<TemporalEdge> getEdgeFactory(); TemporalGraphCollection fromNonTemporalDataSets(
    DataSet<? extends GraphHead> graphHead,
    DataSet<? extends Vertex> vertices,
    DataSet<? extends Edge> edges); TemporalGraphCollection fromNonTemporalDataSets(
    DataSet<G> graphHead,
    TimeIntervalExtractor<G> graphHeadTimeIntervalExtractor,
    DataSet<V> vertices,
    TimeIntervalExtractor<V> vertexTimeIntervalExtractor,
    DataSet<E> edges,
    TimeIntervalExtractor<E> edgeTimeIntervalExtractor); TemporalGraphCollection fromNonTemporalGraphCollection(
    BaseGraphCollection<?, ?, ?, ?, ?> collection); }
TemporalGraphCollectionFactory implements BaseGraphCollectionFactory<
  TemporalGraphHead, TemporalVertex, TemporalEdge, TemporalGraph, TemporalGraphCollection> { public TemporalGraphCollection fromNonTemporalDataSets( DataSet<? extends GraphHead> graphHead, DataSet<? extends Vertex> vertices, DataSet<? extends Edge> edges) { return new TemporalGraphCollection(this.layoutFactory.fromDataSets( graphHead.map(new GraphHeadToTemporalGraphHead<>(getGraphHeadFactory())), vertices.map(new VertexToTemporalVertex<>(getVertexFactory())), edges.map(new EdgeToTemporalEdge<>(getEdgeFactory()))), config); } TemporalGraphCollectionFactory(TemporalGradoopConfig config); @Override GraphCollectionLayoutFactory<TemporalGraphHead, TemporalVertex, TemporalEdge> getLayoutFactory(); @Override void setLayoutFactory(GraphCollectionLayoutFactory<TemporalGraphHead, TemporalVertex,
    TemporalEdge> factory); @Override TemporalGraphCollection fromDataSets(DataSet<TemporalGraphHead> graphHeads,
    DataSet<TemporalVertex> vertices); @Override TemporalGraphCollection fromDataSets(DataSet<TemporalGraphHead> graphHeads,
    DataSet<TemporalVertex> vertices, DataSet<TemporalEdge> edges); @Override TemporalGraphCollection fromIndexedDataSets(
    Map<String, DataSet<TemporalGraphHead>> graphHeads,
    Map<String, DataSet<TemporalVertex>> vertices,
    Map<String, DataSet<TemporalEdge>> edges); @Override TemporalGraphCollection fromCollections(Collection<TemporalGraphHead> graphHeads,
    Collection<TemporalVertex> vertices, Collection<TemporalEdge> edges); @Override TemporalGraphCollection fromGraph(
    LogicalGraphLayout<TemporalGraphHead, TemporalVertex, TemporalEdge> logicalGraphLayout); @Override TemporalGraphCollection fromGraphs(
    LogicalGraphLayout<TemporalGraphHead, TemporalVertex, TemporalEdge>... logicalGraphLayout); @Override TemporalGraphCollection fromTransactions(DataSet<GraphTransaction> transactions); @Override TemporalGraphCollection fromTransactions(DataSet<GraphTransaction> transactions,
    GroupReduceFunction<TemporalVertex, TemporalVertex> vertexMergeReducer,
    GroupReduceFunction<TemporalEdge, TemporalEdge> edgeMergeReducer); @Override TemporalGraphCollection createEmptyCollection(); @Override GraphHeadFactory<TemporalGraphHead> getGraphHeadFactory(); @Override VertexFactory<TemporalVertex> getVertexFactory(); @Override EdgeFactory<TemporalEdge> getEdgeFactory(); TemporalGraphCollection fromNonTemporalDataSets(
    DataSet<? extends GraphHead> graphHead,
    DataSet<? extends Vertex> vertices,
    DataSet<? extends Edge> edges); TemporalGraphCollection fromNonTemporalDataSets(
    DataSet<G> graphHead,
    TimeIntervalExtractor<G> graphHeadTimeIntervalExtractor,
    DataSet<V> vertices,
    TimeIntervalExtractor<V> vertexTimeIntervalExtractor,
    DataSet<E> edges,
    TimeIntervalExtractor<E> edgeTimeIntervalExtractor); TemporalGraphCollection fromNonTemporalGraphCollection(
    BaseGraphCollection<?, ?, ?, ?, ?> collection);  }