Example usage for org.apache.solr.client.solrj.response.schema SchemaRepresentation getFieldTypes

List of usage examples for org.apache.solr.client.solrj.response.schema SchemaRepresentation getFieldTypes

Introduction

In this page you can find the example usage for org.apache.solr.client.solrj.response.schema SchemaRepresentation getFieldTypes.

Prototype

public List<FieldTypeDefinition> getFieldTypes() 

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);
        }/*  w w  w. j  a v  a  2s .com*/
        fieldTypes.add(ft);
    }
    return fieldTypes;
}