コード例 #1
0
 /**
  * POST a JSON representation of the ORCID record containing only affiliations details
  *
  * @param orcid the ORCID that corresponds to the user's record
  * @return the JSON representation of the ORCID record including the added affiliation(s)
  */
 @POST
 @Produces(value = {VND_ORCID_JSON, ORCID_JSON, MediaType.APPLICATION_JSON})
 @Consumes(value = {VND_ORCID_JSON, ORCID_JSON, MediaType.APPLICATION_JSON})
 @Path(AFFILIATIONS_PATH)
 public Response addAffiliationsJson(@PathParam("orcid") String orcid, OrcidMessage orcidMessage) {
   return serviceDelegator.addAffiliations(uriInfo, orcid, orcidMessage);
 }
コード例 #2
0
 /**
  * GETs the RDF Turtle representation of the ORCID record containing only the Biography details
  *
  * @param orcid the ORCID that corresponds to the user's record
  * @return the RDF Turtle representation of the ORCID record
  */
 @Override
 @GET
 @Produces(value = {TEXT_N3, TEXT_TURTLE})
 @Path(BIO_PATH)
 public Response viewBioDetailsTurtle(@PathParam("orcid") String orcid) {
   return serviceDelegator.findBioDetails(orcid);
 }
コード例 #3
0
 /**
  * PUT an XML representation of the ORCID record containing only works details
  *
  * @param orcid the ORCID that corresponds to the user's record
  * @return the XML representation of the ORCID record including the added work(s)
  */
 @PUT
 @Produces(value = {VND_ORCID_XML, ORCID_XML, MediaType.APPLICATION_XML})
 @Consumes(value = {VND_ORCID_XML, ORCID_XML, MediaType.APPLICATION_XML, MediaType.WILDCARD})
 @Path(WORKS_PATH)
 public Response updateWorksXml(@PathParam("orcid") String orcid, OrcidMessage orcidMessage) {
   return serviceDelegator.updateWorks(uriInfo, orcid, orcidMessage);
 }
コード例 #4
0
 /**
  * GETs the XML representation of the ORCID record containing all details
  *
  * @param orcid the ORCID that corresponds to the user's record
  * @return the XML representation of the ORCID record
  */
 @Override
 @GET
 @Produces(value = {VND_ORCID_XML, ORCID_XML, MediaType.APPLICATION_XML})
 @Path(PROFILE_GET_PATH)
 public Response viewFullDetailsXml(@PathParam("orcid") String orcid) {
   return serviceDelegator.findFullDetails(orcid);
 }
コード例 #5
0
 /**
  * POST an XML representation of the ORCID record containing only funding details
  *
  * @param orcid the ORCID that corresponds to the user's record
  * @return the XML representation of the ORCID record including the added funding(s)
  */
 @POST
 @Produces(value = {VND_ORCID_XML, ORCID_XML, MediaType.APPLICATION_XML})
 @Consumes(value = {VND_ORCID_XML, ORCID_XML, MediaType.APPLICATION_XML, MediaType.WILDCARD})
 @Path(FUNDING_PATH)
 public Response addFundingXml(@PathParam("orcid") String orcid, OrcidMessage orcidMessage) {
   return serviceDelegator.addFunding(uriInfo, orcid, orcidMessage);
 }
コード例 #6
0
 /**
  * GETs the JSON representation of the ORCID record containing only the external identifiers
  *
  * @param orcid the ORCID that corresponds to the user's record
  * @return the JSON representation of the ORCID record
  */
 @Override
 @GET
 @Produces(value = {VND_ORCID_JSON, ORCID_JSON, MediaType.APPLICATION_JSON})
 @Path(EXTERNAL_IDENTIFIER_PATH)
 public Response viewExternalIdentifiersJson(@PathParam("orcid") String orcid) {
   return serviceDelegator.findExternalIdentifiers(orcid);
 }
コード例 #7
0
 /**
  * PUT a JSON representation of the ORCID record containing only funding details
  *
  * @param orcid the ORCID that corresponds to the user's record
  * @return the JSON representation of the ORCID record including the added funding(s)
  */
 @PUT
 @Produces(value = {VND_ORCID_JSON, ORCID_JSON, MediaType.APPLICATION_JSON})
 @Consumes(value = {VND_ORCID_JSON, ORCID_JSON, MediaType.APPLICATION_JSON})
 @Path(FUNDING_PATH)
 public Response updateFundingJson(@PathParam("orcid") String orcid, OrcidMessage orcidMessage) {
   return serviceDelegator.updateFunding(uriInfo, orcid, orcidMessage);
 }
