Class SuggestionUtils

java.lang.Object
org.dspace.app.suggestion.SuggestionUtils

public class SuggestionUtils extends Object
This utility class provides convenient methods to deal with the ExternalDataObject for the purpose of the Suggestion framework
Author:
Andrea Bollini (andrea.bollini at 4science.it)
  • Method Details

    • getAllEntriesByMetadatum

      public static List<String> getAllEntriesByMetadatum(ExternalDataObject record, String schema, String element, String qualifier)
      This method receive an ExternalDataObject and a metadatum key. It return only the values of the Metadata associated with the key.
      Parameters:
      record - the ExternalDataObject to extract metadata from
      schema - schema of the searching record
      element - element of the searching record
      qualifier - qualifier of the searching record
      Returns:
      value of the first matching record
    • getAllEntriesByMetadatum

      public static List<String> getAllEntriesByMetadatum(ExternalDataObject record, String metadataFieldKey)
      This method receive an ExternalDataObject and a metadatum key. It return only the values of the Metadata associated with the key.
      Parameters:
      record - the ExternalDataObject to extract metadata from
      metadataFieldKey - the metadata field key (i.e. dc.title or dc.contributor.author), the jolly char is not supported
      Returns:
      value of the first matching record
    • getFirstEntryByMetadatum

      public static String getFirstEntryByMetadatum(ExternalDataObject record, String schema, String element, String qualifier)
      This method receive and ExternalDataObject and a metadatum key. It return only the value of the first Metadatum from the list associated with the key.
      Parameters:
      record - the ExternalDataObject to extract metadata from
      schema - schema of the searching record
      element - element of the searching record
      qualifier - qualifier of the searching record
      Returns:
      value of the first matching record
    • getFirstEntryByMetadatum

      public static String getFirstEntryByMetadatum(ExternalDataObject record, String metadataFieldKey)
      This method receive and ExternalDataObject and a metadatum key. It return only the value of the first Metadatum from the list associated with the key.
      Parameters:
      record - the ExternalDataObject to extract metadata from
      metadataFieldKey - the metadata field key (i.e. dc.title or dc.contributor.author), the jolly char is not supported
      Returns:
      value of the first matching record