@Override public GraphCollection fromDataSets(DataSet<GraphHead> graphHeads, DataSet<Vertex> vertices) { return new GraphCollection(layoutFactory.fromDataSets(graphHeads, vertices), config); }
@Override public GraphCollection fromDataSets(DataSet<GraphHead> graphHeads, DataSet<Vertex> vertices, DataSet<Edge> edges) { return new GraphCollection(layoutFactory.fromDataSets(graphHeads, vertices, edges), config); }
@Override public GraphCollection fromCollections(Collection<GraphHead> graphHeads, Collection<Vertex> vertices, Collection<Edge> edges) { return new GraphCollection(layoutFactory.fromCollections(graphHeads, vertices, edges), config); }
@Override public GraphCollection fromIndexedDataSets(Map<String, DataSet<GraphHead>> graphHeads, Map<String, DataSet<Vertex>> vertices, Map<String, DataSet<Edge>> edges) { GraphCollectionLayout<GraphHead, Vertex, Edge> layout = layoutFactory .fromIndexedDataSets(graphHeads, vertices, edges); return new GraphCollection(layout, config); }
@Override public GraphCollection fromTransactions(DataSet<GraphTransaction> transactions, GroupReduceFunction<Vertex, Vertex> vertexMergeReducer, GroupReduceFunction<Edge, Edge> edgeMergeReducer) { return new GraphCollection(layoutFactory .fromTransactions(transactions, vertexMergeReducer, edgeMergeReducer), config); }
@Override public GraphCollection createEmptyCollection() { return new GraphCollection(layoutFactory.createEmptyCollection(), config); } }
@Override public GraphCollection fromDataSets(DataSet<GraphHead> graphHeads, DataSet<Vertex> vertices, DataSet<Edge> edges) { return new GraphCollection(layoutFactory.fromDataSets(graphHeads, vertices, edges), config); }
@Override public GraphCollection fromIndexedDataSets(Map<String, DataSet<GraphHead>> graphHeads, Map<String, DataSet<Vertex>> vertices, Map<String, DataSet<Edge>> edges) { GraphCollectionLayout<GraphHead, Vertex, Edge> layout = layoutFactory .fromIndexedDataSets(graphHeads, vertices, edges); return new GraphCollection(layout, config); }
@Override public GraphCollection fromTransactions(DataSet<GraphTransaction> transactions, GroupReduceFunction<Vertex, Vertex> vertexMergeReducer, GroupReduceFunction<Edge, Edge> edgeMergeReducer) { return new GraphCollection(layoutFactory .fromTransactions(transactions, vertexMergeReducer, edgeMergeReducer), config); }
@Override public GraphCollection createEmptyCollection() { return new GraphCollection(layoutFactory.createEmptyCollection(), config); } }
@Override public GraphCollection fromCollections(Collection<GraphHead> graphHeads, Collection<Vertex> vertices, Collection<Edge> edges) { return new GraphCollection(layoutFactory.fromCollections(graphHeads, vertices, edges), config); }
@Override public GraphCollection fromDataSets(DataSet<GraphHead> graphHeads, DataSet<Vertex> vertices) { return new GraphCollection(layoutFactory.fromDataSets(graphHeads, vertices), config); }
@Override public GraphCollection fromGraph(LogicalGraph logicalGraphLayout) { return new GraphCollection(layoutFactory.fromGraphLayout(logicalGraphLayout), config); }
@Override public GraphCollection fromTransactions(DataSet<GraphTransaction> transactions) { return new GraphCollection(layoutFactory.fromTransactions(transactions), config); }
@Override public GraphCollection fromGraph(LogicalGraph logicalGraphLayout) { return new GraphCollection(layoutFactory.fromGraphLayout(logicalGraphLayout), config); }
@Override public GraphCollection fromTransactions(DataSet<GraphTransaction> transactions) { return new GraphCollection(layoutFactory.fromTransactions(transactions), config); }
@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()); }