Skip to content

Commit

Permalink
cleaned up spec entailments
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-metalinkage committed Jul 6, 2021
1 parent 62cfdbe commit c57d835
Show file tree
Hide file tree
Showing 7 changed files with 3,097 additions and 3,001 deletions.
107 changes: 53 additions & 54 deletions definitions/conceptschemes/gml-simple-features.ttl
Original file line number Diff line number Diff line change
@@ -1,54 +1,53 @@
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix ns1: <http://www.opengis.net/def/metamodel/ogc-na/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<http://www.opengis.net/def/ogc/> skos:member <http://www.opengis.net/def/profile/ogc/2.0/gml-sf/> .

<http://www.opengis.net/def/profile/ogc/2.0/gml-sf> a skos:ConceptScheme ;
rdfs:label "Levels of the Geography Markup Language (GML) simple features profile" ;
<http://www.opengis.net/def/metamodel/ogc-na/status>
<http://www.opengis.net/def/status/valid> ;
ns1:collectionView <http://www.opengis.net/def/profile/ogc/2.0/gml-sf/> ;
skos:prefLabel "Levels of the Geography Markup Language (GML) simple features profile" .

<http://www.opengis.net/def/profile/ogc/2.0/gml-sf0> a skos:Concept ;
rdfs:label "Geography Markup Language (GML) Simple Features Compliance Level SF-0" ;
<http://www.opengis.net/def/metamodel/ogc-na/status>
<http://www.opengis.net/def/status/valid> ;
dcterms:created "2021-04-28T16:23:42.732904"^^xsd:dateTime ;
rdfs:seeAlso <https://portal.ogc.org/files/?artifact_id=42729> ;
skos:definition "Compliance level SF-0 limits the property types of both spatial and non-spatial properties." ;
skos:notation "gml-sf0"^^<http://www.opengis.net/def/encoding/ogc/gml> ;
skos:prefLabel "Geography Markup Language (GML) Simple Features Compliance Level SF-0" .

<http://www.opengis.net/def/profile/ogc/2.0/gml-sf1> a skos:Concept ;
rdfs:label "Geography Markup Language (GML) Simple Features Compliance Level SF-1" ;
<http://www.opengis.net/def/metamodel/ogc-na/status>
<http://www.opengis.net/def/status/valid> ;
dcterms:created "2021-04-28T16:23:42.733243"^^xsd:dateTime ;
rdfs:seeAlso <https://portal.ogc.org/files/?artifact_id=42729> ;
skos:definition "Compliance level SF-1 supports everything in compliance level SF-0 but removes the restriction on value cardinality and allows user defined non-spatial property types to be used." ;
skos:notation "gml-sf1"^^<http://www.opengis.net/def/encoding/ogc/gml> ;
skos:prefLabel "Geography Markup Language (GML) Simple Features Compliance Level SF-1" .

<http://www.opengis.net/def/profile/ogc/2.0/gml-sf2> a skos:Concept ;
rdfs:label "Geography Markup Language (GML) Simple Features Compliance Level SF-2" ;
<http://www.opengis.net/def/metamodel/ogc-na/status>
<http://www.opengis.net/def/status/valid> ;
dcterms:created "2021-04-28T16:23:42.733569"^^xsd:dateTime ;
rdfs:seeAlso <https://portal.ogc.org/files/?artifact_id=42729> ;
skos:definition "Compliance level SF-2 essentially corresponds to the OGC Simple Features specification. There are no restrictions placed on non-spatial properties but there are restrictions on spatial properties." ;
skos:notation "gml-sf2"^^<http://www.opengis.net/def/encoding/ogc/gml> ;
skos:prefLabel "Geography Markup Language (GML) Simple Features Compliance Level SF-2" .

<http://www.opengis.net/def/profile/ogc/2.0/gml-sf/> a skos:Collection ;
rdfs:label "Levels of the Geography Markup Language (GML) simple features profile" ;
<http://www.opengis.net/def/metamodel/ogc-na/status>
<http://www.opengis.net/def/status/valid> ;
skos:inScheme <http://www.opengis.net/def/profile/ogc/2.0/gml-sf> ;
skos:member <http://www.opengis.net/def/profile/ogc/2.0/gml-sf0>,
<http://www.opengis.net/def/profile/ogc/2.0/gml-sf1>,
<http://www.opengis.net/def/profile/ogc/2.0/gml-sf2> ;
skos:prefLabel "Levels of the Geography Markup Language (GML) simple features profile" .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<http://www.opengis.net/def/ogc/> skos:member <http://www.opengis.net/def/profile/ogc/2.0/gml-sf/> .

<http://www.opengis.net/def/profile/ogc/2.0/gml-sf> a skos:ConceptScheme ;
rdfs:label "Levels of the Geography Markup Language (GML) simple features profile" ;
<http://www.opengis.net/def/metamodel/ogc-na/status>
<http://www.opengis.net/def/status/valid> ;
ns1:collectionView <http://www.opengis.net/def/profile/ogc/2.0/gml-sf/> ;
skos:prefLabel "Levels of the Geography Markup Language (GML) simple features profile" .

<http://www.opengis.net/def/profile/ogc/2.0/gml-sf0> a skos:Concept ;
rdfs:label "Geography Markup Language (GML) Simple Features Compliance Level SF-0" ;
<http://www.opengis.net/def/metamodel/ogc-na/status>
<http://www.opengis.net/def/status/valid> ;
dcterms:created "2021-04-28T16:23:42.732904"^^xsd:dateTime ;
rdfs:seeAlso <https://portal.ogc.org/files/?artifact_id=42729> ;
skos:definition "Compliance level SF-0 limits the property types of both spatial and non-spatial properties." ;
skos:notation "gml-sf0"^^<http://www.opengis.net/def/encoding/ogc/gml> ;
skos:prefLabel "Geography Markup Language (GML) Simple Features Compliance Level SF-0" .

