Search in sources :

Example 1 with FieldType

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;
}
Also used : HashMap(java.util.HashMap) HashMap(java.util.HashMap) Map(java.util.Map) FieldType(io.openk9.plugin.driver.manager.api.FieldType)

Aggregations

FieldType (io.openk9.plugin.driver.manager.api.FieldType)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1