@Test public void testGetGraphCollectionByVariables() throws Exception { FlinkAsciiGraphLoader loader = getSocialNetworkLoader(); String[] graphVariables = new String[]{"g0", "g1", "g2"}; List<GradoopId> graphIds = Lists.newArrayList(); for (String graphVariable : graphVariables) { graphIds.add(loader.getGraphHeadByVariable(graphVariable).getId()); } GradoopIdSet graphIdSet = GradoopIdSet.fromExisting(graphIds); GraphCollection collectionFromLoader = loader.getGraphCollectionByVariables(graphVariables); GraphCollection collectionFromDbViaSet = loader.getGraphCollection().getGraphs(graphIdSet); collectAndAssertTrue(collectionFromLoader.equalsByGraphIds(collectionFromDbViaSet)); collectAndAssertTrue(collectionFromLoader.equalsByGraphElementIds(collectionFromDbViaSet)); }
public GraphCollection getGraphCollectionByVariables(String... variables) { Collection<EPGMGraphHead> graphHeads = getGraphHeadsByVariables(variables); Collection<EPGMVertex> vertices = getVerticesByGraphVariables(variables); Collection<EPGMEdge> edges = getEdgesByGraphVariables(variables); return config.getGraphCollectionFactory().fromCollections(graphHeads, vertices, edges); }
FlinkAsciiGraphLoader { public GraphCollection getGraphCollectionByVariables(String... variables) { Collection<EPGMGraphHead> graphHeads = getGraphHeadsByVariables(variables); Collection<EPGMVertex> vertices = getVerticesByGraphVariables(variables); Collection<EPGMEdge> edges = getEdgesByGraphVariables(variables); return config.getGraphCollectionFactory().fromCollections(graphHeads, vertices, edges); } }
FlinkAsciiGraphLoader { public GraphCollection getGraphCollectionByVariables(String... variables) { Collection<EPGMGraphHead> graphHeads = getGraphHeadsByVariables(variables); Collection<EPGMVertex> vertices = getVerticesByGraphVariables(variables); Collection<EPGMEdge> edges = getEdgesByGraphVariables(variables); return config.getGraphCollectionFactory().fromCollections(graphHeads, vertices, edges); } FlinkAsciiGraphLoader(GradoopFlinkConfig config); }
FlinkAsciiGraphLoader { public GraphCollection getGraphCollectionByVariables(String... variables) { Collection<EPGMGraphHead> graphHeads = getGraphHeadsByVariables(variables); Collection<EPGMVertex> vertices = getVerticesByGraphVariables(variables); Collection<EPGMEdge> edges = getEdgesByGraphVariables(variables); return config.getGraphCollectionFactory().fromCollections(graphHeads, vertices, edges); } FlinkAsciiGraphLoader(GradoopFlinkConfig config); void initDatabaseFromString(String asciiGraphs); void initDatabaseFromStream(InputStream stream); void appendToDatabaseFromString(String asciiGraph); void initDatabaseFromFile(String fileName); LogicalGraph getLogicalGraph(); LogicalGraph getLogicalGraph(boolean withGraphContainment); LogicalGraph getLogicalGraphByVariable(String variable); GraphCollection getGraphCollection(); GraphCollection getGraphCollectionByVariables(String... variables); Collection<EPGMGraphHead> getGraphHeads(); EPGMGraphHead getGraphHeadByVariable(String variable); Collection<EPGMGraphHead> getGraphHeadsByVariables(String... variables); Collection<EPGMVertex> getVertices(); Collection<EPGMVertex> getVerticesByGraphVariables(String... variables); EPGMVertex getVertexByVariable(String variable); Collection<EPGMEdge> getEdges(); Collection<EPGMEdge> getEdgesByGraphVariables(String... variables); EPGMEdge getEdgeByVariable(String variable); }
FlinkAsciiGraphLoader { public GraphCollection getGraphCollectionByVariables(String... variables) { Collection<EPGMGraphHead> graphHeads = getGraphHeadsByVariables(variables); Collection<EPGMVertex> vertices = getVerticesByGraphVariables(variables); Collection<EPGMEdge> edges = getEdgesByGraphVariables(variables); return config.getGraphCollectionFactory().fromCollections(graphHeads, vertices, edges); } FlinkAsciiGraphLoader(GradoopFlinkConfig config); void initDatabaseFromString(String asciiGraphs); void initDatabaseFromStream(InputStream stream); void appendToDatabaseFromString(String asciiGraph); void initDatabaseFromFile(String fileName); LogicalGraph getLogicalGraph(); LogicalGraph getLogicalGraph(boolean withGraphContainment); LogicalGraph getLogicalGraphByVariable(String variable); GraphCollection getGraphCollection(); GraphCollection getGraphCollectionByVariables(String... variables); Collection<EPGMGraphHead> getGraphHeads(); EPGMGraphHead getGraphHeadByVariable(String variable); Collection<EPGMGraphHead> getGraphHeadsByVariables(String... variables); Collection<EPGMVertex> getVertices(); Collection<EPGMVertex> getVerticesByGraphVariables(String... variables); EPGMVertex getVertexByVariable(String variable); Collection<EPGMEdge> getEdges(); Collection<EPGMEdge> getEdgesByGraphVariables(String... variables); EPGMEdge getEdgeByVariable(String variable);  }