Skip to content

Commit

Permalink
release 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bertvannuffelen committed Feb 12, 2024
1 parent 58ceec0 commit 635ad2a
Show file tree
Hide file tree
Showing 28 changed files with 15,273 additions and 17,587 deletions.
206 changes: 133 additions & 73 deletions releases/3.0.0/CHANGELOG.md

Large diffs are not rendered by default.

1,200 changes: 573 additions & 627 deletions releases/3.0.0/context/dcat-ap.jsonld

Large diffs are not rendered by default.

127 changes: 124 additions & 3 deletions releases/3.0.0/html/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ function example_structure(exampleid){
<div id="` + exampleid + `-tabs-1">
<textarea class="validationquery" id="` + exampleid + `-tab1validationquery" name="query" cols="80" rows="16"></textarea>
<button class="buttonsample copyturtletoclipboard" id="` + exampleid + `-tabs-1-button-1">Copy</button>
<button class="buttonsample openTurtleInConverter" id="` + exampleid + `-tabs-1-button-2">Open in Converter</button>
<button class="buttonsample validateTurtle" id="` + exampleid + `-tabs-1-button-3">Validate</button>
</div>
<div id="` + exampleid + `-tabs-2">
<textarea class="validationquery" id="` + exampleid + `-tab2validationquery" name="query" cols="80" rows="16"></textarea>
<button class="buttonsample copyjsonldtoclipboard" id="` + exampleid + `-tabs-2-button-1">Copy</button>
<button class="buttonsample openinplayground" id="` + exampleid + `-tabs-2-button-2">Open in Playground</button>
<button class="buttonsample openJsonldInConverter" id="` + exampleid + `-tabs-2-button-3">Open in Converter</button>
<button class="buttonsample validateJsonld" id="` + exampleid + `-tabs-2-button-4">Validate</button>
</div>
</div>`;
return structure;
Expand Down Expand Up @@ -64,6 +69,89 @@ function myIndexOf(list, val) {
return xmlhttp.responseText;
}

function loadShape(file, dataGraph, format) {
var xmlhttp;
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
} else {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState === 4 && xmlhttp.status !== 200) {
alert('Error when opening the file: ' + file + ' - ' + xmlhttp.status + ' ' + xmlhttp.statusText);
} else if (xmlhttp.readyState === 4 && xmlhttp.status === 200) {
newUrl = "https://shacl-playground.zazuko.com/#page=0&shapesGraph=" + encodeURIComponent(xmlhttp.responseText) + "&shapesGraphFormat=text%2Fturtle&dataGraph=" + encodeURIComponent(dataGraph) + "&dataGraphFormat=" + format ;
//console.log(newUrl);
window.open(newUrl, '_blank');
}
};
xmlhttp.open("GET", file, true);
xmlhttp.send();
return xmlhttp.responseText;
}

var dialog = $("<div>", {
id: "dialog-form",
title: "Validation Result"
}).dialog({
autoOpen: false,
height: 400,
width: 700,
modal: true,
show: { effect: "blind", duration: 400 }
});

function validate(model, version, content, format) {
request = {
"contentToValidate": btoa(content),
"contentSyntax": format,
"embeddingMethod": "BASE64",
"validationType": version,
"reportSyntax": "text/turtle"
};
var itbapi = "https://www.itb.ec.europa.eu/shacl/" + model + "/api/validate" ;
$.ajax({
type: "POST",
url: itbapi,
data: JSON.stringify(request),// now data come in this function
contentType: "application/json; charset=utf-8",
crossDomain: true,
dataType: "text",
success: function (response, status, jqXHR) {
dialog.css("white-space","pre-wrap");
dialog.text(response);
dialog.dialog("open");
reg = /sh:conforms\s+true/g
if(response.search(reg) >=0 )
dialog.closest(".ui-dialog").children(".ui-dialog-titlebar").css({"background": "darkgreen", "background-image": "linear-gradient(to bottom,#6a996a,#006400)","color":"white"});
else
dialog.closest(".ui-dialog").children(".ui-dialog-titlebar").css({"background": "red", "background-image": "linear-gradient(to bottom,#ac6464,#b31c1c)","color":"white"});
},

error: function (jqXHR, exception) {
// error handler
var msg = '';
if (jqXHR.status === 0) {
msg = 'Not connect.\n Verify Network.';
} else if (jqXHR.status == 404) {
msg = 'Requested page not found. [404]';
} else if (jqXHR.status == 500) {
msg = 'Internal Server Error [500].';
} else if (exception === 'parsererror') {
msg = 'Requested JSON parse failed.';
} else if (exception === 'timeout') {
msg = 'Time out error.';
} else if (exception === 'abort') {
msg = 'Ajax request aborted.';
} else {
msg = 'Uncaught Error.\n';
}

alert('It was not possible to validate, msg:' + msg + ' error:' + jqXHR.responseText);
}
});
}

function createTurtleEditorFrom(selector) {
return CodeMirror.fromTextArea(selector, {
mode: "turtle",
Expand Down Expand Up @@ -152,11 +240,44 @@ $(document).ready(function () {
var indexValues = $examples.map(function() { return this.id; }) ;
var index = myIndexOf(indexValues, exampleid);

newUrl = "https://json-ld.org/playground/#startTab=tab-expand&json-ld=" + editors[index].CM1.getValue();
window.open(encodeURI(newUrl), '_blank');
newUrl = "https://json-ld.org/playground/#startTab=tab-expand&json-ld=" + encodeURIComponent(editors[index].CM1.getValue());
window.open(newUrl, '_blank');
return false;
});
$("button.openTurtleInConverter").on('click', function(e) {
var exampleid = $(this).parent().parent().attr("exampleid");
var indexValues = $examples.map(function() { return this.id; }) ;
var index = myIndexOf(indexValues, exampleid);

newUrl = "https://converter.zazuko.com/#value=" + encodeURIComponent(editors[index].CM0.getValue()) + "&format=text%2Fturtle";
window.open(newUrl, '_blank');
return false;
});
$("button.openJsonldInConverter").on('click', function(e) {
var exampleid = $(this).parent().parent().attr("exampleid");
var indexValues = $examples.map(function() { return this.id; }) ;
var index = myIndexOf(indexValues, exampleid);

newUrl = "https://converter.zazuko.com/#value=" + encodeURIComponent(editors[index].CM1.getValue()) + "&format=application%2Fld%2Bjson";
window.open(newUrl, '_blank');
return false;
});
$("button.validateTurtle").on('click', function(e) {
var exampleid = $(this).parent().parent().attr("exampleid");
var indexValues = $examples.map(function() { return this.id; }) ;
var index = myIndexOf(indexValues, exampleid);
var shapes = validate("dcat-ap", "v2.0", editors[index].CM0.getValue(), "text/turtle");
return false;
});
$("button.validateJsonld").on('click', function(e) {
var exampleid = $(this).parent().parent().attr("exampleid");
var indexValues = $examples.map(function() { return this.id; }) ;
var index = myIndexOf(indexValues, exampleid);
var shaclfilepath = "./html/shacl/shapes.ttl" ;
//var shapes = loadShape(shaclfilepath, editors[index].CM1.getValue(), "application%2Fld%2Bjson");
var shapes = validate("dcat-ap", "v2.0", editors[index].CM1.getValue(), "application/ld+json");
return false;
});

$("div.CodeMirror pre").on('click', function(e) {
var et = $(e.target);
if(et.hasClass('cm-url')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@
@prefix dct: <http://purl.org/dc/terms/> .
@prefix example-ds: <https://data.gov.gr/id/dataset/> .
@prefix example-ser: <https://data.gov.gr/id/datasetseries/> .
@prefix example-dist: <https://data.gov.gr/id/distribution/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

example-ds:BeePopulation2023 a dcat:Dataset;
dct:title "Bee population 2023 in the region of Thessaloniki and Athens"@en;
dct:issued "2023-03-21"^^<xsd:date>;
dct:modified "2023-03-21"^^<xsd:date>;
dct:issued "2023-03-21"^^xsd:date;
dct:modified "2023-03-21"^^xsd:date;
dct:spatial <https://sws.geonames.org/734077>,
<https://sws.geonames.org/264371>;
dcat:distribution <example-dist:BeePopulation2023/csv>,
<example-dist:BeePopulation2023/biojson>;
dcat:inSeries example-ser:BeePopulation;
dcat:prev example-ds:BeePopulation2022 .

<example-dist:BeePopulation2023/biojson> a dcat:Distribution .
example-dist:BeePopulation2023/biojson a dcat:Distribution .

<example-dist:BeePopulation2023/csv> a dcat:Distribution .
example-dist:BeePopulation2023/csv a dcat:Distribution .
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"title": {
"en" : "Bee population"
},
"last": "example-ds:BeePopulation2022"
"last": "example-ds:BeePopulation2023"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
@prefix dct: <http://purl.org/dc/terms/> .
@prefix example-ds: <https://data.gov.gr/id/dataset/> .
@prefix example-ser: <https://data.gov.gr/id/datasetseries/> .
@prefix example-dist: <https://data.gov.gr/id/distribution/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

example-ds:BeePopulationLive a dcat:Dataset;
dct:title "life counts of the Bee population in Greece"@en;
dct:issued "2023-03-21"^^<xsd:date>;
dct:issued "2023-03-21"^^xsd:date;
dct:spatial <https://www.geonames.org/390903>;
dcat:inSeries example-ser:BeePopulation .

Expand All @@ -18,37 +20,37 @@ example-ds:BeePopulationLive a dcat:Dataset;

example-ds:BeePopulation2023 a dcat:Dataset;
dct:title "Bee population 2023 in the region of Thessaloniki and Athens"@en;
dct:issued "2023-03-21"^^<xsd:date>;
dct:modified "2023-03-21"^^<xsd:date>;
dct:issued "2023-03-21"^^xsd:date;
dct:modified "2023-03-21"^^xsd:date;
dct:spatial <https://sws.geonames.org/734077>,
<https://sws.geonames.org/264371>;
dcat:distribution <example-dist:BeePopulation2023/csv>,
<example-dist:BeePopulation2023/biojson>;
dcat:inSeries example-ser:BeePopulation;
dcat:prev example-ds:BeePopulation2022 .

<example-dist:BeePopulation2023/biojson> a dcat:Distribution .
example-dist:BeePopulation2023/biojson a dcat:Distribution .

<example-dist:BeePopulation2023/csv> a dcat:Distribution .
example-dist:BeePopulation2023/csv a dcat:Distribution .

example-ds:BeePopulation2022 a dcat:Dataset;
dct:title "Bee population 2022 in the region of Thessaloniki"@en;
dct:issued "2022-03-01"^^<xsd:date>;
dct:modified "2022-03-20"^^<xsd:date>;
dct:issued "2022-03-01"^^xsd:date;
dct:modified "2022-03-20"^^xsd:date;
dct:spatial <https://sws.geonames.org/734077>;
dcat:inSeries example-ser:BeePopulation;
dcat:prev example-ds:BeePopulation2000 .

example-ds:BeePopulation2000 a dcat:Dataset;
dct:title "Bee population 2000 in Greece"@en;
dct:issued "2023-06-01"^^<xsd:date>;
dct:modified "2023-06-01"^^<xsd:date>;
dct:issued "2023-06-01"^^xsd:date;
dct:modified "2023-06-01"^^xsd:date;
dct:spatial <https://www.geonames.org/390903>;
dcat:inSeries example-ser:BeePopulation .

example-ser:BeePopulation a dcat:DatasetSeries;
dct:title "Bee population"@en;
dct:issued "2022-04-01"^^<xsd:date>;
dct:modified "2023-06-01"^^<xsd:date>;
dct:issued "2022-04-01"^^xsd:date;
dct:modified "2023-06-01"^^xsd:date;
dct:spatial <https://www.geonames.org/390903>;
dcat:last example-ds:BeePopulation2022 .
dcat:last example-ds:BeePopulation2023 .
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"title": {
"en" : "Bee population"
},
"last": "example-ds:BeePopulation2022"
"last": "example-ds:BeePopulation2023"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ example-ds:BeePopulation2023 a dcat:Dataset;
example-ser:BeePopulation a dcat:DatasetSeries;
dct:title "Bee population"@en;
dct:accrualPeriodicity nal-frequency:ANNUAL;
dcat:last example-ds:BeePopulation2022 .
dcat:last example-ds:BeePopulation2023 .
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"title": {
"en" : "Bee population"
},
"last": "example-ds:BeePopulation2022"
"last": "example-ds:BeePopulation2023"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,32 @@
@prefix example-ds: <https://data.gov.gr/id/dataset/> .
@prefix example-ser: <https://data.gov.gr/id/datasetseries/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .


example-ds:BeePopulation2000 a dcat:Dataset;
dct:title "Bee population 2000 in Greece"@en;
dct:issued "2023-06-01"^^<xsd:date>;
dct:issued "2023-06-01"^^xsd:date;
dct:spatial <https://www.geonames.org/390903>;
dcat:inSeries example-ser:BeePopulation .

example-ds:BeePopulation2022 a dcat:Dataset;
dct:title "Bee population 2022 in the region of Thessaloniki"@en;
dct:issued "2022-03-01"^^<xsd:date>;
dct:issued "2022-03-01"^^xsd:date;
dct:spatial <https://sws.geonames.org/734077>;
dcat:inSeries example-ser:BeePopulation;
dcat:prev example-ds:BeePopulation2000 .

example-ds:BeePopulation2023 a dcat:Dataset;
dct:title "Bee population 2023 in the region of Thessaloniki and Athens"@en;
dct:issued "2023-03-21"^^<xsd:date>;
dct:issued "2023-03-21"^^xsd:date;
dct:spatial <https://sws.geonames.org/734077>,
<https://sws.geonames.org/264371>;
dcat:inSeries example-ser:BeePopulation;
dcat:prev example-ds:BeePopulation2022 .

example-ser:BeePopulation a dcat:DatasetSeries;
dct:title "Bee population"@en;
dct:issued "2022-04-01"^^<xsd:date>;
dct:issued "2022-04-01"^^xsd:date;
dct:spatial <https://www.geonames.org/390903>;
dcat:last example-ds:BeePopulation2022 .
dcat:last example-ds:BeePopulation2023 .
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"title": {
"en" : "Bee population"
},
"last": "example-ds:BeePopulation2022"
"last": "example-ds:BeePopulation2023"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@
@prefix example-ds: <https://data.gov.gr/id/dataset/> .
@prefix example-ser: <https://data.gov.gr/id/datasetseries/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .


example-ds:BeePopulation2022 a dcat:Dataset;
dct:title "Bee population 2022 in the region of Thessaloniki"@en;
dct:issued "2022-03-01"^^<xsd:date>;
dct:issued "2022-03-01"^^xsd:date;
dct:spatial <https://sws.geonames.org/734077>;
dcat:inSeries example-ser:BeePopulation;
dcat:prev example-ds:BeePopulation2000 .

example-ds:BeePopulation2023 a dcat:Dataset;
dct:title "Bee population 2023 in the region of Thessaloniki and Athens"@en;
dct:issued "2023-03-21"^^<xsd:date>;
dct:issued "2023-03-21"^^xsd:date;
dct:spatial <https://sws.geonames.org/734077>,
<https://sws.geonames.org/264371>;
dcat:inSeries example-ser:BeePopulation;
dcat:prev example-ds:BeePopulation2022 .

example-ser:BeePopulation a dcat:DatasetSeries;
dct:title "Bee population"@en;
dct:issued "2022-04-01"^^<xsd:date>;
dct:issued "2022-04-01"^^xsd:date;
dct:spatial <https://sws.geonames.org/734077>,
<https://sws.geonames.org/264371>;
dcat:last example-ds:BeePopulation2022 .
dcat:last example-ds:BeePopulation2023 .
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
@prefix example-ds: <https://data.gov.gr/id/dataset/> .
@prefix example-ser: <https://data.gov.gr/id/datasetseries/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .


example-ds:BeePopulationLive a dcat:Dataset;
dct:title "life counts of the Bee population in Greece"@en;
dct:issued "2023-03-21"^^<xsd:date>;
dct:issued "2023-03-21"^^xsd:date;
dct:spatial <https://www.geonames.org/390903>;
dcat:inSeries example-ser:BeePopulation;
dcat:prev example-ds:BeePopulation2023 .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"title": {
"en" : "Bee population"
},
"last": "example-ds:BeePopulation2022"
"last": "example-ds:BeePopulation2023"
}
]
}
Loading

0 comments on commit 635ad2a

Please sign in to comment.