use of io.openk9.plugin.driver.manager.api.FieldType in project openk9 by smclab.
the class MappingsDocumentTypeFactoryCustomizer method _createFieldNode.
private Map<String, Object> _createFieldNode(Field field) {
FieldType fieldType = field.getFieldType();
Map<String, Object> fieldNode = new HashMap<>();
if (fieldType != FieldType.NULL) {
fieldNode.put("type", fieldType.getType());
}
for (Map.Entry<String, Object> entry : field.getExtra().entrySet()) {
fieldNode.put(entry.getKey(), entry.getValue());
}
Map<String, Object> result = new HashMap<>();
result.put(field.getName(), fieldNode);
return result;
}