From f93a441065a611cc32874dde67e53a8295c87baf Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 27 May 2018 15:48:25 +0200 Subject: [WIP] Add validation --- scripts/fetch_schemas.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 scripts/fetch_schemas.sh (limited to 'scripts') diff --git a/scripts/fetch_schemas.sh b/scripts/fetch_schemas.sh new file mode 100755 index 00000000..ae0baf16 --- /dev/null +++ b/scripts/fetch_schemas.sh @@ -0,0 +1,45 @@ +#!/bin/sh + +# dc +curl https://www.dublincore.org/specifications/dublin-core/dcmi-terms/dublin_core_elements.ttl \ + | tools/serd-filter -I turtle -O turtle -v '?s ?o .' \ + | tools/serd-filter -I turtle -O turtle -v '?s ?o .' \ + | tools/serd-filter -I turtle -O turtle -v '?s ?o .' \ + | tools/serd-sort -I turtle -O turtle > ../schemas/dc.ttl + +# dcterms +curl http://www.dublincore.org/specifications/dublin-core/dcmi-terms/dublin_core_terms.ttl \ + | cat <(echo -e '@prefix dc: .\n@prefix dcam: .\n@prefix dcterms: .\n@prefix xsd: .\n') - \ + | tools/serd-sort -I turtle -O turtle \ + > ../schemas/dcterms.ttl + +# dcam +curl https://www.dublincore.org/specifications/dublin-core/dcmi-terms/dublin_core_abstract_model.ttl \ + | tools/serd-sort -I turtle -O turtle > ../schemas/dcam.ttl + +# rdf +curl http://www.w3.org/1999/02/22-rdf-syntax-ns# \ + | tools/serd-sort -I turtle -O turtle > ../schemas/rdf.ttl + +# rdfs +curl http://www.w3.org/2000/01/rdf-schema# \ + | tools/serd-sort -I turtle -O turtle > ../schemas/rdfs.ttl + +# owl +curl http://www.w3.org/2002/07/owl# \ + | tools/serd-filter -I turtle -O turtle -v '?s ?o .' \ + | tools/serd-filter -I turtle -O turtle -v '?s ?o .' \ + | tools/serd-sort -I turtle -O turtle \ + | sed -e "s/\r//g" > ../schemas/owl.ttl + +# doap +curl https://raw.githubusercontent.com/ewilderj/doap/master/schema/doap.rdf \ + | rapper -o turtle - 'http://example.org/' \ + | tools/serd-filter -I turtle -O turtle -v '?s ?o .' \ + | tools/serd-sort -I turtle -O turtle > ../schemas/doap.ttl + +# foaf +curl http://xmlns.com/foaf/spec/index.rdf \ + | rapper -o turtle - 'http://example.org/' \ + | tools/serd-sort -I turtle -O turtle > ../schemas/foaf.ttl + -- cgit v1.2.1