<http://www.opengis.net/def/profile/ogc/2.0/gml-sf1> a skos:Concept ;
rdfs:label "Geography Markup Language (GML) Simple Features Compliance Level SF-1" ;
<http://www.opengis.net/def/metamodel/ogc-na/status>
<http://www.opengis.net/def/status/valid> ;
dcterms:created "2021-04-28T16:23:42.733243"^^xsd:dateTime ;
rdfs:seeAlso <https://portal.ogc.org/files/?artifact_id=42729> ;
skos:definition "Compliance level SF-1 supports everything in compliance level SF-0 but removes the restriction on value cardinality and allows user defined non-spatial property types to be used." ;
skos:notation "gml-sf1"^^<http://www.opengis.net/def/encoding/ogc/gml> ;
skos:prefLabel "Geography Markup Language (GML) Simple Features Compliance Level SF-1" .

<http://www.opengis.net/def/profile/ogc/2.0/gml-sf2> a skos:Concept ;
rdfs:label "Geography Markup Language (GML) Simple Features Compliance Level SF-2" ;
<http://www.opengis.net/def/metamodel/ogc-na/status>
<http://www.opengis.net/def/status/valid> ;
dcterms:created "2021-04-28T16:23:42.733569"^^xsd:dateTime ;
rdfs:seeAlso <https://portal.ogc.org/files/?artifact_id=42729> ;
skos:definition "Compliance level SF-2 essentially corresponds to the OGC Simple Features specification. There are no restrictions placed on non-spatial properties but there are restrictions on spatial properties." ;
skos:notation "gml-sf2"^^<http://www.opengis.net/def/encoding/ogc/gml> ;
skos:prefLabel "Geography Markup Language (GML) Simple Features Compliance Level SF-2" .

<http://www.opengis.net/def/profile/ogc/2.0/gml-sf/> a skos:Collection ;
rdfs:label "Levels of the Geography Markup Language (GML) simple features profile" ;
<http://www.opengis.net/def/metamodel/ogc-na/status>
<http://www.opengis.net/def/status/valid> ;
skos:inScheme <http://www.opengis.net/def/profile/ogc/2.0/gml-sf> ;
skos:member <http://www.opengis.net/def/profile/ogc/2.0/gml-sf0>,
<http://www.opengis.net/def/profile/ogc/2.0/gml-sf1>,
<http://www.opengis.net/def/profile/ogc/2.0/gml-sf2> ;
skos:prefLabel "Levels of the Geography Markup Language (GML) simple features profile" .
35 changes: 22 additions & 13 deletions scripts/spec_as_conceptscheme.shapes.ttl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# baseURI: https://www.opengis.net/def/profile/skos/basics
# baseURI: https://www.opengis.net/def/profile/orm/specascs
# imports: http://datashapes.org/dash
# imports: http://www.w3.org/2004/02/skos/core

Expand All @@ -9,34 +9,43 @@
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix skostopconcepts: <https://www.opengis.net/def/profile/skos/basics#> .
@prefix : <https://www.opengis.net/def/profile/orm/specascs#> .
@prefix swa: <http://topbraid.org/swa#> .
@prefix tosh: <http://topbraid.org/tosh#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix spec: <http://www.opengis.net/def/ont/modspec/> .

<https://www.opengis.net/def/profile/skos/basics>
<https://www.opengis.net/def/profile/orm/specascs>
a owl:Ontology ;
owl:imports <http://datashapes.org/dash> ;
owl:imports <http://www.w3.org/2004/02/skos/core> ;
owl:versionInfo "Created with TopBraid Composer" ;
skos:definition "Entails a concept scheme for a given specification, with topconcepts for each conformance class and each requirement being a narrower concept. Supports visualisation in a heirarchy"
.
<skostopconcepts:NodeShape_concept>

:NodeShape_conformance_class
a sh:NodeShape ;
sh:rule <skostopconcepts:SPARQLRule_broadinverse> ;
sh:rule <skostopconcepts:SPARQLRule_narrowinverse> ;
# sh:rule <skostopconcepts:rdfslabel> ;
sh:targetClass skos:Concept ;
sh:rule :specelements ;
sh:targetClass spec:ConformanceClass ;
.

<skostopconcepts:SPARQLRule_broadinverse>
:specelements
a sh:SPARQLRule ;
rdfs:label "Create missing skos:broader EDG needs" ;
rdfs:label "Create missing concept scheme" ;
sh:construct """PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
CONSTRUCT {
?c skos:broader ?this
?cs a skos:ConceptScheme ;
rdfs:label ?cslabel ;
skos:topConcept ?this ;
.
?this a skos:Concept ;
skos:topConceptOf ?cs ;
skos:inScheme ?cs ;
skos:narrower ?req ;
.
?req skos:broader ?this .
}
WHERE {
?this skos:narrower ?c
FILTER NOT EXISTS { ?c skos:broader ?this }
}""" ;
sh:prefixes <http://www.w3.org/2004/02/skos/core> ;
Expand Down
8 changes: 8 additions & 0 deletions specification-elements/defs/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
These files contain further details for specifications for specific documents - they must be named using the <document_no> .ttl.

GIT workflows will combine these with the necessary baseline documents and perform entailment and validation (and eventually automated loading to staging repository)

TODO:
- a manual workflow to push to the production repository can be designed - but may need to include status checking and metadata.
- add provenance trace information automatically during entailment
- consider validation checking post-publication that all referenced objects (e.g. previous versions and dependencies) are present and valid - this is hard to do peicemeal as finding all the possible files to build the appropriate graph dynamically is not easy.
Loading

0 comments on commit c57d835

Please sign in to comment.