Package org.dspace.app.sherpa.submit
Class SHERPASubmitService
java.lang.Object
org.dspace.app.sherpa.submit.SHERPASubmitService
SHERPASubmitService is
- Author:
- Kim Shepherd
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SHERPASubmitConfigurationServiceprotected SHERPAServiceSpring beans for configuration and API service -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionUsing the configured itemIssnExtractors from SHERPA configuration, extract ISSNs from item metadata or authority valuesbooleanSimple boolean test that runs the getISSNs extraction method to determine whether an item has any ISSNs at allsearchRelatedJournals(Context context, Item item) Search SHERPA for journal policies matching the ISSNs in the item.Search SHERPA for journal policies matching the passed ISSN.voidsetConfiguration(SHERPASubmitConfigurationService configuration) Setter for configuration (from Spring)voidsetSherpaService(SHERPAService sherpaService) Setter for SHERPA service, responsible for actual HTTP API calls
-
Field Details
-
sherpaService
Spring beans for configuration and API service -
configuration
-
-
Constructor Details
-
SHERPASubmitService
public SHERPASubmitService()
-
-
Method Details
-
setConfiguration
Setter for configuration (from Spring)- Parameters:
configuration-- See Also:
-
- "dspace-dspace-addon-sherpa-configuration-services.xml"
-
setSherpaService
Setter for SHERPA service, responsible for actual HTTP API calls- Parameters:
sherpaService-- See Also:
-
- "dspace-dspace-addon-sherpa-configuration-services.xml"
-
searchRelatedJournals
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 contextitem- DSpace item containing ISSNs to be checked- Returns:
- SHERPA v2 API response (policy data)
- See Also:
-
- "dspace-dspace-addon-sherpa-configuration-services.xml"
-
searchRelatedJournalsByISSN
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
Using the configured itemIssnExtractors from SHERPA configuration, extract ISSNs from item metadata or authority values- Parameters:
context- DSpace contextitem- Item containing metadata / authority values- Returns:
- Set of ISSN strings
-
hasISSNs
Simple boolean test that runs the getISSNs extraction method to determine whether an item has any ISSNs at all- Parameters:
context- DSpace contextitem- Item to test- Returns:
- boolean indicating presence of >=1 ISSNs
-