use of com.baidu.hugegraph.entity.schema.SchemaType in project incubator-hugegraph-toolchain by apache.
the class SchemaService method collectPropertyIndexes.
public static List<PropertyIndex> collectPropertyIndexes(SchemaLabel schemaLabel, List<IndexLabel> indexLabels) {
List<PropertyIndex> propertyIndexes = new ArrayList<>();
if (indexLabels == null) {
return propertyIndexes;
}
for (IndexLabel indexLabel : indexLabels) {
if (indexLabel.baseType().string().equals(schemaLabel.type()) && indexLabel.baseValue().equals(schemaLabel.name())) {
SchemaType schemaType = SchemaType.convert(indexLabel.baseType());
PropertyIndex propertyIndex;
propertyIndex = new PropertyIndex(indexLabel.baseValue(), schemaType, indexLabel.name(), indexLabel.indexType(), indexLabel.indexFields());
propertyIndexes.add(propertyIndex);
}
}
return propertyIndexes;
}
Aggregations