コード例 #8
0
 /**
  * GETs the RDF/XML representation of the ORCID record containing only the Biography details
  *
  * @param orcid the ORCID that corresponds to the user's record
  * @return the RDF/XML representation of the ORCID record
  */
 @Override
 @GET
 @Produces(value = {APPLICATION_RDFXML})
 @Path(BIO_PATH)
 public Response viewBioDetailsRdf(@PathParam("orcid") String orcid) {
   return serviceDelegator.findBioDetails(orcid);
 }
コード例 #9
0
 /**
  * GETs the JSON representation of the ORCID record containing only work details
  *
  * @param orcid the ORCID that corresponds to the user's record
  * @return the JSON representation of the ORCID record
  */
 @Override
 @GET
 @Produces(value = {VND_ORCID_JSON, ORCID_JSON, MediaType.APPLICATION_JSON})
 @Path(WORKS_PATH)
 public Response viewWorksDetailsJson(@PathParam("orcid") String orcid) {
   return serviceDelegator.findWorksDetails(orcid);
 }
コード例 #10
0
 /**
  * Register a new webhook to a specific client.
  *
  * @param orcid the ORCID that corresponds to the user's record
  * @param webhook_uri the webhook that will be added to the user
  * @return
  */
 @PUT
 @Produces(value = {VND_ORCID_XML, ORCID_XML, MediaType.APPLICATION_XML})
 @Consumes(value = {VND_ORCID_XML, ORCID_XML, MediaType.APPLICATION_XML})
 @Path(WEBHOOKS_PATH)
 public Response registerWebhookXML(
     @PathParam("orcid") String orcid, @PathParam("webhook_uri") String webhookUri) {
   return serviceDelegator.registerWebhook(uriInfo, orcid, webhookUri);
 }
コード例 #11
0
 /**
  * POST an JSON representation of the entire ORCID profile
  *
  * @return the JSON representation of the ORCID record including the added work(s)
  */
 @Override
 @POST
 @Produces(value = {VND_ORCID_JSON, ORCID_JSON, MediaType.APPLICATION_JSON})
 @Consumes(value = {VND_ORCID_JSON, ORCID_JSON, MediaType.APPLICATION_JSON})
 @Path(PROFILE_POST_PATH)
 public Response createProfileJson(OrcidMessage orcidMessage) {
   return serviceDelegator.createProfile(uriInfo, orcidMessage);
 }
コード例 #12
0
 /**
  * Unregister a webhook from specific client.
  *
  * @param orcid the ORCID that corresponds to the user's record
  * @param webhook_uri the webhook that will be deleted from the user
  * @return
  */
 @DELETE
 @Produces(value = {VND_ORCID_JSON, ORCID_JSON, MediaType.APPLICATION_JSON})
 @Consumes(value = {VND_ORCID_JSON, ORCID_JSON, MediaType.APPLICATION_JSON})
 @Path(WEBHOOKS_PATH)
 public Response unregisterWebhookJson(
     @PathParam("orcid") String orcid, @PathParam("webhook_uri") String webhookUri) {
   return serviceDelegator.unregisterWebhook(uriInfo, orcid, webhookUri);
 }
コード例 #13
0
 /**
  * DELETE a resource. <strong>This resource is not available to OAuth2 clients.</strong>
  *
  * @param orcid
  * @return
  */
 @Override
 @DELETE
 @Produces(value = {VND_ORCID_XML, ORCID_XML, MediaType.APPLICATION_XML})
 @Consumes(value = {VND_ORCID_XML, ORCID_XML, MediaType.APPLICATION_XML, MediaType.WILDCARD})
 @Path(PROFILE_DELETE_PATH)
 public Response deleteProfileXML(@PathParam("orcid") String orcid) {
   return serviceDelegator.deleteProfile(uriInfo, orcid);
 }
