@Test public void getGraphTransactions() throws Exception { GraphTransaction tx0 = new GraphTransaction(g0, Sets.newHashSet(v0, v1), Sets.newHashSet(e0)); assertEquals(tx0, from(singletonList(g0), asList(v0, v1), singletonList(e0)).getGraphTransactions().collect().get(0)); }
@Override public DataSet<GraphTransaction> getGraphTransactions() { DataSet<Tuple2<GradoopId, EPGMGraphElement>> graphVertexTuples = getVertices() .map(new Cast<>(EPGMGraphElement.class)) .returns(TypeExtractor.getForClass(EPGMGraphElement.class)) .flatMap(new GraphElementExpander<>()); DataSet<Tuple2<GradoopId, EPGMGraphElement>> graphEdgeTuples = getEdges() .map(new Cast<>(EPGMGraphElement.class)) .returns(TypeExtractor.getForClass(EPGMGraphElement.class)) .flatMap(new GraphElementExpander<>()); DataSet<Tuple3<GradoopId, Set<EPGMVertex>, Set<EPGMEdge>>> transactions = graphVertexTuples .union(graphEdgeTuples) .groupBy(0) .combineGroup(new GraphVerticesEdges()) .groupBy(0) .reduceGroup(new GraphVerticesEdges()); return getGraphHeads() .leftOuterJoin(transactions) .where(new Id<>()).equalTo(0) .with(new TransactionFromSets()); }
GVELayout implements LogicalGraphLayout<EPGMGraphHead, EPGMVertex, EPGMEdge>,
  GraphCollectionLayout<EPGMGraphHead, EPGMVertex, EPGMEdge> { @Override public DataSet<GraphTransaction> getGraphTransactions() { DataSet<Tuple2<GradoopId, EPGMGraphElement>> graphVertexTuples = getVertices() .map(new Cast<>(EPGMGraphElement.class)) .returns(TypeExtractor.getForClass(EPGMGraphElement.class)) .flatMap(new GraphElementExpander<>()); DataSet<Tuple2<GradoopId, EPGMGraphElement>> graphEdgeTuples = getEdges() .map(new Cast<>(EPGMGraphElement.class)) .returns(TypeExtractor.getForClass(EPGMGraphElement.class)) .flatMap(new GraphElementExpander<>()); DataSet<Tuple3<GradoopId, Set<EPGMVertex>, Set<EPGMEdge>>> transactions = graphVertexTuples .union(graphEdgeTuples) .groupBy(0) .combineGroup(new GraphVerticesEdges()) .groupBy(0) .reduceGroup(new GraphVerticesEdges()); return getGraphHeads() .leftOuterJoin(transactions) .where(new Id<>()).equalTo(0) .with(new TransactionFromSets()); } }
GVELayout implements LogicalGraphLayout<EPGMGraphHead, EPGMVertex, EPGMEdge>,
  GraphCollectionLayout<EPGMGraphHead, EPGMVertex, EPGMEdge> { @Override public DataSet<GraphTransaction> getGraphTransactions() { DataSet<Tuple2<GradoopId, EPGMGraphElement>> graphVertexTuples = getVertices() .map(new Cast<>(EPGMGraphElement.class)) .returns(TypeExtractor.getForClass(EPGMGraphElement.class)) .flatMap(new GraphElementExpander<>()); DataSet<Tuple2<GradoopId, EPGMGraphElement>> graphEdgeTuples = getEdges() .map(new Cast<>(EPGMGraphElement.class)) .returns(TypeExtractor.getForClass(EPGMGraphElement.class)) .flatMap(new GraphElementExpander<>()); DataSet<Tuple3<GradoopId, Set<EPGMVertex>, Set<EPGMEdge>>> transactions = graphVertexTuples .union(graphEdgeTuples) .groupBy(0) .combineGroup(new GraphVerticesEdges()) .groupBy(0) .reduceGroup(new GraphVerticesEdges()); return getGraphHeads() .leftOuterJoin(transactions) .where(new Id<>()).equalTo(0) .with(new TransactionFromSets()); } protected  GVELayout(DataSet<EPGMGraphHead> graphHeads, DataSet<EPGMVertex> vertices,
    DataSet<EPGMEdge> edges); }
