Skip to content
Snippets Groups Projects
Unverified Commit fd2cc880 authored by AJRubio-Montero's avatar AJRubio-Montero Committed by GitHub
Browse files

Merge pull request #11 from lagoproject/dev

Consolidate DMP 1.1 version
parents e743f058 77ded964
No related branches found
No related tags found
No related merge requests found
<!--
################################################################################
# Original Author: A.J. Rubio-Montero (http://orcid.org/0000-0001-6497-753X), #
# CIEMAT - Sci-Track Group (http://rdgroups.ciemat.es/web/sci-track), #
# for the EOSC-Synergy project (EU H2020 RI Grant No 857647). #
# License (SPDX): BSD-3-Clause (https://opensource.org/licenses/BSD-3-Clause) #
# Copyright (c): 2020-today, The LAGO Collaboration (http://lagoproject.net) #
################################################################################
-->
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script>
function itemnize_json( json, context, link ) {
var html ='';
if ( (link == false) || (typeof(json) === 'boolean') ) return json;
if ( typeof(json) === 'string' ) {
var element = json.split(':');
var innid = element[0];
var vocab = "@vocab";
if (element.length == 2) {
if ( (element[0] !== "http") && (element[0] !== "https") ) {
innid = element[1];
vocab = element[0];
} else return '<a href="'+ json +'">'+ json +'</a>';
} else return json;
var contexturl = context[vocab];
if ( vocab == "lago" ) {
contexturl = 'https://lagoproject.github.io/DMP/schema/lagoSchema/';
innid = json;
};
if ( contexturl[contexturl.length-1] !== '#' ) contexturl = contexturl + '#';
if ( vocab == "sdo" ) contexturl = context[vocab];
html = '<a href="'+ contexturl + innid +'">'+ json +'</a>';
} else {
if ( !(Array.isArray(json)) ) {
var json_aux = [];
json_aux.push(json);
json = json_aux;
};
for (var j=0; j<json.length; j++) {
var inner_json = json[j];
if ( !(typeof(json[j]) === 'string') ) {
if ("@id" in json[j]) {
inner_json = json[j]["@id"];
} else {
inner_json = JSON.stringify(json[j]);
link = false;
};
};
html = html + '<br />' + itemnize_json(inner_json, context, link);
};
};
return html;
};
function gmap_static(lat, long, type) {
return '<div style="width: 100%"><iframe class="iframe" src="https://maps.google.com/?ll='+lat+','+long+'&amp;z=13&amp;t='+type+'amp;iwloc=B&amp;output=embed" height="200" allowfullscreen></iframe></div>';
};
$().ready(function(){
$.getJSON( "{{ include.folder }}", function( data ) {
var graphelements = data["@graph"];
for (var i=0; i<graphelements.length; i++) {
var element = graphelements[i];
var id = element["@id"];
var indexhtml = '<li><a href="#'+id+'"><strong>'+id+'</strong> ['+element["name"]+'].'+'</a></li>';
var headerhtml = '<h5 id="'+id+'"><a href="#'+id+'" class="anchor-heading" aria-labelledby="'+id+'"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a><strong>'+id+'</strong></h5>';
headerhtml = headerhtml+'<p>'+'Site located in '+element["name"];
if (["qualifiedAttribution"]["name"] !== "") {
headerhtml = headerhtml+' and managed by '+element["qualifiedAttribution"]["name"];
};
headerhtml = headerhtml+'.'+'</p>';
if ("comment" in element) {
headerhtml = headerhtml+'<p>'+ element["comment"][0]["@value"]+'</p>';
};
headerhtml = headerhtml+gmap_static(element["geometry"]["geo:latitude"],element["geometry"]["geo:longitude"],"k");
if (element["lago:belongsLago"]) {
$('#iproperties').append(indexhtml);
$('#properties').append(headerhtml);
} else {
$('#iclasses').append(indexhtml);
$('#classes').append(headerhtml);
};
var keysUP = Object.keys(element);
keysUP.splice(keysUP.indexOf("@id"),1);
keysUP.splice(keysUP.indexOf("@type"),1);
keysUP.splice(keysUP.indexOf("comment"),1);
keysUP.splice(keysUP.indexOf("name"),1);
keysUP.splice(keysUP.indexOf("lago:belongsLago"),1);
keysUP.splice(keysUP.indexOf("qualifiedAttribution"),1);
table = '<ul> The default propierties defined for <strong>'+ id + '</strong> site are:' ;
for (var up=0; up<keysUP.length; up++) {
var keys = Object.keys(element[keysUP[up]]);
table = table + '<li>'+ itemnize_json(keysUP[up], data["@context"], true )+' :';
table = table + '<table class="grid" style="width: 100%">
<thead>
<tr class="header">';
for (var k=0; k<keys.length; k++) {
table = table + ' <th>'+ itemnize_json([keys[k]], data["@context"], true ) + '</th>';
};
table = table +' </tr>
</thead>
<tbody>
<tr>';
for (var k=0; k<keys.length; k++) {
table = table +' <td>'+ itemnize_json(element[keysUP[up]][keys[k]] , data["@context"], true ) +'</td>';
};
table = table +' </tr>
</tbody>
</table>';
table = table + '</li>';
};
table = table + '</ul>';
if (element["lago:belongsLago"]) {
$('#properties').append(table);
} else {
$('#classes').append(table);
};
};
});
});
</script>
{% if include.vocabulary == "true" %}
- [**Classes**](#classes)
<ul id="iclasses"></ul>
- [**Properties**](#properties)
<ul id="iproperties"></ul>
### Classes
<div id="classes"></div>
### Properties
<div id="properties"></div>
{% else %}
- [**Official LAGO sites**](#lago)
<ul id="iproperties"></ul>
- [**non-LAGO sites**](#non-lago)
<ul id="iclasses"></ul>
### Official LAGO sites
<div id="properties"></div>
### non-LAGO sites
<div id="classes"></div>
{% endif %}
...@@ -20,13 +20,15 @@ function itemnize_json( json, context, link ) { ...@@ -20,13 +20,15 @@ function itemnize_json( json, context, link ) {
if ( (element[0] !== "http") && (element[0] !== "https") ) { if ( (element[0] !== "http") && (element[0] !== "https") ) {
innid = element[1]; innid = element[1];
vocab = element[0]; vocab = element[0];
} else return json; } else return '<a href="'+ json +'">'+ json +'</a>';
}; } else return json;
var contexturl = context[vocab]; var contexturl = context[vocab];
if ( vocab == "lago" ) contexturl = ''; if ( vocab == "lago" ) {
contexturl = 'https://lagoproject.github.io/DMP/schema/lagoSchema/';
innid = json;
};
if ( contexturl[contexturl.length-1] !== '#' ) contexturl = contexturl + '#'; if ( contexturl[contexturl.length-1] !== '#' ) contexturl = contexturl + '#';
if ( vocab == "sdo" ) contexturl = context[vocab]; if ( vocab == "sdo" ) contexturl = context[vocab];
else innid = json;
html = '<a href="'+ contexturl + innid +'">'+ json +'</a>'; html = '<a href="'+ contexturl + innid +'">'+ json +'</a>';
} else { } else {
if ( !(Array.isArray(json)) ) { if ( !(Array.isArray(json)) ) {
...@@ -69,7 +71,7 @@ $().ready(function(){ ...@@ -69,7 +71,7 @@ $().ready(function(){
<tr class="header"> <tr class="header">
<th>@type</th>'; <th>@type</th>';
for (var k=0; k<keys.length; k++) { for (var k=0; k<keys.length; k++) {
table = table + ' <th>'+ keys[k] + '</th>'; table = table + ' <th>'+ itemnize_json(keys[k] , data["@context"], true ) + '</th>';
}; };
table = table +' </tr> table = table +' </tr>
</thead> </thead>
......
This diff is collapsed.
...@@ -70,7 +70,7 @@ As a real example, the metadata´s catalog of a simulation should include the si ...@@ -70,7 +70,7 @@ As a real example, the metadata´s catalog of a simulation should include the si
## Defined LAGO sites ## Defined LAGO sites
{% include generate_html_for_vocab.html folder="/DMP/defs/sitesLago.jsonld" %} {% include generate_html_for_sites.html folder="/DMP/defs/sitesLago.jsonld" %}
## Plain JSON-LD file ## Plain JSON-LD file
......
...@@ -26,11 +26,11 @@ ...@@ -26,11 +26,11 @@
{ {
"@id": "lago:Software", "@id": "lago:Software",
"@type": "sdo:SoftwareSourceCode", "@type": "sdo:SoftwareSourceCode",
"owl:equivalentClass" : "prov: SoftwareAgent", "owl:equivalentClass" : "prov:SoftwareAgent",
"dcat:subClassOf" : "Agent", "dcat:subClassOf" : "Agent",
"_sdo:codeRepository" : { "@type" : "sdo:URL" }, "sdo:codeRepository" : { "@type" : "sdo:URL" },
"_sdo:runtimePlatform" : {"@type" : "lago:runtimePlatform" }, "sdo:runtimePlatform" : {"@type" : "lago:runtimePlatform" },
"seeAlso" : [ "prov: SoftwareAgent", "sdo:SoftwareSourceCode", "Agent"], "seeAlso" : [ "prov:SoftwareAgent", "sdo:SoftwareSourceCode", "Agent"],
"comment" : [ { "@language" : "en", "@value" : "It identifies any concrete release of software used for simulation, measure, cleaning or analysis procedures. It always refers to a COMMIT in the source code, identified with a HASH at the CVS (but, it will be needed, a compressed file, using other type of hasisng, such as MD5SUM, to guarantee its immutability). Therefore, in GitHub, the @id is the link for the COMMIT (https://api.github.com/org/repo/git/commits/COMMIT_HASH and the sdo:codeRepository will be these COMMIT but browsable for humans ( https://github.com/org/repo/tree/COMMIT_HASH). It is mandatory assign an Agent:name. However, it is optional to use sdo:runtimePlatform (redefined as lago:runtimePlatform) to point to other lago:Software on which it was executed, for example to some deployment with Docker in GitHub." }, "comment" : [ { "@language" : "en", "@value" : "It identifies any concrete release of software used for simulation, measure, cleaning or analysis procedures. It always refers to a COMMIT in the source code, identified with a HASH at the CVS (but, it will be needed, a compressed file, using other type of hasisng, such as MD5SUM, to guarantee its immutability). Therefore, in GitHub, the @id is the link for the COMMIT (https://api.github.com/org/repo/git/commits/COMMIT_HASH and the sdo:codeRepository will be these COMMIT but browsable for humans ( https://github.com/org/repo/tree/COMMIT_HASH). It is mandatory assign an Agent:name. However, it is optional to use sdo:runtimePlatform (redefined as lago:runtimePlatform) to point to other lago:Software on which it was executed, for example to some deployment with Docker in GitHub." },
{ "@language" : "es", "@value" : "Identifica una versión concreta de un software usado para simular, medir, limpiar o analizar los datos de LAGO. Se refiere siempre a un COMMIT concreto en el código fuente, identificado con un código HASH en un CVS (o bien, si no fuera posible, a un fichero comprimido, univocamente identificado con algún tipo de HASH, como MD5SUM). Por tanto, en GitHub, el @id es el link del COMMIT https://api.github.com/org/repo/git/commits/COMMIT_HASH y la propiedad sdo:codeRepository sería ese COMMIT navegable para humanos https://github.com/org/repo/tree/COMMIT_HASH. Es obligatorio asignar un Agent:name. Pero es opcional el uso de sdo:runtimePlatform (redefinida como lago:runtimePlatform) para señalar otro lago:Software sobre el que se ejecuta, por ejemplo una integración Docker en GitHub)." } ] { "@language" : "es", "@value" : "Identifica una versión concreta de un software usado para simular, medir, limpiar o analizar los datos de LAGO. Se refiere siempre a un COMMIT concreto en el código fuente, identificado con un código HASH en un CVS (o bien, si no fuera posible, a un fichero comprimido, univocamente identificado con algún tipo de HASH, como MD5SUM). Por tanto, en GitHub, el @id es el link del COMMIT https://api.github.com/org/repo/git/commits/COMMIT_HASH y la propiedad sdo:codeRepository sería ese COMMIT navegable para humanos https://github.com/org/repo/tree/COMMIT_HASH. Es obligatorio asignar un Agent:name. Pero es opcional el uso de sdo:runtimePlatform (redefinida como lago:runtimePlatform) para señalar otro lago:Software sobre el que se ejecuta, por ejemplo una integración Docker en GitHub)." } ]
}, },
...@@ -81,9 +81,10 @@ ...@@ -81,9 +81,10 @@
"@type" : [ "rdf:Property", "owl:ObjectProperty" ], "@type" : [ "rdf:Property", "owl:ObjectProperty" ],
"dcat:domain": { "@id" : "lago:ArtiParams" }, "dcat:domain": { "@id" : "lago:ArtiParams" },
"dcat:range": { "@id" : "xsd:float" }, "dcat:range": { "@id" : "xsd:float" },
"@default" : "0.0",
"dcat:label": "rigidity", "dcat:label": "rigidity",
"comment" : [ { "@language" : "en", "@value" : "Rigidity cutoff; 0 = disabled; value in GV = enabled" }, "comment" : [ { "@language" : "en", "@value" : "Rigidity cutoff; 0.0 = disabled; value in GV = enabled" },
{ "@language" : "es", "@value" : "Corte de la rigidez; 0 = deshabilitado; valor en GV = habilitado" } ] { "@language" : "es", "@value" : "Corte de la rigidez; 0.0 = deshabilitado; valor en GV = habilitado" } ]
}, },
{ {
"@id": "lago:tMin", "@id": "lago:tMin",
...@@ -165,10 +166,10 @@ ...@@ -165,10 +166,10 @@
"@id": "lago:highEnergyCutsSecondaries", "@id": "lago:highEnergyCutsSecondaries",
"@type" : [ "rdf:Property", "owl:ObjectProperty" ], "@type" : [ "rdf:Property", "owl:ObjectProperty" ],
"dcat:domain": { "@id" : "lago:ArtiParams" }, "dcat:domain": { "@id" : "lago:ArtiParams" },
"dcat:range": { "@id" : "xsd:boolean" }, "dcat:range": { "@id" : "xsd:float" },
"dcat:label": "highEnergyCutsSecondaries", "dcat:label": "highEnergyCutsSecondaries",
"@default" : false, "@default" : "0.0",
"comment" : [ { "@language" : "en", "@value" : "Enable high energy cuts for secondaries" }, "comment" : [ { "@language" : "en", "@value" : "Enable high energy cuts for secondaries; 0.0 = disabled, value in GeV = enabled" },
{ "@language" : "es", "@value" : "" } ] { "@language" : "es", "@value" : "" } ]
}, },
{"_comment" : "------ Defining installed detectors and simulated detectors, this implies estaiblishing equivalencies among measures and software parameters --------"}, {"_comment" : "------ Defining installed detectors and simulated detectors, this implies estaiblishing equivalencies among measures and software parameters --------"},
...@@ -198,7 +199,17 @@ ...@@ -198,7 +199,17 @@
"comment" : [ { "@language" : "en", "@value" : "" }, "comment" : [ { "@language" : "en", "@value" : "" },
{ "@language" : "es", "@value" : "" } ] { "@language" : "es", "@value" : "" } ]
}, },
{"_comment" : "------ common properties to describe characteristics of a DetectorSite (Agent) which are included also in a lago:CorsikaInput --------"}, {"_comment" : "------ common properties to describe characteristics of a DetectorSite (Agent), some of which are included also in a lago:CorsikaInput --------"},
{
"@id": "lago:belongsLago",
"@type" : [ "rdf:Property", "owl:ObjectProperty" ],
"dcat:domain": { "@id" : "lago:DetectorSite" },
"dcat:range": { "@id" : "xsd:boolean" },
"@default" : false,
"dcat:label": "belongsLago",
"comment" : [ { "@language" : "en", "@value" : "" },
{ "@language" : "es", "@value" : "" } ]
},
{ {
"@id": "lago:obsLev", "@id": "lago:obsLev",
"@type" : [ "rdf:Property", "owl:ObjectProperty" ], "@type" : [ "rdf:Property", "owl:ObjectProperty" ],
...@@ -228,6 +239,15 @@ ...@@ -228,6 +239,15 @@
"comment" : [ { "@language" : "en", "@value" : " Components of the Earth's mag. field (MAGNET), Horizontal (bx) and Vertical (bx)" }, "comment" : [ { "@language" : "en", "@value" : " Components of the Earth's mag. field (MAGNET), Horizontal (bx) and Vertical (bx)" },
{ "@language" : "es", "@value" : "" } ] { "@language" : "es", "@value" : "" } ]
}, },
{
"@id": "lago:bDate",
"@type" : [ "rdf:Property", "owl:ObjectProperty" ],
"dcat:domain": { "@id" : "lago:MagnetComponents" },
"dcat:range": { "@id" : "xsd:date" },
"dcat:label": "bDate",
"comment" : [ { "@language" : "en", "@value" : "The date for which the magnetic field values are calculated, in the form yyyy-mm-dd. (xsd:date)" },
{ "@language" : "es", "@value" : "" } ]
},
{ {
"@id": "lago:bx", "@id": "lago:bx",
"@type" : [ "rdf:Property", "owl:ObjectProperty" ], "@type" : [ "rdf:Property", "owl:ObjectProperty" ],
...@@ -246,6 +266,15 @@ ...@@ -246,6 +266,15 @@
"comment" : [ { "@language" : "en", "@value" : "Vertical comp. of the Earth's mag. field (MAGNET) [downwards,muT], see values at https://www.ngdc.noaa.gov/geomag/calculators/magcalc.shtml#igrfwmm" }, "comment" : [ { "@language" : "en", "@value" : "Vertical comp. of the Earth's mag. field (MAGNET) [downwards,muT], see values at https://www.ngdc.noaa.gov/geomag/calculators/magcalc.shtml#igrfwmm" },
{ "@language" : "es", "@value" : "Componente vertical del campo magnético de la Tierra (MAGNET) [downwards,muT], ver valores en https://www.ngdc.noaa.gov/geomag/calculators/magcalc.shtml#igrfwmm" } ] { "@language" : "es", "@value" : "Componente vertical del campo magnético de la Tierra (MAGNET) [downwards,muT], ver valores en https://www.ngdc.noaa.gov/geomag/calculators/magcalc.shtml#igrfwmm" } ]
}, },
{
"@id": "lago:bi",
"@type" : [ "rdf:Property", "owl:ObjectProperty" ],
"dcat:domain": { "@id" : "lago:MagnetComponents" },
"dcat:range": { "@id": "xsd:decimal"},
"dcat:label": "bx",
"comment" : [ { "@language" : "en", "@value" : "" },
{ "@language" : "es", "@value" : "" } ]
},
{ {
"@id": "lago:atmcrd", "@id": "lago:atmcrd",
"@type" : [ "rdf:Property", "owl:ObjectProperty" ], "@type" : [ "rdf:Property", "owl:ObjectProperty" ],
...@@ -289,6 +318,40 @@ ...@@ -289,6 +318,40 @@
"lago:corsikaParam" : "ARRANG", "lago:corsikaParam" : "ARRANG",
"comment" : [ { "@language" : "en", "@value" : "" }, "comment" : [ { "@language" : "en", "@value" : "" },
{ "@language" : "es", "@value" : "" } ] { "@language" : "es", "@value" : "" } ]
},
{
"@id" : "geometry",
"@type" : "geometry",
"dcat:domain" : [ { "@id" : "Location" },
{ "@id" : "lago:DetectorSite" } ],
"dcat:range" : { "@id": "geo:Point" },
"dcat:label" : "point",
"seeAlso" : [ "https://www.w3.org/ns/locn#locn:geometry",
"https://www.w3.org/TR/vocab-dcat-2/#Property:location_geometry" ],
"comment" : [ { "@language" : "en", "@value" : ""},
{ "@language" : "es", "@value" : "" } ]
},
{"_comment" : "Reiterative including geo:Point and its propierties. It is as is in W3C WGS84 vocab: http://www.w3.org/2003/01/geo/wgs84_pos#). Added for guiding/clarifying."},
{
"@id": "geo:latitude",
"@type":"http://www.w3.org/2001/XMLSchema#float",
"dcat:domain": { "@id": "geo:Point" },
"dcat:label" : "lat",
"owl:equivalentProperty" : { "@id": "sdo:GeoCoordinates#latitude" }
},
{
"@id": "geo:longitude",
"@type":"http://www.w3.org/2001/XMLSchema#float",
"dcat:label" : "long",
"dcat:domain": { "@id": "geo:Point" },
"owl:equivalentProperty" : { "@id": "sdo:GeoCoordinates#longitude" }
},
{
"@id": "geo:altitude",
"@type":"http://www.w3.org/2001/XMLSchema#float",
"dcat:label" : "alt",
"dcat:domain": { "@id": "geo:Point" },
"owl:equivalentProperty" : { "@id": "sdo:GeoCoordinates#altitude" }
} }
], ],
"@context" : { "@context" : {
...@@ -303,6 +366,7 @@ ...@@ -303,6 +366,7 @@
"dcat" : "http://www.w3.org/ns/dcat#", "dcat" : "http://www.w3.org/ns/dcat#",
"prov" : "http://www.w3.org/ns/prov#", "prov" : "http://www.w3.org/ns/prov#",
"foaf" : "http://xmlns.com/foaf/0.1/", "foaf" : "http://xmlns.com/foaf/0.1/",
"sdo" : "http://schema.org/" "sdo" : "http://schema.org/",
"geo": "http://www.w3.org/2003/01/geo/wgs84_pos#"
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment