From eaa195a2d93a277834cbc61d5ffca9feebbfb0c8 Mon Sep 17 00:00:00 2001 From: Cesare Date: Thu, 11 Feb 2021 10:09:13 +0100 Subject: [PATCH] Readme updated --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 37985e8..5204dda 100644 --- a/README.md +++ b/README.md @@ -2,19 +2,21 @@ ### Integrating Dataverse with the Language Resource Switchboard. -This repository contains a collection of files that are built according to the [Dataverse external tools interface](https://guides.dataverse.org/en/latest/admin/external-tools.html) in order to make the Clarin [Language Resource Switchboard](https://switchboard.clarin.eu) available through the external tools button on Dataset pages (left). Some of these files also implements data previewer apps for embedded display on Datafile pages (right), these previewers are based on those originally developed by the [Qualitative Data Repository](https://qdr.syr.edu). +This repository contains a collection of files that are built according to the [Dataverse external tools interface](https://guides.dataverse.org/en/latest/admin/external-tools.html) in order to make the Clarin [Language Resource Switchboard](https://switchboard.clarin.eu) available through the external tools button on Dataset pages (left). Some of these files also implements data previewer apps for embedded display on Datafile pages (right): the *Text* and *PDF* previewers are based on those originally developed by the [Qualitative Data Repository](https://qdr.syr.edu), the *GeoJSON previewer* is a basic, experimental, viewer for GeoJSON files developed using the [d3.js](https://d3js.org) library. #### Installation The files can be installed on a Dataverse instance by executing the curl command(s) below to register them with the local Dataverse instance. In alternative the code can be downloaded and used locally. Detailed instructions for a local installation can be found at the [Dataverse Projcet site](https://guides.dataverse.org/en/latest/admin/external-tools.html#). -In the current release there is one file for each mime type, each file can be installed independently from others. +In this release there is one file for each mime type, each file can be installed independently from others. #### Known limitations Files in the current release *do not allow* to send to LRS or to preview restricted content (i.e. non public files). To send a non public file to the Switchboard or to preview it, the permission to access the dataset version containing the file would be required, technically speaking this means that a valid API Token should be used. Instead sending/viewing public content does not require an API Token. -The decision to implement the processing of restricted content depends on the security policy that will be adopted. +The decision to implement the processing of restricted content depends on the security policy that will be adopted. + +The *application/geo+json* mime type is not automatically recognized by Dataverse when uploading a GeoJSON file, to enable the previewer the correct mime type must be manually set the file. The current release has been tested with Dataverse v5.11+, however it should work also with Dataverse releases v4.12+. @@ -43,3 +45,7 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \ "{ \"displayName\":\"Process PDF file with LRS\", \"description\":\"Process a PDF file using LRS.\", \"scope\":\"file\", \"type\":\"explore\", \"hasPreviewMode\":\"false\", \"toolUrl\":\"https://v4e-dock.isti.cnr.it/previewers/SendPDF.html\", \"toolParameters\": { \"queryParameters\":[ {\"fileid\":\"{fileId}\"}, {\"siteUrl\":\"{siteUrl}\"}, {\"key\":\"{apiToken}\"}, {\"datasetid\":\"{datasetId}\"}, {\"datasetversion\":\"{datasetVersion}\"}, {\"locale\":\"{localeCode}\"} ]}, \"contentType\":\"application/pdf\" }" +-- application/geo+json previewer + +curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \ "{ \"displayName\":\"Preview GeoJSON Document\", \"description\":\"Preview a GeoJSON document.\", \"scope\":\"file\", \"type\":\"explore\", \"hasPreviewMode\":\"true\", \"toolUrl\":\"https://v4e-dock.isti.cnr.it/previewers/GeoJSONPreview.html\", \"toolParameters\": { \"queryParameters\":[ {\"fileid\":\"{fileId}\"}, {\"siteUrl\":\"{siteUrl}\"}, {\"key\":\"{apiToken}\"}, {\"datasetid\":\"{datasetId}\"}, {\"datasetversion\":\"{datasetVersion}\"}, {\"locale\":\"{localeCode}\"} ] }, \"contentType\":\"application/geo+json\" }" +