@Test public void testFromNonTemporalDataSets() throws Exception { GraphCollection collection = getSocialNetworkLoader().getGraphCollectionByVariables("g0", "g1"); TemporalGraph temporalGraph = getConfig().getTemporalGraphFactory().fromNonTemporalDataSets( collection.getGraphHeads(), collection.getVertices(), collection.getEdges() ); Collection<TemporalGraphHead> loadedGraphHeads = new ArrayList<>(); Collection<TemporalVertex> loadedVertices = new ArrayList<>(); Collection<TemporalEdge> loadedEdges = new ArrayList<>(); temporalGraph.getGraphHead().output(new LocalCollectionOutputFormat<>(loadedGraphHeads)); temporalGraph.getVertices().output(new LocalCollectionOutputFormat<>(loadedVertices)); temporalGraph.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 TemporalGraph fromNonTemporalDataSets( DataSet<? extends GraphHead> graphHead, DataSet<? extends Vertex> vertices, DataSet<? extends Edge> edges) { return new TemporalGraph(this.layoutFactory.fromDataSets( graphHead.map(new GraphHeadToTemporalGraphHead<>(getGraphHeadFactory())), vertices.map(new VertexToTemporalVertex<>(getVertexFactory())), edges.map(new EdgeToTemporalEdge<>(getEdgeFactory()))), config); }
TemporalGraphFactory implements
  BaseGraphFactory<TemporalGraphHead, TemporalVertex, TemporalEdge, TemporalGraph, TemporalGraphCollection> { public TemporalGraph fromNonTemporalDataSets( DataSet<? extends GraphHead> graphHead, DataSet<? extends Vertex> vertices, DataSet<? extends Edge> edges) { return new TemporalGraph(this.layoutFactory.fromDataSets( graphHead.map(new GraphHeadToTemporalGraphHead<>(getGraphHeadFactory())), vertices.map(new VertexToTemporalVertex<>(getVertexFactory())), edges.map(new EdgeToTemporalEdge<>(getEdgeFactory()))), config); } }
TemporalGraphFactory implements
  BaseGraphFactory<TemporalGraphHead, TemporalVertex, TemporalEdge, TemporalGraph, TemporalGraphCollection> { public TemporalGraph fromNonTemporalDataSets( DataSet<? extends GraphHead> graphHead, DataSet<? extends Vertex> vertices, DataSet<? extends Edge> edges) { return new TemporalGraph(this.layoutFactory.fromDataSets( graphHead.map(new GraphHeadToTemporalGraphHead<>(getGraphHeadFactory())), vertices.map(new VertexToTemporalVertex<>(getVertexFactory())), edges.map(new EdgeToTemporalEdge<>(getEdgeFactory()))), config); } TemporalGraphFactory(TemporalGradoopConfig config); }
TemporalGraphFactory implements
  BaseGraphFactory<TemporalGraphHead, TemporalVertex, TemporalEdge, TemporalGraph, TemporalGraphCollection> { public TemporalGraph fromNonTemporalDataSets( DataSet<? extends GraphHead> graphHead, DataSet<? extends Vertex> vertices, DataSet<? extends Edge> edges) { return new TemporalGraph(this.layoutFactory.fromDataSets( graphHead.map(new GraphHeadToTemporalGraphHead<>(getGraphHeadFactory())), vertices.map(new VertexToTemporalVertex<>(getVertexFactory())), edges.map(new EdgeToTemporalEdge<>(getEdgeFactory()))), config); } TemporalGraphFactory(TemporalGradoopConfig config); @Override LogicalGraphLayoutFactory<TemporalGraphHead, TemporalVertex, TemporalEdge> getLayoutFactory(); @Override void setLayoutFactory(
    LogicalGraphLayoutFactory<TemporalGraphHead, TemporalVertex, TemporalEdge> layoutFactory); @Override TemporalGraph fromDataSets(DataSet<TemporalVertex> vertices); @Override TemporalGraph fromDataSets(DataSet<TemporalVertex> vertices, DataSet<TemporalEdge> edges); @Override TemporalGraph fromDataSets(DataSet<TemporalGraphHead> graphHead,
    DataSet<TemporalVertex> vertices, DataSet<TemporalEdge> edges); @Override TemporalGraph fromIndexedDataSets(Map<String, DataSet<TemporalVertex>> vertices,
    Map<String, DataSet<TemporalEdge>> edges); @Override TemporalGraph fromIndexedDataSets(Map<String, DataSet<TemporalGraphHead>> graphHead,
    Map<String, DataSet<TemporalVertex>> vertices, Map<String, DataSet<TemporalEdge>> edges); @Override TemporalGraph fromCollections(TemporalGraphHead graphHead,
    Collection<TemporalVertex> vertices, Collection<TemporalEdge> edges); @Override TemporalGraph fromCollections(Collection<TemporalVertex> vertices,
    Collection<TemporalEdge> edges); @Override TemporalGraph createEmptyGraph(); @Override GraphHeadFactory<TemporalGraphHead> getGraphHeadFactory(); @Override VertexFactory<TemporalVertex> getVertexFactory(); @Override EdgeFactory<TemporalEdge> getEdgeFactory(); TemporalGraph fromNonTemporalDataSets(
    DataSet<? extends GraphHead> graphHead,
    DataSet<? extends Vertex> vertices,
    DataSet<? extends Edge> edges); TemporalGraph fromNonTemporalDataSets(
    DataSet<G> graphHead,
    TimeIntervalExtractor<G> graphHeadTimeIntervalExtractor,
    DataSet<V> vertices,
    TimeIntervalExtractor<V> vertexTimeIntervalExtractor,
    DataSet<E> edges,
    TimeIntervalExtractor<E> edgeTimeIntervalExtractor); TemporalGraph fromNonTemporalGraph(BaseGraph<?, ?, ?, ?, ?> graph); }
TemporalGraphFactory implements
  BaseGraphFactory<TemporalGraphHead, TemporalVertex, TemporalEdge, TemporalGraph, TemporalGraphCollection> { public TemporalGraph fromNonTemporalDataSets( DataSet<? extends GraphHead> graphHead, DataSet<? extends Vertex> vertices, DataSet<? extends Edge> edges) { return new TemporalGraph(this.layoutFactory.fromDataSets( graphHead.map(new GraphHeadToTemporalGraphHead<>(getGraphHeadFactory())), vertices.map(new VertexToTemporalVertex<>(getVertexFactory())), edges.map(new EdgeToTemporalEdge<>(getEdgeFactory()))), config); } TemporalGraphFactory(TemporalGradoopConfig config); @Override LogicalGraphLayoutFactory<TemporalGraphHead, TemporalVertex, TemporalEdge> getLayoutFactory(); @Override void setLayoutFactory(
    LogicalGraphLayoutFactory<TemporalGraphHead, TemporalVertex, TemporalEdge> layoutFactory); @Override TemporalGraph fromDataSets(DataSet<TemporalVertex> vertices); @Override TemporalGraph fromDataSets(DataSet<TemporalVertex> vertices, DataSet<TemporalEdge> edges); @Override TemporalGraph fromDataSets(DataSet<TemporalGraphHead> graphHead,
    DataSet<TemporalVertex> vertices, DataSet<TemporalEdge> edges); @Override TemporalGraph fromIndexedDataSets(Map<String, DataSet<TemporalVertex>> vertices,
    Map<String, DataSet<TemporalEdge>> edges); @Override TemporalGraph fromIndexedDataSets(Map<String, DataSet<TemporalGraphHead>> graphHead,
    Map<String, DataSet<TemporalVertex>> vertices, Map<String, DataSet<TemporalEdge>> edges); @Override TemporalGraph fromCollections(TemporalGraphHead graphHead,
    Collection<TemporalVertex> vertices, Collection<TemporalEdge> edges); @Override TemporalGraph fromCollections(Collection<TemporalVertex> vertices,
    Collection<TemporalEdge> edges); @Override TemporalGraph createEmptyGraph(); @Override GraphHeadFactory<TemporalGraphHead> getGraphHeadFactory(); @Override VertexFactory<TemporalVertex> getVertexFactory(); @Override EdgeFactory<TemporalEdge> getEdgeFactory(); TemporalGraph fromNonTemporalDataSets(
    DataSet<? extends GraphHead> graphHead,
    DataSet<? extends Vertex> vertices,
    DataSet<? extends Edge> edges); TemporalGraph fromNonTemporalDataSets(
    DataSet<G> graphHead,
    TimeIntervalExtractor<G> graphHeadTimeIntervalExtractor,
    DataSet<V> vertices,
    TimeIntervalExtractor<V> vertexTimeIntervalExtractor,
    DataSet<E> edges,
    TimeIntervalExtractor<E> edgeTimeIntervalExtractor); TemporalGraph fromNonTemporalGraph(BaseGraph<?, ?, ?, ?, ?> graph);  }