Search in sources :

Example 1 with SolrFieldAnno

use of com.odysseusinc.arachne.portal.model.solr.SolrFieldAnno in project ArachneCentralAPI by OHDSI.

the class BaseSolrServiceImpl method getSolrField.

public T getSolrField(final Field field) {
    T solrField = null;
    if (field.isAnnotationPresent(SolrFieldAnno.class)) {
        final SolrFieldAnno solrFieldAnno = field.getAnnotation(SolrFieldAnno.class);
        solrField = extractSolrField(solrFieldAnno);
        solrField.setDataType(solrFieldAnno.clazz() == String.class ? field.getType() : solrFieldAnno.clazz());
        solrField.setField(field);
        if (StringUtils.isEmpty(solrField.getName())) {
            solrField.setName(field.getName());
        }
    }
    return solrField;
}
Also used : SolrFieldAnno(com.odysseusinc.arachne.portal.model.solr.SolrFieldAnno)

Aggregations

SolrFieldAnno (com.odysseusinc.arachne.portal.model.solr.SolrFieldAnno)1