DSpace 7: Open for Integration Open Repositories 2019, Hamburg, June - - PowerPoint PPT Presentation

dspace 7 open for integration
SMART_READER_LITE
LIVE PREVIEW

DSpace 7: Open for Integration Open Repositories 2019, Hamburg, June - - PowerPoint PPT Presentation

DSpace 7: Open for Integration Open Repositories 2019, Hamburg, June 10-13 Andrea Bollini, 4Science Luigi Andrea Pascarell, 4Science About To adopt a Repository-as-a-Service model, support different users and communities, it is crucial to be


slide-1
SLIDE 1

DSpace 7: Open for Integration

Andrea Bollini, 4Science Luigi Andrea Pascarell, 4Science

Open Repositories 2019, Hamburg, June 10-13

slide-2
SLIDE 2

To adopt a Repository-as-a-Service model, support different users and communities, it is crucial to be able to interact with the repository with different, unanticipated patterns and modalities embedding the repository in existing workflows, connecting and combining tools.

About

slide-3
SLIDE 3

Why a new REST API?

Covers only a subset of DSpace functionality Not based on current REST best practices

  • r standards

Handcrafted in Jersey, while most DSpace code uses Spring technologies

4.x - 6.x

No search No submit / workflows Limited admin operations Limited write / delete (4.x was read only)

slide-4
SLIDE 4

All features MUST be in REST API (for Angular UI) Defined REST Contract. HATEOAS, ALPS, HAL format Built using Spring technologies (Spring Boot, MVC, HATEOAS) Bonus: better third-party app integration!

7.x

{ REST }

Why a new REST API?

slide-5
SLIDE 5

REST Maturity Level

Image from: https://martinfowler.com/articles/richardsonMaturityModel.html

{ REST }

HATEOAS = Hypertext As The Engine Of Application State Allow the client to discover the “next step” HAL = Hypertext Application Language (JSON or XML) Talk a simple standard language ALPS = Application Level Profile Semantics Be specific about your expectation and promise

slide-6
SLIDE 6

You can use the command line…

curl "https://dspace7.4science.cloud/dspace-spring-rest/api"

But, there are better ways… using a REST client

Interacting with a REST API

slide-7
SLIDE 7
  • The Official REST Demo public instance (provided by 4Science)

https://dspace7.4science.it/dspace-spring-rest/

  • Navigate to the link above to explore

HAL Browser

slide-8
SLIDE 8
slide-9
SLIDE 9

Request + Headers

slide-10
SLIDE 10

Response Headers

HTTP Status code

slide-11
SLIDE 11

Response Body

RAW JSON Response The HAL Browser will parse the key elements: _links _embedded Everything else

slide-12
SLIDE 12

HAL Document

slide-13
SLIDE 13

Response Properties

slide-14
SLIDE 14

Links: All endpoints are available from the Entry Point

slide-15
SLIDE 15

Communities Endpoint Response

Communities endpoint Pagination properties

slide-16
SLIDE 16

Links - A generic approach to paginated results

slide-17
SLIDE 17

Embedded Community Properties

slide-18
SLIDE 18

Embedded Community Links

slide-19
SLIDE 19

On a COLLECTION Endpoint (“set of all” items, communities, etc.)

  • POST Adds a new element to the collection
  • GET Returns the first page of the resources in the collection

On a single RESOURCE Endpoint (specific item, collection, etc)

  • GET Returns a single entity
  • HEAD Returns whether the item resource is available
  • PUT Replaces the state
  • PATCH Similar to PUT but partially updating the resources state
  • DELETE Deletes the resource exposed

Right use of the HTTP Verbs

slide-20
SLIDE 20
  • uniform, consistent and self-documented behaviour
  • full functional coverage, both for anonymous user and privileged

users

  • stable, well documented and fully tested solution so that

integration will not easily break from one version to another ○ Test-Driven Development ○ Contract first approach

Reliable, stable and automatically tested

76% Test Coverage, mainly Integration Test

{ REST }

slide-21
SLIDE 21

Supported Integration Scenarios

slide-22
SLIDE 22

Reuse of the information

{ REST }

Embedding Javascript code “Badge” in personal websites List of departments and research group publications Complete backend integration with search, browse, editing capabilities

slide-23
SLIDE 23

Data acquisition

{ REST }

slide-24
SLIDE 24

Data acquisition

{ REST }

raw

slide-25
SLIDE 25

Wide Institutional Process - Theses

Fill form to request Thesis assignation in the Student Management System

{ REST }

Student completes the submission uploading the Thesis in the repository

{ REST }

An external Anti-Plagiarism system will analyze the Thesis Advisor approves

{ REST }

Graduation recorded in the Student Management System

slide-26
SLIDE 26
  • 1. quick prototyping end users functionalities
  • a. notification services of pending tasks, unfinished submissions, …
  • b. reporting tools: usage, content and workflow statistics
  • 2. extraction and external batch processing of the data in the

developer preferred programming language

  • 3. data crawling and enrichment

More and more

… there are indeed no limits to the integrations that can be implemented

slide-27
SLIDE 27

«Alexa, ask DSpace demo for the number of items»

Do you want to talks with DSpace?

«Alexa, ask DSpace demo to search for molecular »

«Alexa, ask DSpace demo for information about John Smith»

slide-28
SLIDE 28
slide-29
SLIDE 29

Andrea Bollini, 4Science andrea.bollini@4science.it https://orcid.org/0000-0002-9029-1854