use of com.baidu.hugegraph.structure.constant.Frequency in project incubator-hugegraph-toolchain by apache.
the class EdgeLabelService method convert.
private static EdgeLabel convert(EdgeLabelEntity entity, HugeClient client) {
if (entity == null) {
return null;
}
Frequency frequency = entity.isLinkMultiTimes() ? Frequency.MULTIPLE : Frequency.SINGLE;
EdgeLabelStyle style = entity.getStyle();
return client.schema().edgeLabel(entity.getName()).sourceLabel(entity.getSourceLabel()).targetLabel(entity.getTargetLabel()).frequency(frequency).properties(toStringArray(entity.getPropNames())).sortKeys(toStringArray(entity.getSortKeys())).nullableKeys(toStringArray(entity.getNullableProps())).enableLabelIndex(entity.isOpenLabelIndex()).userdata(USER_KEY_CREATE_TIME, entity.getCreateTime()).userdata(USER_KEY_STYLE, JsonUtil.toJson(style)).build();
}
Aggregations