Example usage for org.apache.solr.client.solrj.request.schema FieldTypeDefinition getAttributes

List of usage examples for org.apache.solr.client.solrj.request.schema FieldTypeDefinition getAttributes

Introduction

In this page you can find the example usage for org.apache.solr.client.solrj.request.schema FieldTypeDefinition getAttributes.

Prototype

public Map<String, Object> getAttributes() 

Source Link

Usage

From source file:org.apache.storm.solr.schema.builder.RestJsonSchemaBuilderV2.java

License:Apache License

private List<FieldType> getFieldTypes(SchemaRepresentation schemaRepresentation) {
    List<FieldType> fieldTypes = new LinkedList<>();
    for (FieldTypeDefinition fd : schemaRepresentation.getFieldTypes()) {
        FieldType ft = new FieldType();
        ft.setName((String) fd.getAttributes().get("name"));
        ft.setClazz((String) fd.getAttributes().get("class"));
        Object multiValued = fd.getAttributes().get("multiValued");
        if (multiValued != null) {
            ft.setMultiValued((Boolean) multiValued);
        }//  www . j a  v  a 2  s . c  o  m
        fieldTypes.add(ft);
    }
    return fieldTypes;
}