@Override public DataSet<GraphTransaction> getGraphTransactions() { DataSet<Tuple2<GradoopId, GraphElement>> graphVertexTuples = getVertices() .map(new Cast<>(GraphElement.class)) .returns(TypeExtractor.getForClass(GraphElement.class)) .flatMap(new GraphElementExpander<>()); DataSet<Tuple2<GradoopId, GraphElement>> graphEdgeTuples = getEdges() .map(new Cast<>(GraphElement.class)) .returns(TypeExtractor.getForClass(GraphElement.class)) .flatMap(new GraphElementExpander<>()); DataSet<Tuple3<GradoopId, Set<Vertex>, Set<Edge>>> 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()); }
@Override public DataSet<GraphTransaction> getGraphTransactions() { DataSet<Tuple2<GradoopId, GraphElement>> graphVertexTuples = getVertices() .map(new Cast<>(GraphElement.class)) .returns(TypeExtractor.getForClass(GraphElement.class)) .flatMap(new GraphElementExpander<>()); DataSet<Tuple2<GradoopId, GraphElement>> graphEdgeTuples = getEdges() .map(new Cast<>(GraphElement.class)) .returns(TypeExtractor.getForClass(GraphElement.class)) .flatMap(new GraphElementExpander<>()); DataSet<Tuple3<GradoopId, Set<Vertex>, Set<Edge>>> 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()); }
.filter(new MatchingVertices<>(query)) .map(new BuildIdWithCandidatesAndGraphs<>(query)) .flatMap(new ExpandFirstField<>()) .join(graphIds) .where(0).equalTo("*") .filter(new MatchingEdges<>(query)) .map(new BuildTripleWithCandidatesAndGraphs<>(query)) .flatMap(new ExpandFirstField<>()) .join(graphIds) .where(0).equalTo("*")
.filter(new MatchingVertices<>(query)) .map(new BuildIdWithCandidatesAndGraphs<>(query)) .flatMap(new ExpandFirstField<>()) .join(graphIds) .where(0).equalTo("*") .filter(new MatchingEdges<>(query)) .map(new BuildTripleWithCandidatesAndGraphs<>(query)) .flatMap(new ExpandFirstField<>()) .join(graphIds) .where(0).equalTo("*")