@Override public GraphCollection executeForTxLayout(GraphCollection collection) { DataSet<GraphTransaction> graphTransactions = collection.getGraphTransactions(); GradoopFlinkConfig config = collection.getConfig(); DataSet<GraphTransaction> transformedGraphTransactions = graphTransactions .map(new TransformGraphTransaction( collection.getFactory().getGraphHeadFactory(), graphHeadTransFunc, collection.getFactory().getVertexFactory(), vertexTransFunc, collection.getFactory().getEdgeFactory(), edgeTransFunc )); return config.getGraphCollectionFactory().fromTransactions(transformedGraphTransactions); } }
@Override public GraphCollection executeForTxLayout(GraphCollection collection) { DataSet<GraphTransaction> graphTransactions = collection.getGraphTransactions(); GradoopFlinkConfig config = collection.getConfig(); DataSet<GraphTransaction> transformedGraphTransactions = graphTransactions .map(new TransformGraphTransaction( collection.getFactory().getGraphHeadFactory(), graphHeadTransFunc, collection.getFactory().getVertexFactory(), vertexTransFunc, collection.getFactory().getEdgeFactory(), edgeTransFunc )); return config.getGraphCollectionFactory().fromTransactions(transformedGraphTransactions); } }
@Override public GraphCollection executeForGVELayout(GraphCollection collection) { // the resulting logical graph holds multiple graph heads LogicalGraph modifiedGraph = executeInternal( collection.getGraphHeads(), collection.getVertices(), collection.getEdges(), collection.getConfig().getLogicalGraphFactory()); return collection.getFactory().fromDataSets( modifiedGraph.getGraphHead(), modifiedGraph.getVertices(), modifiedGraph.getEdges()); }
@Override public GraphCollection executeForGVELayout(GraphCollection collection) { // the resulting logical graph holds multiple graph heads LogicalGraph modifiedGraph = executeInternal( collection.getGraphHeads(), collection.getVertices(), collection.getEdges(), collection.getConfig().getLogicalGraphFactory()); return collection.getFactory().fromDataSets( modifiedGraph.getGraphHead(), modifiedGraph.getVertices(), modifiedGraph.getEdges()); }
@Override public GraphCollection getGraphs(final GradoopIdSet identifiers) { DataSet<GraphHead> newGraphHeads = this.getGraphHeads() .filter(new FilterFunction<GraphHead>() { @Override public boolean filter(GraphHead graphHead) throws Exception { return identifiers.contains(graphHead.getId()); } }); // build new vertex set DataSet<Vertex> vertices = getVertices() .filter(new InAnyGraph<>(identifiers)); // build new edge set DataSet<Edge> edges = getEdges() .filter(new InAnyGraph<>(identifiers)); return new GraphCollection(getFactory().fromDataSets(newGraphHeads, vertices, edges), getConfig()); }
/** * {@inheritDoc} */ @Override public GraphCollection getGraphs(final GradoopIdSet identifiers) { DataSet<GraphHead> newGraphHeads = this.getGraphHeads() .filter(new FilterFunction<GraphHead>() { @Override public boolean filter(GraphHead graphHead) throws Exception { return identifiers.contains(graphHead.getId()); } }); // build new vertex set DataSet<Vertex> vertices = getVertices() .filter(new InAnyGraph<>(identifiers)); // build new edge set DataSet<Edge> edges = getEdges() .filter(new InAnyGraph<>(identifiers)); return new GraphCollection(getFactory().fromDataSets(newGraphHeads, vertices, edges), getConfig()); }
EPGMGraphHeadFactory<GraphHead> graphFactory = collection.getFactory().getGraphHeadFactory();
EPGMGraphHeadFactory<GraphHead> graphFactory = collection.getFactory().getGraphHeadFactory();
EPGMGraphHeadFactory<GraphHead> graphFactory = collection.getFactory().getGraphHeadFactory();
EPGMGraphHeadFactory<GraphHead> graphFactory = collection.getFactory().getGraphHeadFactory();
EPGMGraphHeadFactory<GraphHead> graphFactory = collection.getFactory().getGraphHeadFactory();
EPGMGraphHeadFactory<GraphHead> graphFactory = collection.getFactory().getGraphHeadFactory();