This API is a proof-of-concept of the implementation of GeoDCAT-AP in an OGC CSW (Catalog Service for the Web), re-using the standard CSW interface, and supporting in addition HTTP content negotiation.
More precisely, GeoDCAT-API uses the standard CSW parameters outputSchema
and outputFormat
to determine, respectively, (a) the GeoDCAT-AP profile to be used (core or extended), and (b) the RDF serialisation to be returned.
The document containing the ISO 19139 records to be transformed is specified by a GeoDCAT-API-specific parameter src
, which is not part of the CSW interface.
The API uses the GeoDCAT-AP XSLT to transform ISO 19139 records into GeoDCAT-AP. As such, the API works both on static files including the records, and on the CSW output of a GetRecords
or GetRecordById
request.
A working demo of GeoDCAT-API is available at:
http://geodcat-ap.semic.eu/api/
The current version of GeoDCAT-API supports only the HTTP GET
method. As a consequence, it can be used only on CSWs supporting GET
requests.
Parameter | Description | Possible values | Default value | Notes | |
---|---|---|---|---|---|
ouputSchema |
The GeoDCAT-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 GeoDCAT-AP, when available. |
extended | (GeoDCAT-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 ISO 19139 records to be tranformed | A URL | N/A |
Besides the resulting RDF serialisation of the source ISO 19139 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 |
ISO 19139 |
The URL of the source document, containing the ISO 19139 records. |
profile |
The media type of the document returned by the API. | DCAT-AP |
core |
GeoDCAT-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. |
GeoDCAT-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.
GeoDCAT-API has been tested on both Linux and Windows, with Apache 2 and PHP 5.3.2 (or later) installed and running.
NB: GeoDCAT-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:
- Go to folder
./lib/composer/
. - Download Composer. E.g.:
curl -s https://getcomposer.org/installer | php
- Run
php composer.phar install
You will now be able to run the API from a Web folder.
- Docker (Or Docker Desktop for
docker-compose
)
- Navigate into
api
folder in your terminal. - Run
docker-compose up
. - Open the browser and navigate to
http://localhost
.
- Navigate into
api
folder in your terminal. - Build a docker image with the following command
docker build .
. - Start a container with the built image with the following command
docker run -p 80:80 IMAGE_ID
- You can find the
IMAGE_ID
by runningdocker images
.
- You can find the
- Open the browser and navigate to
http://localhost
.