idMap.get(Long.valueOf(fields[2])) ); edge.addGraphId(graphHead.getId()); edges.add(edge);
idMap.get(Long.valueOf(fields[2])) ); edge.addGraphId(graphHead.getId()); edges.add(edge);
/** * Initializes an EPGM edge using the specified parameters and adds its label * if the given edge was created for return pattern * * @param out flat map collector * @param graphHead graph head to assign edge to * @param edgeId edge identifier * @param sourceId source vertex identifier * @param targetId target vertex identifier * @param label label associated with edge */ private void initEdgeWithData(Collector<Element> out, GraphHead graphHead, GradoopId edgeId, GradoopId sourceId, GradoopId targetId, String label) { if (!processedIds.contains(edgeId)) { Edge e = edgeFactory.initEdge(edgeId, sourceId, targetId); e.addGraphId(graphHead.getId()); e.setLabel(label); out.collect(e); processedIds.add(edgeId); } } }
/** * Initializes an EPGM edge using the specified parameters and adds its label * if the given edge was created for return pattern * * @param out flat map collector * @param graphHead graph head to assign edge to * @param edgeId edge identifier * @param sourceId source vertex identifier * @param targetId target vertex identifier * @param label label associated with edge */ private void initEdgeWithData(Collector<Element> out, GraphHead graphHead, GradoopId edgeId, GradoopId sourceId, GradoopId targetId, String label) { if (!processedIds.contains(edgeId)) { Edge e = edgeFactory.initEdge(edgeId, sourceId, targetId); e.addGraphId(graphHead.getId()); e.setLabel(label); out.collect(e); processedIds.add(edgeId); } } }
vertexMapping[(int) s.getTo()] : vertexMapping[(int) s.getFrom()]; Edge e = edgeFactory.initEdge(edgeMapping[i], sourceId, targetId); e.addGraphId(graphHead.getId()); out.collect(e);
vertexMapping[(int) s.getTo()] : vertexMapping[(int) s.getFrom()]; Edge e = edgeFactory.initEdge(edgeMapping[i], sourceId, targetId); e.addGraphId(graphHead.getId()); out.collect(e);
@BeforeClass public static void setup() { ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); GradoopFlinkConfig config = GradoopFlinkConfig.createConfig(env); GraphHead g0 = config.getGraphHeadFactory().createGraphHead("A"); GraphHead g1 = config.getGraphHeadFactory().createGraphHead("B"); Vertex v0 = config.getVertexFactory().createVertex("A"); Vertex v1 = config.getVertexFactory().createVertex("B"); Vertex v2 = config.getVertexFactory().createVertex("C"); Edge e0 = config.getEdgeFactory().createEdge("a", v0.getId(), v1.getId()); Edge e1 = config.getEdgeFactory().createEdge("b", v1.getId(), v2.getId()); v0.addGraphId(g0.getId()); v1.addGraphId(g0.getId()); v1.addGraphId(g1.getId()); v2.addGraphId(g1.getId()); e0.addGraphId(g0.getId()); e1.addGraphId(g1.getId()); tx0 = new GraphTransaction(g0, Sets.newHashSet(v0, v1), Sets.newHashSet(e0)); tx1 = new GraphTransaction(g1, Sets.newHashSet(v1, v2), Sets.newHashSet(e1)); }
@BeforeClass public static void setup() { ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); GradoopFlinkConfig config = GradoopFlinkConfig.createConfig(env); g0 = config.getGraphHeadFactory().createGraphHead("A"); g1 = config.getGraphHeadFactory().createGraphHead("B"); v0 = config.getVertexFactory().createVertex("A"); v1 = config.getVertexFactory().createVertex("B"); v2 = config.getVertexFactory().createVertex("C"); e0 = config.getEdgeFactory().createEdge("a", v0.getId(), v1.getId()); e1 = config.getEdgeFactory().createEdge("b", v1.getId(), v2.getId()); v0.addGraphId(g0.getId()); v1.addGraphId(g0.getId()); v1.addGraphId(g1.getId()); v2.addGraphId(g1.getId()); e0.addGraphId(g0.getId()); e1.addGraphId(g1.getId()); }