Skip to content

Latest commit

 

History

History

api

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

The CiteDCAT-AP API (CiteDCAT-API)

This API is a proof-of-concept of the implementation of CiteDCAT-AP in an OAI-PMH endpoint, re-using the standard OAI-PMH interface, and supporting in addition HTTP content negotiation.

More precisely, CiteDCAT-API uses the standard OAI-PMH parameter metadataPrefix to determine the CiteDCAT-AP profile to be used (core or extended).

The document containing the DataCite records to be transformed is specified by parameter src, whereas parameter outputFormat determines the RDF serialisation to be returned. Both these parameters are not part of the OAI-PMH interface.

The API uses the CiteDCAT-AP XSLT to transform DataCite records into CiteDCAT-AP. As such, the API works both on static files including the records, and on the OAI-PMH endpoint output of a ListRecords or GetRecord request.

API specification

Supported HTTP methods

The current version of CiteDCAT-API supports only the HTTP GET method. As a consequence, it can be used only on OAI-PMH endpoints supporting GET requests.

API parameters

Request

Parameter Description Possible values Default value Notes
metadataPrefix The CiteDCAT-AP profile to be used for the transformation core(DCAT-AP) core

If this parameter is omitted, the API uses the "core" profile as default.

The "core" profile is labelled "DCAT-AP", since it returns just the metadata elements supported in DCAT-AP.

NB: The current values of this parameter are provisional, and they are meant to be replaced by the official namespace URIs of DCAT-AP and CiteDCAT-AP, when available.

extended(CiteDCAT-AP)
outputFormat The RDF serialisation to be returned application/rdf+xml(RDF/XML) N/A If this parameter is omitted, the returned RDF serialisation is determined via HTTP content negotiation
text/turtle(Turtle)
text/n3(Notation 3)
application/n-triples(N-Triples)
application/ld+json(JSON-LD)
text/html(HTML+RDFa)
src The URL of the resource containing the DataCite records to be tranformed A URL N/A

Response

Besides the resulting RDF serialisation of the source DataCite records, the API returns a set of HTTP Link headers, and the corresponding HTML LINK elements in the HTML+RDFa serialisation.

Relation type Type Title Target URI
derivedfrom application/xml DataCite The URL of the source document, containing the DataCite records.
profile The media type of the document returned by the API. DCAT-AP core
CiteDCAT-AP extended
self The media type of the document returned by the API. The name of the returned RDF serialisation. The URL of the document returned by the API.
alternate The media types of the alternative RDF serialisations supported by the API. The name of the relevant RDF serialisation. The URL of the document, encoded with the relevant RDF serialisation, as would be returned by the API.

Implementation details

CiteDCAT-API is implemented in PHP5, and runs on top of an Apache 2 HTTP server.

The EasyRDF and the ML/JSON-LD PHP libraries are used to generate the supported RDF serialisations. The HTML+RDFa serialisation is generated by using the DCAT-AP in HTML+RDFa XSLT.

Installation instructions

CiteDCAT-API has been tested on both Linux and Windows, with Apache 2 and PHP 5.3.2 (or later) installed and running.

NB: CiteDCAT-API makes use of the PHP XSL extension.

The repository includes all what is necessary, with the exception of EasyRDF and ML/JSON-LD, that must be installed separately by using Composer.

More precisely:

You will now be able to run the API from a Web folder.