pdsinterop / conventions

Conventions around how apps and services store data on your personal data store
https://pdsinterop.org/conventions/
4 stars 2 forks source link

Add conventions from Prov4ITData #1

Closed michielbdejong closed 3 years ago

michielbdejong commented 3 years ago

CC @bjdmeest

michielbdejong commented 3 years ago

https://prov4itdata.ilabt.imec.be/ uses DCAT, Schema.org, vcard, etc, we should document it here!

gertjandemulder commented 3 years ago

@michielbdejong , the following documents the way we modelled the resources from different service providers (i.e. Flickr, Imgur, Google).

Our toolchain is extensible to a wide variety of services. We opted to initially support Flickr and Imgur. Both services share a common purpose: uploading and sharing image-content. However, despite this commonality, they differ in various aspects such as the underlying data model and how the resources should be accessed. Additionally, we support the Google People API. This latter connector has a similar access method to Imgur (JSON Web API via OAuth 2.0), but contains data in a very different data model.

There are four different resources to model

Schema.org

Image

Images can be mapped to schema:ImageObject-resources, which inherits properties from schema:MediaObject that can be used for describing the height, width, and more.

Image Gallery

An Image Gallery can be represented using schema:ImageGallery. Furthermore, the images it contains can be linked using the schema:hasPart property.

Collection

A Collection can be modeled through a schema:Collection, which can be linked to its Image Gallery resources through the schema:hasPart property.

Person

A Person can be modeled using a schema:Person.

DCAT

Image

We can model an Image as a dcat:Distribution.

dcat:Distribution A specific representation of a dataset. A dataset might be available in multiple serializations that may differ in various ways, including natural language, media-type or format, schematic organization, temporal and spatial resolution, level of detail or profiles (which might specify any or all of the above).

The dcat:Distribution class has the following properties

Image gallery

We can model an Image Gallery as a dcat:Dataset, which can point to zero or more dcat:Distributions.

Collection

DCAT contains a dcat:Catalog class, a curated collection of metadata about resources (e.g., datasets and data services in the context of a data catalog). A dcat:Catalog can be linked to zero or more dcat:Datasets.

Flickr

Flickr is an online photo management and sharing application. Its resources are made available through the Flickr API. Flickr follows the OAuth1.0a protocol which requires that requests to protected resources are signed using the Consumer Secret and Token Secret. By specifying the protocol in the RML Mapping the RMLMapper-JAVA takes care of the necessary steps for creating requests to protected resources. This also contributes to the extensibility of our solution: when a service decides to change to another protocol, only changes to the RML Mapping must be made. Hence, avoiding the need for rebuilding code.

Using Schema.org

Flickr Photoset resource schema:ImageGallery
id schema:identifier
title._content schema:name
description._content schema:description
Flickr Collection resource schema:Collection
id schema:identifier
title schema:name
description schema:description

Using DCAT

Imgur

Imgur, an image hosting and sharing website, enables its users to quickly upload and share images and GIFs on social media platforms (e.g. Reddit, Twitter, etc.). Unlike the Flickr API, the Imgur API uses OAuth 2.0. When making requests for protected resources it suffices to add a bearer token to the HTTP headers.

The data fields mapped from the Imgur image resources are

Using Schema.org

An Imgur image can be mapped to a schema:ImageObject, along with the following properties:

Imgur image resource schema:ImageObject
id schema:identifier
title schema:name
description schema:description
link schema:url *
schema:image *
type schema:encodingFormat
height schema:height
width schema:width
views schema:interactionStatistic

*Multiple properties are suitable for mapping the link property.

Using DCAT

Google People API

Using the Google People API we can transfer our Google contacts.

Please note that this use case can be extended easily to other Google Products.

Using Schema.org

A Google contact can be mapped to a schema:Person, along with the following properties:

Google contact resource schema:Person
givenName schema:givenName
familyName schema:familyName
displayName schema:alternativeName
michielbdejong commented 3 years ago

Awesome! Can we somehow merge this new content into the website through a PR?