ORCIDClient
public class ORCIDClientImpl extends java.lang.Object implements ORCIDClient
Degois client
.
Besides the tokens to use the ORCID Member API, it also store the tokens to
access a particular ORCID user profile.ORCIDClient
Constructor | Description |
---|---|
ORCIDClientImpl(java.lang.String loginUri,
java.lang.String apiUri,
java.lang.String clientId,
java.lang.String clientSecret,
java.lang.String redirectUri,
org.um.dsi.gavea.orcid.client.OrcidAccessToken orcidToken) |
Instantiates an ORCID client to communicate with the ORCID API.
|
ORCIDClientImpl(java.lang.String loginUri,
java.lang.String apiUri,
java.lang.String clientId,
java.lang.String clientSecret,
java.lang.String redirectUri,
org.um.dsi.gavea.orcid.client.OrcidAccessToken orcidToken,
boolean debugMode) |
Instantiates an ORCID client to communicate with the ORCID API.
|
ORCIDClientImpl(java.lang.String loginUri,
java.lang.String apiUri,
java.lang.String clientId,
java.lang.String clientSecret,
java.lang.String redirectUri,
org.um.dsi.gavea.orcid.client.OrcidAccessToken orcidToken,
boolean debugMode,
int threads) |
Instantiates an ORCID client to communicate with the ORCID API.
|
ORCIDClientImpl(java.lang.String loginUri,
java.lang.String apiUri,
java.lang.String clientId,
java.lang.String clientSecret,
java.lang.String redirectUri,
org.um.dsi.gavea.orcid.client.OrcidAccessToken orcidToken,
int threads) |
Instantiates an ORCID client to communicate with the ORCID API.
|
Modifier and Type | Method | Description |
---|---|---|
PTCRISyncResult<org.um.dsi.gavea.orcid.model.funding.Funding> |
addFunding(org.um.dsi.gavea.orcid.model.funding.Funding fund) |
Adds a new funding entry to the ORCID profile and returns the assigned
put-code.
|
PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work> |
addWork(org.um.dsi.gavea.orcid.model.work.Work work) |
Adds a new work to the ORCID profile and returns the assigned put-code.
|
java.util.List<PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work>> |
addWorks(java.util.List<org.um.dsi.gavea.orcid.model.work.Work> works) |
Adds a list of new works to the ORCID profile.
|
PTCRISyncResult<org.um.dsi.gavea.orcid.model.funding.Funding> |
deleteFunding(java.math.BigInteger putcode) |
Deletes a funding entry from the ORCID profile.
|
PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work> |
deleteWork(java.math.BigInteger putcode) |
Deletes a work from the ORCID profile.
|
org.um.dsi.gavea.orcid.model.activities.ActivitiesSummary |
getActivitiesSummary() |
Retrieves every activity summary from the ORCID profile.
|
java.lang.String |
getClientId() |
Returns the Member API client id that will commit the changes (i.e., the
works' source).
|
PTCRISyncResult<org.um.dsi.gavea.orcid.model.funding.Funding> |
getFunding(org.um.dsi.gavea.orcid.model.funding.FundingSummary putcode) |
Retrieves a complete funding entry from the ORCID profile (as opposed to
only its summary).
|
org.um.dsi.gavea.orcid.model.activities.Fundings |
getFundingsSummary() |
Retrieves every funding summary from the ORCID profile.
|
java.lang.String |
getUserId() |
Returns the user ORCID to whose profiles the changes will be commited.
|
PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work> |
getWork(org.um.dsi.gavea.orcid.model.work.WorkSummary putcode) |
Retrieves a complete work from the ORCID profile (as opposed to only its
summary).
|
java.util.Map<java.math.BigInteger,PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work>> |
getWorks(java.util.List<org.um.dsi.gavea.orcid.model.work.WorkSummary> summaries) |
Retrieves a list of complete work from the ORCID profile (as opposed to
only their summaries).
|
org.um.dsi.gavea.orcid.model.activities.Works |
getWorksSummary() |
Retrieves every work summary from the ORCID profile.
|
int |
threads() |
The number of worker threads that will be used to communicate with the
ORCID API.
|
PTCRISyncResult<org.um.dsi.gavea.orcid.model.funding.Funding> |
updateFunding(java.math.BigInteger putcode,
org.um.dsi.gavea.orcid.model.funding.Funding work) |
Updates a funding entry in the ORCID profile.
|
PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work> |
updateWork(java.math.BigInteger putcode,
org.um.dsi.gavea.orcid.model.work.Work work) |
Updates a work in the ORCID profile.
|
public ORCIDClientImpl(java.lang.String loginUri, java.lang.String apiUri, java.lang.String clientId, java.lang.String clientSecret, java.lang.String redirectUri, org.um.dsi.gavea.orcid.client.OrcidAccessToken orcidToken, int threads)
loginUri
- the login URI of the ORCID serviceapiUri
- the URI of the ORCID APIclientId
- the id of the ORCID Member API clientclientSecret
- the secret of the ORCID Member API clientredirectUri
- the redirect URI for requesting the access tokenorcidToken
- the access token to the user ORCID profilethreads
- the number of ORCID worker threadspublic ORCIDClientImpl(java.lang.String loginUri, java.lang.String apiUri, java.lang.String clientId, java.lang.String clientSecret, java.lang.String redirectUri, org.um.dsi.gavea.orcid.client.OrcidAccessToken orcidToken)
loginUri
- the login URI of the ORCID serviceapiUri
- the URI of the ORCID APIclientId
- the id of the ORCID Member API clientclientSecret
- the secret of the ORCID Member API clientredirectUri
- the redirect URI for requesting the access tokenorcidToken
- the access token to the user ORCID profilepublic ORCIDClientImpl(java.lang.String loginUri, java.lang.String apiUri, java.lang.String clientId, java.lang.String clientSecret, java.lang.String redirectUri, org.um.dsi.gavea.orcid.client.OrcidAccessToken orcidToken, boolean debugMode)
loginUri
- the login URI of the ORCID serviceapiUri
- the URI of the ORCID APIclientId
- the id of the ORCID Member API clientclientSecret
- the secret of the ORCID Member API clientredirectUri
- the redirect URI for requesting the access tokenorcidToken
- the access token to the user ORCID profiledebugMode
- Enter debug modepublic ORCIDClientImpl(java.lang.String loginUri, java.lang.String apiUri, java.lang.String clientId, java.lang.String clientSecret, java.lang.String redirectUri, org.um.dsi.gavea.orcid.client.OrcidAccessToken orcidToken, boolean debugMode, int threads)
loginUri
- the login URI of the ORCID serviceapiUri
- the URI of the ORCID APIclientId
- the id of the ORCID Member API clientclientSecret
- the secret of the ORCID Member API clientredirectUri
- the redirect URI for requesting the access tokenorcidToken
- the access token to the user ORCID profiledebugMode
- Enter debug modethreads
- the number of ORCID worker threadspublic java.lang.String getClientId()
getClientId
in interface ORCIDClient
public java.lang.String getUserId()
getUserId
in interface ORCIDClient
public org.um.dsi.gavea.orcid.model.activities.ActivitiesSummary getActivitiesSummary() throws org.um.dsi.gavea.orcid.client.exception.OrcidClientException
getActivitiesSummary
in interface ORCIDClient
org.um.dsi.gavea.orcid.client.exception.OrcidClientException
- if the communication with ORCID failspublic org.um.dsi.gavea.orcid.model.activities.Works getWorksSummary() throws org.um.dsi.gavea.orcid.client.exception.OrcidClientException
getWorksSummary
in interface ORCIDClient
org.um.dsi.gavea.orcid.client.exception.OrcidClientException
- if the communication with ORCID failspublic org.um.dsi.gavea.orcid.model.activities.Fundings getFundingsSummary() throws org.um.dsi.gavea.orcid.client.exception.OrcidClientException
getFundingsSummary
in interface ORCIDClient
org.um.dsi.gavea.orcid.client.exception.OrcidClientException
- if the communication with ORCID failspublic PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work> getWork(org.um.dsi.gavea.orcid.model.work.WorkSummary putcode)
PTCRISyncResult
.getWork
in interface ORCIDClient
putcode
- the summary of the work to be retrievedpublic PTCRISyncResult<org.um.dsi.gavea.orcid.model.funding.Funding> getFunding(org.um.dsi.gavea.orcid.model.funding.FundingSummary putcode)
PTCRISyncResult
.getFunding
in interface ORCIDClient
putcode
- the summary of the funding entry to be retrievedpublic java.util.Map<java.math.BigInteger,PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work>> getWorks(java.util.List<org.um.dsi.gavea.orcid.model.work.WorkSummary> summaries)
PTCRISyncResult
. This should generate a single API call
internally.getWorks
in interface ORCIDClient
summaries
- the summaries of the works to be retrievedpublic PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work> addWork(org.um.dsi.gavea.orcid.model.work.Work work)
PTCRISyncResult
.addWork
in interface ORCIDClient
work
- the work to be added to the ORCID profilepublic PTCRISyncResult<org.um.dsi.gavea.orcid.model.funding.Funding> addFunding(org.um.dsi.gavea.orcid.model.funding.Funding fund)
PTCRISyncResult
.addFunding
in interface ORCIDClient
fund
- the funding entry to be added to the ORCID profilepublic java.util.List<PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work>> addWorks(java.util.List<org.um.dsi.gavea.orcid.model.work.Work> works)
PTCRISyncResult
. This should generate a single API call
internally.addWorks
in interface ORCIDClient
works
- the works to be added to the ORCID profilepublic PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work> deleteWork(java.math.BigInteger putcode)
PTCRISyncResult
.deleteWork
in interface ORCIDClient
putcode
- the put-code of the work to be deletedpublic PTCRISyncResult<org.um.dsi.gavea.orcid.model.funding.Funding> deleteFunding(java.math.BigInteger putcode)
PTCRISyncResult
.deleteFunding
in interface ORCIDClient
putcode
- the put-code of the funding entry to be deletedpublic PTCRISyncResult<org.um.dsi.gavea.orcid.model.work.Work> updateWork(java.math.BigInteger putcode, org.um.dsi.gavea.orcid.model.work.Work work)
PTCRISyncResult
.updateWork
in interface ORCIDClient
putcode
- the put-code of the work to be updatedwork
- the new state of the workpublic PTCRISyncResult<org.um.dsi.gavea.orcid.model.funding.Funding> updateFunding(java.math.BigInteger putcode, org.um.dsi.gavea.orcid.model.funding.Funding work)
PTCRISyncResult
.updateFunding
in interface ORCIDClient
putcode
- the put-code of the funding entry to be updatedwork
- the new state of the funding entrypublic int threads()
threads
in interface ORCIDClient