/** * Create a new CreateImportVertexCSV function * * @param vertexFactory the factory that is responsible for creating a vertex */ public PropertiesToVertex(EPGMVertexFactory<V> vertexFactory) { this.vertex = vertexFactory.createVertex(); }
/** * Creates a new instance of this JSON string to vertex converting function. * * @param vertexFactory The vertex factory used to create new vertices. */ public MinimalJsonToVertex(EPGMVertexFactory<Vertex> vertexFactory) { this.reuse = Objects.requireNonNull(vertexFactory).createVertex(JSON_VERTEX_LABEL); this.reuse.setProperties(Properties.create()); }
.createVertex(vertex.getValue(), graphIds);
.createVertex(vertex.getValue(), graphIds);
/** * Outputs a triple containing of the import vertex identifier, the new EPGM * vertex identifier and the EPGM vertex. * * @param importVertex import vertex * @return triple containing import and EPGM id as well as the EPGM vertex * @throws Exception */ @Override public Tuple3<K, GradoopId, Vertex> map(ImportVertex<K> importVertex) throws Exception { reuseTuple.f0 = importVertex.getId(); Vertex vertex = vertexFactory.createVertex(importVertex.getLabel(), importVertex.getProperties()); reuseTuple.f1 = vertex.getId(); reuseTuple.f2 = updateLineage(vertex, importVertex.getId()); return reuseTuple; }
/** * Outputs a triple containing of the import vertex identifier, the new EPGM * vertex identifier and the EPGM vertex. * * @param importVertex import vertex * @return triple containing import and EPGM id as well as the EPGM vertex * @throws Exception */ @Override public Tuple3<K, GradoopId, Vertex> map(ImportVertex<K> importVertex) throws Exception { reuseTuple.f0 = importVertex.getId(); Vertex vertex = vertexFactory.createVertex(importVertex.getLabel(), importVertex.getProperties()); reuseTuple.f1 = vertex.getId(); reuseTuple.f2 = updateLineage(vertex, importVertex.getId()); return reuseTuple; }