Class SHERPASubmitService

java.lang.Object
org.dspace.app.sherpa.submit.SHERPASubmitService

public class SHERPASubmitService extends Object
SHERPASubmitService is
Author:
Kim Shepherd
  • Field Details

  • Constructor Details

    • SHERPASubmitService

      public SHERPASubmitService()
  • Method Details

    • setConfiguration

      public void setConfiguration(SHERPASubmitConfigurationService configuration)
      Setter for configuration (from Spring)
      Parameters:
      configuration -
      See Also:
      • "dspace-dspace-addon-sherpa-configuration-services.xml"
    • setSherpaService

      public void setSherpaService(SHERPAService sherpaService)
      Setter for SHERPA service, responsible for actual HTTP API calls
      Parameters:
      sherpaService -
      See Also:
      • "dspace-dspace-addon-sherpa-configuration-services.xml"
    • searchRelatedJournals

      public SHERPAResponse searchRelatedJournals(Context context, Item item)
      Search SHERPA for journal policies matching the ISSNs in the item. Rather than a 'search' query for any/all ISSNs, the v2 API requires a separate query for each ISSN found in the item. The ISSNs are extracted using the configured issnItemExtractor(s) in the SHERPA spring configuration. The ISSNs are not validated with a regular expression or other rules - any values extracted will be included in API queries. Return the first not empty response from Sherpa
      Parameters:
      context - DSpace context
      item - DSpace item containing ISSNs to be checked
      Returns:
      SHERPA v2 API response (policy data)
      See Also:
      • "dspace-dspace-addon-sherpa-configuration-services.xml"
    • searchRelatedJournalsByISSN

      public SHERPAResponse searchRelatedJournalsByISSN(String issn)
      Search SHERPA for journal policies matching the passed ISSN. The ISSN are not validated with a regular expression or other rules - any String passed to this method will be considered an ISSN for the purposes of an API query
      Parameters:
      issn - ISSN string
      Returns:
      SHERPA v2 API response object (policy data)
    • getISSNs

      public Set<String> getISSNs(Context context, Item item)
      Using the configured itemIssnExtractors from SHERPA configuration, extract ISSNs from item metadata or authority values
      Parameters:
      context - DSpace context
      item - Item containing metadata / authority values
      Returns:
      Set of ISSN strings
    • hasISSNs

      public boolean hasISSNs(Context context, Item item)
      Simple boolean test that runs the getISSNs extraction method to determine whether an item has any ISSNs at all
      Parameters:
      context - DSpace context
      item - Item to test
      Returns:
      boolean indicating presence of >=1 ISSNs