コード例 #14
0
 /**
  * POST a JSON representation of the ORCID external identifiers containing only the URLs details
  *
  * @param orcid the ORCID that corresponds to the user's record
  * @return the JSON representation of the ORCID record including the added external identifiers(s)
  */
 @POST
 @Produces(value = {VND_ORCID_JSON, ORCID_JSON, MediaType.APPLICATION_JSON})
 @Consumes(value = {VND_ORCID_JSON, ORCID_JSON, MediaType.APPLICATION_JSON})
 @Path(EXTERNAL_IDENTIFIER_PATH)
 public Response addExternalIdentifiersJson(
     @PathParam("orcid") String orcid, OrcidMessage orcidMessage) {
   return serviceDelegator.addExternalIdentifiers(uriInfo, orcid, orcidMessage);
 }
コード例 #15
0
 /**
  * Gets the XML representation any Orcid Profiles (BIO) only relevant to the given query
  *
  * @param query
  * @return
  */
 @Override
 @GET
 @Produces(value = {VND_ORCID_XML, ORCID_XML, MediaType.APPLICATION_XML})
 @Path(BIO_SEARCH_PATH)
 public Response searchByQueryXML(@QueryParam("bogus") @DefaultValue("") String query) {
   Map<String, List<String>> solrParams = uriInfo.getQueryParameters();
   Response xmlQueryResults = serviceDelegator.searchByQuery(solrParams);
   registerSearchMetrics(xmlQueryResults);
   return xmlQueryResults;
 }
コード例 #16
0
 /**
  * GETs the HTML representation of the ORCID external identifiers
  *
  * @param orcid the ORCID that corresponds to the user's record
  * @return the HTML representation of the ORCID record
  */
 @Override
 @GET
 @Produces(value = {MediaType.TEXT_HTML})
 @Path(EXTERNAL_IDENTIFIER_PATH)
 public Response viewExternalIdentifiersHtml(@PathParam("orcid") String orcid) {
   Response response = serviceDelegator.findExternalIdentifiers(orcid);
   return Response.fromResponse(response)
       .header("Content-Disposition", "attachment; filename=\"" + orcid + "-external-ids.xml\"")
       .build();
 }
コード例 #17
0
 /**
  * GETs the HTML representation of the ORCID record containing only work details
  *
  * @param orcid the ORCID that corresponds to the user's record
  * @return the HTML representation of the ORCID record
  */
 @Override
 @GET
 @Produces(value = {MediaType.TEXT_HTML})
 @Path(WORKS_PATH)
 public Response viewWorksDetailsHtml(@PathParam("orcid") String orcid) {
   Response response = serviceDelegator.findWorksDetails(orcid);
   return Response.fromResponse(response)
       .header("Content-Disposition", "attachment; filename=\"" + orcid + "-works.xml\"")
       .build();
 }
コード例 #18
0
 /**
  * GETs the XML representation of the ORCID record containing only affiliation details
  *
  * @param orcid the ORCID that corresponds to the user's record
  * @return the XML representation of the ORCID record
  */
 @GET
 @Produces(value = {VND_ORCID_XML, ORCID_XML, MediaType.APPLICATION_XML})
 @Path(AFFILIATIONS_PATH)
 public Response viewAffiliationsDetailsXml(@PathParam("orcid") String orcid) {
   return serviceDelegator.findAffiliationsDetails(orcid);
 }
コード例 #19
0
 /**
  * GETs the XML representation of the ORCID record containing only funding details
  *
  * @param orcid the ORCID that corresponds to the user's record
  * @return the XML representation of the ORCID record
  */
 @GET
 @Produces(value = {VND_ORCID_XML, ORCID_XML, MediaType.APPLICATION_XML})
 @Path(FUNDING_PATH)
 public Response viewFundingDetailsXml(@PathParam("orcid") String orcid) {
   return serviceDelegator.findFundingDetails(orcid);
 }
コード例 #20
0
 /**
  * Sends a redirect from the client URI to the group URI
  *
  * @param clientId the client ID that corresponds to the client
  * @return a redirect to the ORCID record for the client's group
  */
 @Override
 @GET
 @Path(CLIENT_PATH)
 public Response viewClient(@PathParam("client_id") String clientId) {
   return serviceDelegator.redirectClientToGroup(clientId);
 }
コード例 #21
0
 /** @return Plain text message indicating health of service */
 @GET
 @Produces(value = {MediaType.TEXT_PLAIN})
 @Path(STATUS_PATH)
 public Response viewStatusText() {
   return serviceDelegator.viewStatusText();
 }