use of com.baidu.hugegraph.entity.load.FileSetting in project incubator-hugegraph-toolchain by apache.
the class FileMappingController method checkMappingValid.
private void checkMappingValid(ElementMapping elementMapping, FileMapping fileMapping) {
FileSetting fileSetting = fileMapping.getFileSetting();
List<String> columnNames = fileSetting.getColumnNames();
if (elementMapping.getFieldMappings() != null) {
Set<String> keys = elementMapping.fieldMappingToMap().keySet();
Ex.check(columnNames.containsAll(keys), "load.file-mapping.field.keys-should-in-column-names");
}
if (elementMapping.getValueMappings() != null) {
Set<String> keys = elementMapping.valueMappingToMap().keySet();
Ex.check(columnNames.containsAll(keys), "load.file-mapping.value.keys-should-in-column-names");
}
}
Aggregations