Commit 5de2f46f authored by Rob Atkinson's avatar Rob Atkinson

updated profilewiz outputs with extracted profiles of referenced vocabularies

parent 943d84ca
# CYBELE Common Semantic Model Profiles
The CYBELE Common Semantic Model (CCSM) re-uses existing models and vocabularies such as DCAT, StatDCAT, GeoDCAT, INSPIRE, SSN ontology, QB vocabulary and PROV-O.
The main class is derived from DCAT, dcat:Dataset, so the CCSM can be described as a profile of DCAT, however it will draw on a range of standard vocabularies, each of which can be used to profile DCAT in a project-independent fashion.
This directory contains a profile-oriented view of the CCSM derived from the authoritative CCSM OWL model and additional statements about profiling intent.
## Derivation methodology
The CCSM is refactored into a minimal profile using the [ProfileWiz toolkit] (https://github.com/RDFLib/profilewiz).
cd /path/to/cybele/repo/profiles
python.exe ....path..../profilewiz/profilewiz/profilewiz.py -p=lib/profile_cat.ttl -i=test_cat.ttl --ask -o dcat-cybele.ttl ../cybele-semantic-model.ttl
The steps are:
+ run profilewiz over the CCSM in interactive mode to build (or update) a profile catalog and cache local copies of imports
+ edit the profile catalog to
* add any authoritative canonical forms - e.g. JSON-LD context, for imported vocabularies.
* declare the target profile hierarchy - *in this case we will declare new profiles of DCAT for PROV, QB, StatDCAT and GeoDCAT in an experimental OGC managed namespace, and declare that the target profile inherits from these.*
+ run this methodology over OWL files where available for each parent profile to build up an accurate model of which profile declares or constrains which object definitions.
+ run profilewiz in extraction mode to extract profile
+ refactor - move reusable constraints from extracted profile to imported general profiles where no master profile ontology exists (build up the reusable profiles)
+ rerun profilewiz using -ho and -hd ( HTML for OWL and HTML for profile ) mode to generate documentation using the refactored profile hierarchy.
## TODO
1. update pyLODE to use and import closure and rdfs:isBefinedBy to style imported content differently
2. Generate SHACL shape constraints
3. Generate RDF-QB dimensional models (in interactive mode) or consume these in automated mode
4. bug fix for blank node filterin
......@@ -201,7 +201,7 @@
],
"https://schema.org/description": [
{
"@value": "<p>The CYBELE Semantic Model is used in the semantic annotation, sharing and inter-connection of CYBELE datasets. THe model has been implemented by reusing relevant terms from standard and well-known ontologies and vocabularies, including: DCAT, FOAF, PROV-O, Dublin Core, StatDCAT-AP, SKOS and Data Cube</p>"
"@value": "<p>The CYBELE Semantic Model serves as a common reference model for the semantic annotation and sharing of data including sensor data, satellite and aerial image data, statistical data, streaming data, video data, weather and climate data, supporting the on demand discovery and exploration. This semantic model is used in the semantic annotation, sharing and inter-connection of CYBELE datasets. In particular, it is used to create metadata for the datasets (e.g. data theme, spatial/temporal coverage, data format, periodicity, licence), which will facilitate: i) the discovery and exploration of the CYBELE datasets; ii) the description of the data needs of CYBELE apps. Additional information about the model is available at https://gitlab.res.eng.it/cybele/cybele-common-semantic-model</p>"
}
],
"https://schema.org/license": [
......@@ -283,6 +283,15 @@
<dd>1.1</dd>
<dt>Version URI</dt>
<dd><a href="https://gitlab.res.eng.it/cybele/cybele-common-semantic-model/raw/master/cybele-semantic-model.ttl">https://gitlab.res.eng.it/cybele/cybele-common-semantic-model/raw/master/cybele-semantic-model.ttl</a></dd>
<dt>Imports</dt>
<dd>
<a href="http://purl.org/dc/terms">http://purl.org/dc/terms</a><br/>
<a href="http://purl.org/linked-data/cube">http://purl.org/linked-data/cube</a><br/>
<a href="http://www.w3.org/2004/02/skos/core">http://www.w3.org/2004/02/skos/core</a><br/>
<a href="http://www.w3.org/ns/dcat">http://www.w3.org/ns/dcat</a><br/>
<a href="http://www.w3.org/ns/prov">http://www.w3.org/ns/prov</a><br/>
<a href="http://xmlns.com/foaf/0.1">http://xmlns.com/foaf/0.1</a><br/>
</dd>
<dt>License &amp; Rights</dt>
<dd>
<a href="http://creativecommons.org/licenses/by/4.0/">http://creativecommons.org/licenses/by/4.0/</a><br />
......@@ -293,7 +302,7 @@
</dl>
<h2>Description</h2>
<div id="description">
<p>The CYBELE Semantic Model is used in the semantic annotation, sharing and inter-connection of CYBELE datasets. THe model has been implemented by reusing relevant terms from standard and well-known ontologies and vocabularies, including: DCAT, FOAF, PROV-O, Dublin Core, StatDCAT-AP, SKOS and Data Cube</p>
<p>The CYBELE Semantic Model serves as a common reference model for the semantic annotation and sharing of data including sensor data, satellite and aerial image data, statistical data, streaming data, video data, weather and climate data, supporting the on demand discovery and exploration. This semantic model is used in the semantic annotation, sharing and inter-connection of CYBELE datasets. In particular, it is used to create metadata for the datasets (e.g. data theme, spatial/temporal coverage, data format, periodicity, licence), which will facilitate: i) the discovery and exploration of the CYBELE datasets; ii) the description of the data needs of CYBELE apps. Additional information about the model is available at https://gitlab.res.eng.it/cybele/cybele-common-semantic-model</p>
</div>
</section>
<section id="toc">
......@@ -831,10 +840,10 @@
<tr>
<th>In domain of</th>
<td>
<a href="#accessDatabase">cybele:accessDatabase</a><sup class="sup-op" title="object property">op</sup><br/>
<a href="http://www.w3.org/ns/dcat#mediaType">dcat:mediaType</a><sup class="sup-op" title="object property">op</sup><br/>
<a href="http://www.w3.org/ns/dcat#byteSize">dcat:byteSize</a><sup class="sup-dp" title="datatype property">dp</sup><br/>
<a href="http://www.w3.org/ns/dcat#downloadURL">dcat:downloadURL</a><sup class="sup-op" title="object property">op</sup><br/>
<a href="http://www.w3.org/ns/dcat#byteSize">dcat:byteSize</a><sup class="sup-dp" title="datatype property">dp</sup><br/>
<a href="#accessDatabase">cybele:accessDatabase</a><sup class="sup-op" title="object property">op</sup><br/>
</td>
</tr>
</table>
......@@ -910,9 +919,9 @@
<tr>
<th>In range of</th>
<td>
<a href="http://www.w3.org/ns/prov#wasAssociatedWith">prov:wasAssociatedWith</a><sup class="sup-op" title="object property">op</sup><br/>
<a href="http://www.w3.org/ns/prov#actedOnBehalfOf">prov:actedOnBehalfOf</a><sup class="sup-op" title="object property">op</sup><br/>
<a href="http://www.w3.org/ns/prov#wasAttributedTo">prov:wasAttributedTo</a><sup class="sup-op" title="object property">op</sup><br/>
<a href="http://www.w3.org/ns/prov#actedOnBehalfOf">prov:actedOnBehalfOf</a><sup class="sup-op" title="object property">op</sup><br/>
<a href="http://www.w3.org/ns/prov#wasAssociatedWith">prov:wasAssociatedWith</a><sup class="sup-op" title="object property">op</sup><br/>
</td>
</tr>
</table>
......@@ -933,8 +942,8 @@
<tr>
<th>In domain of</th>
<td>
<a href="http://www.w3.org/ns/prov#wasGeneratedBy">prov:wasGeneratedBy</a><sup class="sup-op" title="object property">op</sup><br/>
<a href="http://www.w3.org/ns/prov#wasAttributedTo">prov:wasAttributedTo</a><sup class="sup-op" title="object property">op</sup><br/>
<a href="http://www.w3.org/ns/prov#wasGeneratedBy">prov:wasGeneratedBy</a><sup class="sup-op" title="object property">op</sup><br/>
</td>
</tr>
</table>
......@@ -1934,6 +1943,8 @@
<dd><code>http://purl.org/dc/terms/</code></dd>
<dt>foaf</dt>
<dd><code>http://xmlns.com/foaf/0.1/</code></dd>
<dt>ns1</dt>
<dd><code>http://www.w3.org/ns/dx/prof/</code></dd>
<dt>owl</dt>
<dd><code>http://www.w3.org/2002/07/owl#</code></dd>
<dt>prov</dt>
......
{
"$schema": "http://json-schema.org/schema#",
"$id": "http://w3id.org/cybele/model?_profile=jsonschema",
"type": "object",
"properties": {
"cybele:Database": {
"type": "object",
"properties": {
"cybele:accessTable": {
"type": "array",
"items": {
"type": "string"
}
},
"cybele:connectionString": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": []
},
"cybele:Table": {
"type": "object",
"properties": {
"cybele:tableName": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": []
},
"dcat:Dataset": {
"type": "object",
"properties": {
"dcat:theme": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"dcat:theme"
]
},
"dcat:Resource": {
"type": "object",
"properties": {},
"required": []
},
"dcat:Catalog": {
"type": "object",
"properties": {},
"required": []
},
"dcat:DataService": {
"type": "object",
"properties": {
"dcat:endpointURL": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": []
},
"dcat:Distribution": {
"type": "object",
"properties": {
"dcat:byteSize": {
"type": "array",
"items": {
"type": "string"
}
},
"dcat:downloadURL": {
"type": "array",
"items": {
"type": "string"
}
},
"cybele:accessDatabase": {
"type": "array",
"items": {
"type": "string"
}
},
"dcat:mediaType": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": []
},
"dcterms:Standard": {
"type": "object",
"properties": {},
"required": []
},
"dcterms:MediaType": {
"type": "object",
"properties": {},
"required": []
},
"dcterms:LinguisticSystem": {
"type": "object",
"properties": {},
"required": []
},
"dcterms:PeriodOfTime": {
"type": "object",
"properties": {},
"required": []
},
"dcterms:Frequency": {
"type": "object",
"properties": {},
"required": []
},
"dcterms:LicenseDocument": {
"type": "object",
"properties": {},
"required": []
},
"dcterms:RightsStatement": {
"type": "object",
"properties": {},
"required": []
},
"dcterms:Agent": {
"type": "object",
"properties": {},
"required": []
},
"dcterms:Location": {
"type": "object",
"properties": {},
"required": []
},
"skos:Concept": {
"type": "object",
"properties": {},
"required": []
},
"prov:Agent": {
"type": "object",
"properties": {
"prov:actedOnBehalfOf": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": []
},
"prov:Activity": {
"type": "object",
"properties": {
"prov:wasAssociatedWith": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": []
},
"prov:Entity": {
"type": "object",
"properties": {
"prov:wasGeneratedBy": {
"type": "array",
"items": {
"type": "string"
}
},
"prov:wasAttributedTo": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": []
},
"foaf:Agent": {
"type": "object",
"properties": {},
"required": []
},
"foaf:Document": {
"type": "object",
"properties": {},
"required": []
},
"qb:DataStructureDefinition": {
"type": "object",
"properties": {
"qb:component": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": []
},
"qb:DataSet": {
"type": "object",
"properties": {
"qb:structure": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": []
},
"qb:MeasureProperty": {
"type": "object",
"properties": {},
"required": []
},
"qb:ComponentSpecification": {
"type": "object",
"properties": {},
"required": []
},
"qb:DimensionProperty": {
"type": "object",
"properties": {},
"required": []
}
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -2,61 +2,23 @@
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ns1: <http://www.w3.org/ns/dx/prof/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix prof: <http://www.w3.org/ns/dx/prof/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix qb: <http://purl.org/linked-data/cube#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <http://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
dcterms:Agent a owl:Class ;
owl:equivalentClass foaf:Agent .
dcterms:MediaType a owl:Class .
dcterms:accessRights a owl:ObjectProperty ;
rdfs:range dcterms:RightsStatement .
dcterms:accrualPeriodicity a owl:ObjectProperty ;
rdfs:range dcterms:Frequency .
dcterms:conformsTo a owl:ObjectProperty ;
rdfs:range dcterms:Standard .
dcterms:contributor a owl:AnnotationProperty .
dcterms:creator a owl:AnnotationProperty .
dcterms:description a owl:AnnotationProperty .
dcterms:identifier a owl:DatatypeProperty .
dcterms:issued a owl:DatatypeProperty .
dcterms:language a owl:ObjectProperty ;
rdfs:range dcterms:LinguisticSystem .
dcterms:license a owl:ObjectProperty ;
rdfs:range dcterms:LicenseDocument .
dcterms:modified a owl:DatatypeProperty .
dcterms:publisher a owl:ObjectProperty ;
rdfs:range foaf:Agent .
dcterms:rights a owl:AnnotationProperty .
dcterms:spatial a owl:ObjectProperty ;
rdfs:range dcterms:Location .
dcterms:temporal a owl:ObjectProperty ;
rdfs:range dcterms:PeriodOfTime .
dcterms:title a owl:AnnotationProperty .
qb:DataSet owl:equivalentClass dcat:Dataset .
schema:affiliation a owl:AnnotationProperty .
cybele:accessDatabase a owl:ObjectProperty ;
......@@ -85,18 +47,6 @@ cybele:tableName a owl:DatatypeProperty ;
xsd:duration a rdfs:Datatype .
dcat:DataService rdfs:isDefinedBy <http://www.w3.org/TR/vocab-dcat/> .
dcat:Resource rdfs:isDefinedBy <http://www.w3.org/TR/vocab-dcat/> .
dcat:accessService rdfs:isDefinedBy <http://www.w3.org/TR/vocab-dcat/> .
dcat:endpointURL rdfs:isDefinedBy <http://www.w3.org/TR/vocab-dcat/> .
dcat:spatialResolutionInMeters rdfs:isDefinedBy <http://www.w3.org/TR/vocab-dcat/> .
dcat:temporalResolution rdfs:isDefinedBy <http://www.w3.org/TR/vocab-dcat/> .
foaf:depiction a owl:AnnotationProperty .
foaf:homepage a owl:AnnotationProperty .
......@@ -107,36 +57,10 @@ foaf:name a owl:AnnotationProperty .
<http://creativecommons.org/licenses/by/4.0/> a owl:NamedIndividual .
dcterms:Frequency a owl:Class .
dcterms:LicenseDocument a owl:Class .
dcterms:LinguisticSystem a owl:Class .
dcterms:Location a owl:Class .
dcterms:PeriodOfTime a owl:Class .
dcterms:RightsStatement a owl:Class .
dcterms:Standard a owl:Class .
dcat:Dataset rdfs:subClassOf [ a owl:Restriction ;
owl:minCardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty dcat:theme ] .
prov:Activity rdfs:isDefinedBy prov: .
prov:Agent rdfs:isDefinedBy prov: .
cybele:Table a owl:Class ;
rdfs:label "Table"@en ;
rdfs:isDefinedBy <http://w3id.org/cybele/model> .
prov:Entity rdfs:isDefinedBy prov: .
foaf:Agent rdfs:isDefinedBy foaf: .
cybele:Database a owl:Class ;
rdfs:label "Database"@en ;
rdfs:isDefinedBy <http://w3id.org/cybele/model> .
......@@ -192,7 +116,13 @@ cybele:Database a owl:Class ;
<http://xmlns.com/foaf/0.1> ;
owl:versionIRI <https://gitlab.res.eng.it/cybele/cybele-common-semantic-model/raw/master/cybele-semantic-model.ttl> ;
owl:versionInfo "1.1" ;
ns1:isProfileOf <http://purl.org/dc/terms>,
prof:isProfileOf <http://w3id.org/cybele/model_profile4cube>,
<http://w3id.org/cybele/model_profile4dcat>,
<http://w3id.org/cybele/model_profile4dcterms>,
<http://w3id.org/cybele/model_profile4foaf>,
<http://w3id.org/cybele/model_profile4prov>,
<http://w3id.org/cybele/model_profile4skos> ;
prof:isTransitiveProfileOf <http://purl.org/dc/terms>,
<http://purl.org/linked-data/cube>,
<http://www.w3.org/2004/02/skos/core>,
<http://www.w3.org/ns/dcat>,
......@@ -202,9 +132,9 @@ cybele:Database a owl:Class ;
rdfs:label "C:\\repos\\misc\\cybele-common-semantic-model\\cybele-semantic-model.ttl" ] ;
prov:wasGeneratedBy [ a prov:Activity ;
rdfs:label "ProfileWiz: Normalisation (source = ../cybele-semantic-model.ttl, force_local=False, profile libs : lib/profile_cat.ttl) " ;
prov:endedAtTime "2020-08-20"^^xsd:date ;
prov:endedAtTime "2020-09-23"^^xsd:date ;
prov:wasAssociatedWith [ a prov:Agent ;
rdfs:label "ProfileWiz 0.1.3" ] ] ;
rdfs:label "ProfileWiz 0.1.5" ] ] ;
foaf:depiction <https://gitlab.res.eng.it/cybele/data/cybele-common-semantic-model/-/raw/master/images/model_matching.jpg> ;
foaf:maker [ foaf:homepage <https://www.cybele-project.eu/> ;
foaf:name "CYBELE project" ] .
......
{
"@id": "http://w3id.org/cybele/model",
"@context": [
"extracted\\cybele-semantic-model_dcat_context.jsonld",
"extracted\\cybele-semantic-model_dcterms_context.jsonld",
"extracted\\cybele-semantic-model_skos_context.jsonld",
"extracted\\cybele-semantic-model_prov_context.jsonld",
"extracted\\cybele-semantic-model_foaf_context.jsonld",
"extracted\\cybele-semantic-model_cube_context.jsonld",
{
"@vocab": "http://w3id.org/cybele/model",
"cybele": "http://w3id.org/cybele/model#",
"dcat": "http://www.w3.org/ns/dcat#",
"dcterms": "http://purl.org/dc/terms/",
"skos": "http://www.w3.org/2004/02/skos/core#",
"prov": "http://www.w3.org/ns/prov#",
"foaf": "http://xmlns.com/foaf/0.1/",
"qb": "http://purl.org/linked-data/cube#",
"Database": {
"@id": "cybele:Database"
},
"Table": {
"@id": "cybele:Table"
},
"accessDatabase": {
"@id": "cybele:accessDatabase",
"@type": "@id"
},
"accessTable": {
"@id": "cybele:accessTable",
"@type": "@id"
},
"connectionString": {
"@id": "cybele:connectionString",
"@type": "rdfs:Literal"
},
"tableName": {
"@id": "cybele:tableName",
"@type": "rdfs:Literal"
}
}
]
}
\ No newline at end of file
This diff is collapsed.
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix ns1: <http://www.w3.org/ns/prov#> .
@prefix prof: <http://www.w3.org/ns/dx/prof/> .
@prefix profrole: <http://www.w3.org/ns/dx/prof/role/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
......@@ -10,84 +11,104 @@
"The CYBELE Semantic Model serves as a common reference model for the semantic annotation and sharing of data including sensor data, satellite and aerial image data, statistical data, streaming data, video data, weather and climate data, supporting the on demand discovery and exploration. This semantic model is used in the semantic annotation, sharing and inter-connection of CYBELE datasets. In particular, it is used to create metadata for the datasets (e.g. data theme, spatial/temporal coverage, data format, periodicity, licence), which will facilitate: i) the discovery and exploration of the CYBELE datasets; ii) the description of the data needs of CYBELE apps. Additional information about the model is available at https://gitlab.res.eng.it/cybele/cybele-common-semantic-model"@en ;
skos:historyNote "Ontology profile normalised using ProfileWiz" ;
prof:hasResource [ a prof:ResourceDescriptor ;
rdfs:label "Profile description as HTML" ;
rdfs:label "OWL documentation as HTML" ;
dcterms:conformsTo prof: ;
dcterms:format "text/html" ;
rdfs:comment "Original source OWL file as HTML - for comparison and review purposes" ;
prof:hasArtifact "dcat-cybele_source.html" ;
prof:hasRole prof:profile ],
rdfs:comment "Based on the OWL flat view of the profile, a HTML rendering of key elements of the model." ;
prof:hasArtifact "cybele-semantic-model.html" ;
prof:hasRole profrole:profile ],
[ a prof:ResourceDescriptor ;
rdfs:label "OWL with definition details from imports" ;
dcterms:conformsTo <http://www.w3.org/2002/07/owl#> ;
dcterms:format "text/turtle" ;
rdfs:comment "This is a OWL file containing all the properties of objects used by the profile in a single (flat) denormalised file. This may be augmented in future with RDF* or reified statements with the provenance of each statement if required." ;
prof:hasArtifact "dcat-cybele_flat.ttl" ;
prof:hasRole prof:vocabulary ],
prof:hasArtifact "cybele-semantic-model_flat.ttl" ;
prof:hasRole profrole:vocabulary ],
[ a prof:ResourceDescriptor ;
rdfs:label "OWL documentation as HTML" ;
rdfs:label "Profile description as HTML" ;
dcterms:conformsTo prof: ;
dcterms:format "text/html" ;
rdfs:comment "Based on the OWL flat view of the profile, a HTML rendering of key elements of the model." ;
prof:hasArtifact "dcat-cybele.html" ;
prof:hasRole prof:profile ],
rdfs:comment "Original source OWL file as HTML - for comparison and review purposes" ;
prof:hasArtifact "cybele-semantic-model_source.html" ;
prof:hasRole profrole:profile ],
[ a prof:ResourceDescriptor ;
rdfs:label "SHACL constraints for profile" ;
dcterms:conformsTo <http://www.w3.org/ns/shacl#> ;
dcterms:format "text/turtle" ;
rdfs:comment "SHACL validation constraints for all declarations relevant to profile including imports" ;
prof:hasArtifact "dcat-cybele_flat_shacl.ttl" ;
prof:hasRole prof:validation ],
prof:hasArtifact "cybele-semantic-model_flat_shacl.ttl" ;
prof:hasRole profrole:validation ],
[ a prof:ResourceDescriptor ;
rdfs:label "JSON-LD Context" ;
dcterms:conformsTo <http://www.opengis.net/def/metamodel/profiles/json_ld_context> ;
dcterms:format "application/ld+json" ;
prof:hasArtifact "cybele-semantic-model_context.jsonld" ;
prof:hasRole profrole:context ],
[ a prof:ResourceDescriptor ;
rdfs:label "OWL with definition details from imports" ;
dcterms:conformsTo <http://www.w3.org/2002/07/owl#> ;
dcterms:format "application/ld+json" ;
rdfs:comment "This is a OWL file containing all the properties of objects used by the profile in a single (flat) denormalised file. This may be augmented in future with RDF* or reified statements with the provenance of each statement if required." ;
prof:hasArtifact "cybele-semantic-model_flat.jsonld" ;
prof:hasRole profrole:vocabulary ],