Class OrcidV3AuthorDataProvider
java.lang.Object
org.dspace.external.provider.AbstractExternalDataProvider
org.dspace.external.provider.impl.OrcidV3AuthorDataProvider
- All Implemented Interfaces:
ExternalDataProvider
This class is the implementation of the ExternalDataProvider interface that will deal with the OrcidV3 External
Data lookup
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ExternalDataObjectconvertToExternalDataObject(org.orcid.jaxb.model.v3.release.record.Person person) org.orcid.jaxb.model.v3.release.record.PersonRetrieve a Person object based on a given orcid identifier.This method will take a String id as a parameter and it'll call the ExternalDataProvider's endpoint or data source to retrieve and build the ExternalDataObjectintgetNumberOfResults(String query) Returns the total amount of results that this source can return for the given queryGeneric getter for the orcidUrlThis method will return the SourceIdentifier for the ExternalDataProvider that implements the interfacevoidinit()Initialize the accessToken that is required for all subsequent calls to ORCID.voidInitialize access token, logging an error and decrementing remaining retries if an IOException is thrown.searchExternalDataObjects(String query, int start, int limit) This method will query the ExternalDataProvider's endpoint or data source to retrieve and build a list of ExternalDataObjects through a search with the given parametersvoidsetClientId(String clientId) Generic setter for the clientIdvoidsetClientSecret(String clientSecret) Generic setter for the clientSecretvoidsetOAUTHUrl(String OAUTHUrl) Generic setter for the OAUTHUrlvoidsetOrcidRestConnector(OrcidRestConnector orcidRestConnector) voidsetOrcidUrl(String orcidUrl) Generic setter for the orcidUrlvoidsetSourceIdentifier(String sourceIdentifier) Generic setter for the sourceIdentifierbooleanThis method will return a boolean indicating whether this ExternalDataProvider can deal with the given source or notMethods inherited from class org.dspace.external.provider.AbstractExternalDataProvider
getSupportedEntityTypes, setSupportedEntityTypes, supportsEntityType
-
Field Details
-
ORCID_ID_SYNTAX
- See Also:
-
-
Constructor Details
-
OrcidV3AuthorDataProvider
public OrcidV3AuthorDataProvider()
-
-
Method Details
-
getSourceIdentifier
Description copied from interface:ExternalDataProviderThis method will return the SourceIdentifier for the ExternalDataProvider that implements the interface- Returns:
- The source identifier as a String
-
init
Initialize the accessToken that is required for all subsequent calls to ORCID.- Throws:
IOException- passed through from HTTPclient.
-
initializeAccessToken
public void initializeAccessToken()Initialize access token, logging an error and decrementing remaining retries if an IOException is thrown. If the optional access token result is empty, set to null instead. -
getExternalDataObject
Description copied from interface:ExternalDataProviderThis method will take a String id as a parameter and it'll call the ExternalDataProvider's endpoint or data source to retrieve and build the ExternalDataObject- Parameters:
id- The id on which will be searched- Returns:
- An Optional object of ExternalDataObject. This is to indicate that this object may be null. This ExternalDataObject will return all the data returned by the ExternalDataProvider
-
convertToExternalDataObject
protected ExternalDataObject convertToExternalDataObject(org.orcid.jaxb.model.v3.release.record.Person person) -
getBio
Retrieve a Person object based on a given orcid identifier.- Parameters:
id- orcid identifier- Returns:
- Person
-
searchExternalDataObjects
Description copied from interface:ExternalDataProviderThis method will query the ExternalDataProvider's endpoint or data source to retrieve and build a list of ExternalDataObjects through a search with the given parameters- Parameters:
query- The query for the searchstart- The start of the searchlimit- The max amount of records to be returned by the search- Returns:
- A list of ExternalDataObjects that were retrieved and built by this search
-
supports
Description copied from interface:ExternalDataProviderThis method will return a boolean indicating whether this ExternalDataProvider can deal with the given source or not- Parameters:
source- The source on which the check needs to be done- Returns:
- A boolean indicating whether this ExternalDataProvider can deal with this source or not
-
getNumberOfResults
Description copied from interface:ExternalDataProviderReturns the total amount of results that this source can return for the given query- Parameters:
query- The query to be search on and give the total amount of results- Returns:
- The total amount of results that the source can return for the given query
-
setSourceIdentifier
Generic setter for the sourceIdentifier- Parameters:
sourceIdentifier- The sourceIdentifier to be set on this OrcidV3AuthorDataProvider
-
getOrcidUrl
Generic getter for the orcidUrl- Returns:
- the orcidUrl value of this OrcidV3AuthorDataProvider
-
setOrcidUrl
Generic setter for the orcidUrl- Parameters:
orcidUrl- The orcidUrl to be set on this OrcidV3AuthorDataProvider
-
setOAUTHUrl
Generic setter for the OAUTHUrl- Parameters:
OAUTHUrl- The OAUTHUrl to be set on this OrcidV3AuthorDataProvider
-
setClientId
Generic setter for the clientId- Parameters:
clientId- The clientId to be set on this OrcidV3AuthorDataProvider
-
setClientSecret
Generic setter for the clientSecret- Parameters:
clientSecret- The clientSecret to be set on this OrcidV3AuthorDataProvider
-
getOrcidRestConnector
-
setOrcidRestConnector
-