@Override public E join(E e, Tuple2<GradoopId, GradoopId> vertexTuple) { e.setTargetId(vertexTuple.f1); return e; } }
/** * {@inheritDoc} */ @Override public E join(E e, Tuple2<GradoopId, GradoopId> vertexTuple) { e.setTargetId(vertexTuple.f1); return e; } }
/** * Updates the target vertex identifier of the given EPGM edge. * * @param targetIdEdgePair import target id and EPGM edge * @param vertexIdPair import target vertex id and EPGM vertex id * @return EPGM edge with updated target vertex id * @throws Exception */ @Override public E join(Tuple2<K, E> targetIdEdgePair, Tuple2<K, GradoopId> vertexIdPair) throws Exception { targetIdEdgePair.f1.setTargetId(vertexIdPair.f1); return targetIdEdgePair.f1; } }
/** * Updates the target vertex identifier of the given EPGM edge. * * @param targetIdEdgePair import target id and EPGM edge * @param vertexIdPair import target vertex id and EPGM vertex id * @return EPGM edge with updated target vertex id * @throws Exception */ @Override public E join(Tuple2<K, E> targetIdEdgePair, Tuple2<K, GradoopId> vertexIdPair) throws Exception { targetIdEdgePair.f1.setTargetId(vertexIdPair.f1); return targetIdEdgePair.f1; } }
@Override public void join(Edge first, Tuple2<Vertex, GradoopId> second, Collector<Edge> out) throws Exception { if (second != null && !(second.f1.equals(GradoopId.NULL_VALUE))) { if (isItSourceDoingNow) { first.setSourceId(second.f1); } else { first.setTargetId(second.f1); } } out.collect(first); }
@Override public void join(Edge first, Tuple2<Vertex, GradoopId> second, Collector<Edge> out) throws Exception { if (second != null && !(second.f1.equals(GradoopId.NULL_VALUE))) { if (isItSourceDoingNow) { first.setSourceId(second.f1); } else { first.setTargetId(second.f1); } } out.collect(first); }
@Override public Edge apply(Edge current, Edge transformed) { if (current.getLabel().equals(forEdgeLabel)) { GradoopId source = current.getSourceId(); GradoopId target = current.getTargetId(); current.setSourceId(target); current.setTargetId(source); current.setLabel(newLabel); } return current; } }
break; case AccumuloTables.KEY.TARGET: row.setTargetId(GradoopId.fromString(value.toString())); break; case AccumuloTables.KEY.PROPERTY:
@Override public void join(Edge edge, Vertex vertex, Collector<Edge> collector) throws Exception { if (vertex == null) { collector.collect(edge); } else if (edge != null) { REUSABLE_EDGE.setId(GradoopId.get()); REUSABLE_EDGE.setSourceId(isSourceNow ? vId : edge.getSourceId()); REUSABLE_EDGE.setTargetId(isSourceNow ? edge.getTargetId() : vId); REUSABLE_EDGE.setProperties(edge.getProperties()); REUSABLE_EDGE.setLabel(edge.getLabel()); REUSABLE_EDGE.setGraphIds(edge.getGraphIds()); collector.collect(REUSABLE_EDGE); } } }
@Override public void join(Edge edge, Vertex vertex, Collector<Edge> collector) throws Exception { if (vertex == null) { collector.collect(edge); } else if (edge != null) { REUSABLE_EDGE.setId(GradoopId.get()); REUSABLE_EDGE.setSourceId(isSourceNow ? vId : edge.getSourceId()); REUSABLE_EDGE.setTargetId(isSourceNow ? edge.getTargetId() : vId); REUSABLE_EDGE.setProperties(edge.getProperties()); REUSABLE_EDGE.setLabel(edge.getLabel()); REUSABLE_EDGE.setGraphIds(edge.getGraphIds()); collector.collect(REUSABLE_EDGE); } } }