All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dspace.discovery.configuration.DiscoveryHitHighlightFieldConfiguration Maven / Gradle / Ivy

There is a newer version: 8.0
Show newest version
/**
 * The contents of this file are subject to the license and copyright
 * detailed in the LICENSE and NOTICE files at the root of the source
 * tree and available online at
 *
 * http://www.dspace.org/license/
 */
package org.dspace.discovery.configuration;

import org.springframework.beans.factory.annotation.Autowired;

/**
 * Configuration class that holds hit highlighting configuration for a single metadata field
 *
 * @author Kevin Van de Velde (kevin at atmire dot com)
 * @author Ben Bosman (ben at atmire dot com)
 * @author Mark Diggory (markd at atmire dot com)
 */
public class DiscoveryHitHighlightFieldConfiguration {
    private String field;
    private int maxSize = 0;
    private int snippets = 3;


    public String getField() {
        return field;
    }

    @Autowired(required = true)
    public void setField(String field) {
        this.field = field;
    }

    public int getMaxSize() {
        return maxSize;
    }

    public void setMaxSize(int maxSize) {
        this.maxSize = maxSize;
    }

    /**
     * Set the maximum number of highlighted snippets to generate per field
     *
     * @param snippets the number of maximum snippets
     */
    public void setSnippets(int snippets) {
        this.snippets = snippets;
    }

    /**
     * Get the maximum number of highlighted snippets to generate per field
     *
     * @return maximum number of highlighted snippets to generate per field
     */
    public int getSnippets() {
        return snippets;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy