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

org.dspace.content.authority.DSpaceControlledVocabularyIndex Maven / Gradle / Ivy

The 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.content.authority;

import java.util.Set;

import org.dspace.browse.BrowseIndex;
import org.dspace.discovery.configuration.DiscoverySearchFilterFacet;

/**
 * Helper class to transform a {@link org.dspace.content.authority.DSpaceControlledVocabulary} into a
 * {@code BrowseIndexRest}
 * cached by {@link org.dspace.content.authority.service.ChoiceAuthorityService#getVocabularyIndex(String)}
 *
 * @author Marie Verdonck (Atmire) on 04/05/2023
 */
public class DSpaceControlledVocabularyIndex extends BrowseIndex {

    protected DSpaceControlledVocabulary vocabulary;
    protected Set metadataFields;
    protected DiscoverySearchFilterFacet facetConfig;

    public DSpaceControlledVocabularyIndex(DSpaceControlledVocabulary controlledVocabulary, Set metadataFields,
                                           DiscoverySearchFilterFacet facetConfig) {
        super(controlledVocabulary.vocabularyName);
        this.vocabulary = controlledVocabulary;
        this.metadataFields = metadataFields;
        this.facetConfig = facetConfig;
    }

    public DSpaceControlledVocabulary getVocabulary() {
        return vocabulary;
    }

    public Set getMetadataFields() {
        return this.metadataFields;
    }

    public DiscoverySearchFilterFacet getFacetConfig() {
        return this.facetConfig;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy