CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 2
Using Prizms
Following steps install Prizms on our server.
- Base domain: https://locv.tw.rpi.edu
- Git repo: git@github.com:timrdf/locv.git
- datahub.io entry: https://datahub.io/dataset/locv
Get curl:
sudo apt-get update; sudo apt-get install curl
Get Prizms:
cd; bash < <(curl -sL https://purl.org/twc/install/prizms | grep -v "^#..bin/bash$")
Install Prizms using 8 configuration parameters:
opt/prizms/bin/install.sh --me https://tw.rpi.edu/instances/TimLebo --proj-user locv --repos git@github.com:timrdf/locv.git --upstream-ckan --our-base-uri https://locv.tw.rpi.edu --our-source-id us --our-datahub-id locv
First, we get a copy of the repository:
git clone git@github.com:timrdf/locv.git
We can then record access metadata for the BMS-26 dataset listed at https://lmb.informatik.uni-freiburg.de/resources/datasets/moseg.en.html using the following csv2rdf4lod commands. The access metadata ends up in our GitHub repository at access.ttl and page.ttl.
bash-3.2$ cd locv/data/source
bash-3.2$ cr-dcat-retrieval-url.sh bms-26 https://lmb.informatik.uni-freiburg.de/resources/datasets/moseg_dataset.zip
Q: Make directory for source-id/dataset-id: "lmb-informatik-uni-freiburg-de/bms-26" ? [y/n] y
source/lmb-informatik-uni-freiburg-de/bms-26/access.ttl
bash-3.2$ cd lmb-informatik-uni-freiburg-de/bms-26/
bash-3.2$ cr-page.sh https://lmb.informatik.uni-freiburg.de/resources/datasets/moseg.en.html
source/lmb-informatik-uni-freiburg-de/bms-26/page.ttl
bash-3.2$ git add -f page.ttl access.ttl
bash-3.2$ git commit -m 'bms-26 metadata'
bash-3.2$ git push
Based on the new metadata in the repository (i.e, the access.ttl file), the Prizms server will:
- recognize the access metadata,
- set up a new versioned dataset,
- download the zip (capturing its provenance)
- analyze the file formats of the zip and its contents,
- extract the zip (capturing its provenance)
For example, for the dataset source/vision-mas-ecp-fr/facades-benchmark-2011
, Prizms set up a new version version/2011-May-31
with a source/
directory containing the files:
cr-droid.ttl
ground_truth_2011.zip monge_42.png
ground_truth_2011.zip.prov.ttl monge_42.png.prov.ttl
source/ground_truth_2011.zip.prov.ttl
contains the provenance of downloading the zip from https://vision.mas.ecp.fr:
<ground_truth_2011.zip>
a nfo:FileDataObject, prov:Entity, pmlp:Information;
prov:wasQuotedFrom <https://vision.mas.ecp.fr/Personnel/teboul/files/ground_truth_2011.zip>;
prov:qualifiedQuotation <quotation_7077d5c3-6c21-45c5-8533-d32d8678b7b3>;
.
<quotation_7077d5c3-6c21-45c5-8533-d32d8678b7b3>
a prov:Quotation;
prov:entity <https://vision.mas.ecp.fr/Personnel/teboul/files/ground_truth_2011.zip>;
prov:atTime "2014-02-06T17:09:07+00:00"^^xsd:dateTime;
.
cr-droid.ttl
includes file format and zip containment metadata:
@prefix dcterms: <https://purl.org/dc/terms/> .
<ground_truth_2011.zip>
dcterms:format <https://provenanceweb.org/formats/pronom/x-fmt/263> .
dcterms:hasPart <ground_truth_2011.zip/monge_42.png>;
.
<ground_truth_2011.zip/monge_42.png>
dcterms:isPartOf <ground_truth_2011.zip>;
dcterms:format <https://provenanceweb.org/formats/pronom/fmt/11>;
.
<monge_42.png> dcterms:format <https://provenanceweb.org/formats/pronom/fmt/11> .
source/monge_42.png.prov.ttl
contains the provenance of extracting monge_42.png
from ground_truth_2011.zip
:
<monge_42.png>
a pmlp:Information, prov:Entity;
prov:wasQuotedFrom <ground_truth_2011.zip>;
All of the provenance and metadata (in RDF) gets published as the dataset with URI https://locv.tw.rpi.edu/source/vision-mas-ecp-fr/dataset/facades-benchmark-2011/version/2011-May-31. That dataset will mention the zip file that we downloaded (e.g. ground_truth_2011.zip), and the image files that we extracted from it (e.g. monge_42.png). So, the data can be accessed by walking/querying its RDF metadata descriptions.
results of:
PREFIX foaf: <https://xmlns.com/foaf/0.1/>
PREFIX dcterms: <https://purl.org/dc/terms/>
SELECT *
WHERE {
GRAPH <https://locv.tw.rpi.edu/source/vision-mas-ecp-fr/dataset/facades-benchmark-2011/version/2011-May-31> {
?s dcterms:format ?o
}
}