Package org.dspace.app.rest
Class ExternalSourcesRestController
java.lang.Object
org.dspace.app.rest.ExternalSourcesRestController
@RestController
@RequestMapping("/api/integration/externalsources/{externalSourceName}")
public class ExternalSourcesRestController
extends Object
This RestController takes care of the retrieval of External data from various endpoints and providers depending
on the calls it receives
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.hateoas.PagedModel<ExternalSourceEntryResource>getExternalSourceEntries(String externalSourceName, String query, String parent, org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler assembler) This method will retrieve all the ExternalSourceEntries for the ExternalSource for the given externalSourceName param curl -X GET http://<dspace.server.url>/api/integration/externalsources/orcidV2/entriesgetExternalSourceEntryValue(String externalSourceName, String entryId) This method will retrieve one ExternalSourceEntryResource based on the ExternalSource for the given externalSourceName and with the given entryId curl -X GET http://<dspace.server.url>/api/integration/externalsources/orcidV2/entries/0000-0000-0000-0000
-
Field Details
-
utils
-
-
Constructor Details
-
ExternalSourcesRestController
public ExternalSourcesRestController()
-
-
Method Details
-
getExternalSourceEntries
@RequestMapping(method=GET, value="/entries") public org.springframework.hateoas.PagedModel<ExternalSourceEntryResource> getExternalSourceEntries(@PathVariable("externalSourceName") String externalSourceName, @RequestParam(name="query") String query, @RequestParam(name="parent",required=false) String parent, org.springframework.data.domain.Pageable pageable, org.springframework.data.web.PagedResourcesAssembler assembler) This method will retrieve all the ExternalSourceEntries for the ExternalSource for the given externalSourceName param curl -X GET http://<dspace.server.url>/api/integration/externalsources/orcidV2/entries- Parameters:
externalSourceName- The externalSourceName that defines which ExternalDataProvider is usedquery- The query used in the lookupparent- The parent used in the lookuppageable- The pagination objectassembler- The assembler object- Returns:
- A paginated list of ExternalSourceEntryResource objects that comply with the params
-
getExternalSourceEntryValue
@RequestMapping(method=GET, value="/entryValues/{entryId}") public ExternalSourceEntryResource getExternalSourceEntryValue(@PathVariable("externalSourceName") String externalSourceName, @PathVariable("entryId") String entryId) This method will retrieve one ExternalSourceEntryResource based on the ExternalSource for the given externalSourceName and with the given entryId curl -X GET http://<dspace.server.url>/api/integration/externalsources/orcidV2/entries/0000-0000-0000-0000- Parameters:
externalSourceName- The externalSourceName that defines which ExternalDataProvider is usedentryId- The entryId used for the lookup- Returns:
- An ExternalSourceEntryResource that complies with the above params
-