GVELayout implements LogicalGraphLayout<EPGMGraphHead, EPGMVertex, EPGMEdge>,
  GraphCollectionLayout<EPGMGraphHead, EPGMVertex, EPGMEdge> { @Override public DataSet<GraphTransaction> getGraphTransactions() { DataSet<Tuple2<GradoopId, EPGMGraphElement>> graphVertexTuples = getVertices() .map(new Cast<>(EPGMGraphElement.class)) .returns(TypeExtractor.getForClass(EPGMGraphElement.class)) .flatMap(new GraphElementExpander<>()); DataSet<Tuple2<GradoopId, EPGMGraphElement>> graphEdgeTuples = getEdges() .map(new Cast<>(EPGMGraphElement.class)) .returns(TypeExtractor.getForClass(EPGMGraphElement.class)) .flatMap(new GraphElementExpander<>()); DataSet<Tuple3<GradoopId, Set<EPGMVertex>, Set<EPGMEdge>>> transactions = graphVertexTuples .union(graphEdgeTuples) .groupBy(0) .combineGroup(new GraphVerticesEdges()) .groupBy(0) .reduceGroup(new GraphVerticesEdges()); return getGraphHeads() .leftOuterJoin(transactions) .where(new Id<>()).equalTo(0) .with(new TransactionFromSets()); } protected  GVELayout(DataSet<EPGMGraphHead> graphHeads, DataSet<EPGMVertex> vertices,
    DataSet<EPGMEdge> edges); @Override boolean isGVELayout(); @Override boolean isIndexedGVELayout(); @Override boolean isTransactionalLayout(); @Override DataSet<EPGMGraphHead> getGraphHeads(); @Override DataSet<EPGMGraphHead> getGraphHeadsByLabel(String label); @Override DataSet<GraphTransaction> getGraphTransactions(); @Override DataSet<EPGMGraphHead> getGraphHead(); @Override DataSet<EPGMVertex> getVertices(); @Override DataSet<EPGMVertex> getVerticesByLabel(String label); @Override DataSet<EPGMEdge> getEdges(); @Override DataSet<EPGMEdge> getEdgesByLabel(String label); }
GVELayout implements LogicalGraphLayout<EPGMGraphHead, EPGMVertex, EPGMEdge>,
  GraphCollectionLayout<EPGMGraphHead, EPGMVertex, EPGMEdge> { @Override public DataSet<GraphTransaction> getGraphTransactions() { DataSet<Tuple2<GradoopId, EPGMGraphElement>> graphVertexTuples = getVertices() .map(new Cast<>(EPGMGraphElement.class)) .returns(TypeExtractor.getForClass(EPGMGraphElement.class)) .flatMap(new GraphElementExpander<>()); DataSet<Tuple2<GradoopId, EPGMGraphElement>> graphEdgeTuples = getEdges() .map(new Cast<>(EPGMGraphElement.class)) .returns(TypeExtractor.getForClass(EPGMGraphElement.class)) .flatMap(new GraphElementExpander<>()); DataSet<Tuple3<GradoopId, Set<EPGMVertex>, Set<EPGMEdge>>> transactions = graphVertexTuples .union(graphEdgeTuples) .groupBy(0) .combineGroup(new GraphVerticesEdges()) .groupBy(0) .reduceGroup(new GraphVerticesEdges()); return getGraphHeads() .leftOuterJoin(transactions) .where(new Id<>()).equalTo(0) .with(new TransactionFromSets()); } protected  GVELayout(DataSet<EPGMGraphHead> graphHeads, DataSet<EPGMVertex> vertices,
    DataSet<EPGMEdge> edges); @Override boolean isGVELayout(); @Override boolean isIndexedGVELayout(); @Override boolean isTransactionalLayout(); @Override DataSet<EPGMGraphHead> getGraphHeads(); @Override DataSet<EPGMGraphHead> getGraphHeadsByLabel(String label); @Override DataSet<GraphTransaction> getGraphTransactions(); @Override DataSet<EPGMGraphHead> getGraphHead(); @Override DataSet<EPGMVertex> getVertices(); @Override DataSet<EPGMVertex> getVerticesByLabel(String label); @Override DataSet<EPGMEdge> getEdges(); @Override DataSet<EPGMEdge> getEdgesByLabel(String label);  }