Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When SEAD receives publish requests from its users for a repository, it keeps a list of those requests in PDT. If the repository need to . To access the collections and publish them, it partner repositories need to implement an agent that handles the metadata /and data retrieval and status updates. You can refer to https://github.com/Data-to-Insight-Center/sead2/tree/master/sead-nds-repository for a sample agent code.

Following are the The following operations that need to be implemented in the agent;:

Retrieve collections from SEAD

The collections queued for your repository can be retrieved from the following endpoint;: https://seadva-test.d2i.indiana.edu/sead-c3pr/api/repositories/<orgidentifier>/researchobjects

If you want only the new collections (the collections that have not yet been started to process by the repository), query the following endpoint;: https://seadva-test.d2i.indiana.edu/sead-c3pr/api/repositories/<orgidentifier>/researchobjects/new.

These endpoints return a list of collections that are queued for your repository. The collection identifier can be found in ‘Aggregation.Identifier’ element in each JSON object that represents a collection. You can access the OREMap (A a single JSONLD file that has all the collection metadata) of a collection using the following endpoint;: https://seadva-test.d2i.indiana.edu/sead-c3pr/api/researchobjects/<collection_id>/oremap.

Accept the collection and publish to a repository

If you'd like to publish a collection in your queue, you're first required to send a status message to SEAD to indicate that you have started processing this the particuar request. For this you should send a POST request to the following endpoint;: https://seadva-test.d2i.indiana.edu/sead-c3pr/api/researchobjects/<collection_id>/status

 with the post body;:

Code Block
{
	"reporter": "your_org_identifier",
	"stage": "Pending",
	"message": "The repository is now processing this request",
	"date": "Apr 14, 2016 12:29:15 PM"
}

...

Then you can get the OREMap of that collection to get retrieve metadata and data download links, and implement your own code to deposit the collection in your repository. In order to communicate your status other statuses to the submitter, you can update more the status using the above mentioned endpoint and using the same JSON format.

Complete publishing the collection

...

Once you have successfully published the collection in the repository, you are required to send a status message to the above mentioned endpoint, and with the POST body as follows;:

Code Block
{
	"reporter": "your_org_identifier",
	"stage": "Success",
	"message": "<PID of the collection>",
	"date": "Apr 14, 2016 12:29:15 PM"
}

The value for “stage” should be “Success” and the “message” should contain the PID of the collection. PID is a globally resolvable permanent identifier for the collection. You can use SEAD services to create a DOI (Digital Object Identifier) for the collection by sending a POST request to the following endpoint;: https://seadva-test.d2i.indiana.edu/sead-c3pr/api/doi

with the post body as follows;:

Code Block
{
	"target":"http://landing_page_of_the_collection", 
	"metadata":
	{
		"title":"<title_of_the_collection>",
		"creator":"<creator>",
		"pubDate":"<publication date>"
	}, 
	"permanent":"false"
}

...