Package org.mycore.orcid.resources
Class MCRORCIDResource
java.lang.Object
org.mycore.orcid.resources.MCRORCIDResource
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetPublicationStatus
(String objectID) Returns the publication status for a given MCRObjectID in the current user's ORCID profile, e.gReturns the ORCID status of the current user as JSON, e.gPublishes a work in the current user's ORCID profile, or updates an existing work there, given the object ID of the local MODS object.
-
Constructor Details
-
MCRORCIDResource
public MCRORCIDResource()
-
-
Method Details
-
getUserStatus
@GET @Path("status") @Produces("application/json") public String getUserStatus() throws JDOMException, IOException, SAXExceptionReturns the ORCID status of the current user as JSON, e.g. { "orcid": "0000-0001-5484-889X", "isORCIDUser": true, "weAreTrustedParty": true }- Throws:
JDOMException
IOException
SAXException
- See Also:
-
getPublicationStatus
@GET @Path("status/{objectID}") @Produces("application/json") public String getPublicationStatus(@PathParam("objectID") String objectID) throws JDOMException, IOException, SAXException Returns the publication status for a given MCRObjectID in the current user's ORCID profile, e.g. { "user": { "orcid": "0000-0001-5484-889X", "isORCIDUser": true, "weAreTrustedParty": true }, "objectID": "mir_mods_00088905", "isUsersPublication": true, "isInORCIDProfile": true }- Throws:
JDOMException
IOException
SAXException
- See Also:
-
publish
@GET @Path("publish/{objectID}") @Produces("application/json") public String publish(@PathParam("objectID") String objectID) throws JDOMException, IOException, SAXException Publishes a work in the current user's ORCID profile, or updates an existing work there, given the object ID of the local MODS object. The request path must contain the MCRObjectID to publish. The current user must have an ORCID profile and must have authorized this application to add or updated works. Returns the new publication status as bygetPublicationStatus(String)
- Throws:
JDOMException
IOException
SAXException
-