Semantic conventions
Formal language choice
Title: Formal language choice |
Identifier SC-R1 |
Statement: The formal ontology shall be expressed in OWL 2. |
Checkable: Yes, partially
There is no specific signature of an OWL ontology other than its resources. At a fundamental level, if there is no ontology declaration, it can be an RDF-S ontology. For this assumption to hold true, it is expected that all resources have a type declaration. Any other aspect of the validity of an OWL ontology falls within the domain of its syntax, which is beyond the scope of the conventions.
SC-R2 has overlap.
Named instance of the ontology
Shapes File: only_owl_ontology.shacl.ttl
Shape Description(s):
-
A node shape targeting a dummy focus node with a custom SPARQL query that checks if there does not exist a statement with
rdf:type
.-
Non-Compliance Severity: Violation
-
Non-Compliance Message(s):
-
Violation of standard practice: Missing explicit type declaration
-
-
-
A node shape targeting the focus node
owl:Ontology
with a restriction ofminCount=1
andmaxCount=1
on the inverse of the pathrdf:type
(i.e. there must exist exactly one instance of the ontology).-
Non-Compliance Severity: Violation
-
Non-Compliance Message(s):
-
Violation of SEMIC rule SC-R1: Missing OWL ontology declaration
-
-
Limited (OWL 2) expressivity
Title: Limited (OWL 2) expressivity |
Identifier SC-R2 |
Statement: The formal ontology shall be lightweight in its logical underpinning, focusing mainly on the concept declarations, generalisation axioms and annotations. |
Checkable: Yes, partially, with multiple derived subrules for best practices
No domain or range declarations
Shape File: no_domain_range_opt.shacl.ttl
Shape Description(s):
-
A node shape targeting any subject of
rdf:type
with restrictions ofmaxCount=0
on the propertiesrdfs:domain
andrdfs:range
.-
Non-Compliance Severity: Warning
-
Non-Compliance Message(s):
-
Non-observance of SEMIC rule SC-R2: No expressions of property domain shall be used
-
Non-observance of SEMIC rule SC-R2: No expressions of property range shall be used
-
-
Limited OWL resource types
Shapes File: only_owl_resources.shacl.ttl
Shape Description(s):
-
A node shape targeting any subjects of
rdf:type
with a restriction on the propertyrdf:type
having values only from the set{owl:Ontology, owl:Class, owl:DatatypeProperty, owl:ObjectProperty, owl:AnnotationProperty}
.-
Non-Compliance Severity: Violation
-
Non-Compliance Message(s):
-
Violation of SEMIC rule SC-R2: Only limited OWL class and property declarations shall be used
-
-
Overlaps with SC-R1.
Only OWL subsumption relationships between resources
Shapes File: only_owl_resources.shacl.ttl
Shape Description(s):
-
Node shapes targeting classes from the set
{owl:Class, owl:ObjectProperty, owl:DatatypeProperty}
with a custom SPARQL query that checks if there exists any property between two resources (the target and an IRI) that is not one of the set{rdf:type, rdfs:subClassOf, rdfs:subPropertyOf}
.-
Non-Compliance Severity: Violation
-
Non-Compliance Message(s):
-
Violation of SEMIC rule SC-R2: Only subsumption OWL class relations shall be used
-
Violation of SEMIC rule SC-R2: Only subsumption OWL property relations shall be used
-
-
Limit expressions to a select few properties
Shape File: select_few_expressions.shacl.ttl
Shape Description(s):
-
A closed node shape (ignoring basic properties which are the subject of other rules/shapes) targeting the class
sh:NodeShape
with several property shapes representing a limited recommended set, with only the property path declared for each. -
*Non-Compliance Severity: Info
-
Non-Compliance Message(s):
-
Non-observance of SEMIC rule SC-R2: The ontology shall be limited to a select few expressions
-
-
Minimum ontology header
*Shape File: min_ontology_header.shacl.ttl
Shape Description(s):
-
A node shape targeting the class
owl:Ontology
with a property restriction ofminCount=1
for each property from a limited recommended set (combining the list from the conventions and those used in a reference ontology ePO), and corresponding datatype restrictions (rdf:langString
for those expected to be language-tagged,xsd:date
for dates,sh:IRI
for IRIs andxsd:string
otherwise).-
Non-Compliance Severity: Warning
-
Non-Compliance Message(s):
-
Non-observance of SEMIC rule SC-R2: The ontology shall include a minimum header ({?property} <{?type}>)
-
-
No advanced OWL constructs
Shape File: no_advanced_definitions.shacl.ttl
Shape Description(s):
-
A node shape targeting all subjects of
rdf:type
with a property restriction on analternativePath
list that includes a set of advanced OWL properties, and another similar shape with only the subsumption properties restricted tosh:IRI
node kind (effectively forbidding use of blank nodes as values through those properties).-
Non-Compliance Severity: Violation
-
Non-Compliance Message(s):
-
Violation of SEMIC rule SC-R2: Advanced logical definitions shall not be used
-
Violation of SEMIC rule SC-R2: Advanced logical definitions shall not be used (bNodes in subsumption)
-
-
Lexicalisation
Title: Lexicalisation |
Identifier SC-R3 |
Statement: The choice in handling the lexicalisation of concepts shall be clearly defined and consistently implemented. |
Checkable: Yes
At least one of two primary lexicalisations
Shape File: min_one_lexicalisation_opt.shacl.ttl
Shape Description(s):
-
A node shape targeting any subjects of
rdf:type
with restrictions ofminCount=1
on the UNION of the properties from the set{rdfs:label, skos:prefLabel}
.-
Non-Compliance Severity: Warning
-
Non-Compliance Message(s):
-
Non-observance of SEMIC rule SC-R3: At least one lexicalisation label should exist
-
-
At most one value per lexicalisation
Shape File: max_one_label.shacl.ttl
-
Non-Compliance Severity: Violation
-
Non-Compliance Message(s):
-
Violation of standard practice: More than one `skos:prefLabel
exists without a language tag` -
Language {lang} has been used by {n} values
(default SHACL message) -
Language {?lang} used more than once
(default SHACL message)
-
Circular definitions
Title: Circular definitions |
Identifier SC-R5 |
Statement: The data specification (semantic, conceptual, or shape) shall not use circular definitions. |
Checkable: No
A self-reference is not easy to check for without the use of custom SPARQL queries (that can inflate validation time) or resorting to non-standard approaches (e.g. dash:nonRecursive). Deferred for implementation in a later revision.