Closed michielbdejong closed 3 years ago
https://prov4itdata.ilabt.imec.be/ uses DCAT, Schema.org, vcard, etc, we should document it here!
@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
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.
An Image Gallery can be represented using schema:ImageGallery
. Furthermore, the images it contains can be linked using the schema:hasPart
property.
A Collection can be modeled through a schema:Collection
, which can be linked to its Image Gallery resources through the schema:hasPart
property.
A Person can be modeled using a schema:Person
.
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
title
description
issued
: date of issuance (e.g publication)dcat:accessURL
SHOULD be used for the URL of a service or location that can provide access to this distribution, typically through a Web form, query or API call.dcat:downloadURL
is preferred for direct links to downloadable resources.dcat:mediaType
: The media type of the distribution as defined by IANAdct:format
: The file format of the distribution.dcat:accessService
, pointing to a dcat:DataService
We can model an Image Gallery as a dcat:Dataset
, which can point to zero or more dcat:Distribution
s.
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:Dataset
s.
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.
schema:ImageObject
.schema:ImageGallery
. The table below shows how its properties are mapped.schema:Collection
class. The table below shows how its properties are mapped.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 |
dcat:Distribution
dcat:Catalog
which can be linked to zero or more dcat:Dataset
s (Albums)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
id
: a unique identifier for that imagelink
: the URL to the imagedescription
: the description of the imageviews
: the number of viewsheight
: height of the imagewidth
: width of the imageAn 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.
dcat:Distribution
.dcat:Dataset
.dcat:Catalog
which can be linked to zero or more dcat:Dataset
s (Albums).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.
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 |
Awesome! Can we somehow merge this new content into the website through a PR?
CC @bjdmeest