use of com.baidu.hugegraph.loader.struct.EdgeStructV1 in project incubator-hugegraph-toolchain by apache.
the class MappingUtil method convertV1ToV2.
private static ElementMapping convertV1ToV2(ElementStructV1 origin) {
ElementMapping target;
if (origin.type().isVertex()) {
VertexStructV1 originVertex = (VertexStructV1) origin;
target = new VertexMapping(originVertex.idField(), originVertex.unfold());
} else {
EdgeStructV1 originEdge = (EdgeStructV1) origin;
target = new EdgeMapping(originEdge.sourceFields(), originEdge.unfoldSource(), originEdge.targetFields(), originEdge.unfoldTarget());
}
fill(origin, target);
return target;
}
Aggregations