Class SearchUtils


  • public class SearchUtils
    extends Object
    Util methods used by discovery
    Author:
    Kevin Van de Velde (kevin at atmire dot com), Mark Diggory (markd at atmire dot com), Ben Bosman (ben at atmire dot com)
    • Method Detail

      • getSearchService

        public static SearchService getSearchService()
      • getDiscoveryConfiguration

        public static DiscoveryConfiguration getDiscoveryConfiguration​(String prefix,
                                                                       DSpaceObject dso)
        Return the discovery configuration to use in a specific scope for the king of search identified by the prefix. A null prefix mean the normal query, other predefined values are workspace or workflow
        Parameters:
        prefix - the namespace of the configuration to lookup if any
        dso - the DSpaceObject
        Returns:
        the discovery configuration for the specified scope
      • getDiscoveryConfigurationByName

        public static DiscoveryConfiguration getDiscoveryConfigurationByName​(String configurationName)
        Return the discovery configuration identified by the specified name
        Parameters:
        configurationName - the configuration name assigned to the bean in the discovery.xml
        Returns:
        the discovery configuration
      • getIgnoredMetadataFields

        public static List<String> getIgnoredMetadataFields​(int type)
      • getAllDiscoveryConfigurations

        public static List<DiscoveryConfiguration> getAllDiscoveryConfigurations​(Item item)
                                                                          throws SQLException
        Method that retrieves a list of all the configuration objects from the given item A configuration object can be returned for each parent community/collection
        Parameters:
        item - the DSpace item
        Returns:
        a list of configuration objects
        Throws:
        SQLException - An exception that provides information on a database access error or other errors.
      • getAllDiscoveryConfigurations

        public static List<DiscoveryConfiguration> getAllDiscoveryConfigurations​(WorkspaceItem witem)
                                                                          throws SQLException
        Return all the discovery configuration applicable to the provided workspace item
        Parameters:
        witem - a workspace item
        Returns:
        a list of discovery configuration
        Throws:
        SQLException
      • getAllDiscoveryConfigurations

        public static List<DiscoveryConfiguration> getAllDiscoveryConfigurations​(WorkflowItem witem)
                                                                          throws SQLException
        Return all the discovery configuration applicable to the provided workflow item
        Parameters:
        witem - a workflow item
        Returns:
        a list of discovery configuration
        Throws:
        SQLException