0

I need to express the fact that the allowed values of an ObjectProperty in my ontology are "controlled" by Concepts from a specific SKOS ConceptScheme.

EDIT:

Here is an example:

ex:colours rdf:type skos:ConceptScheme ;
  skos:hasTopConcept ex:teal ;
  skos:hasTopConcept ex:green .

ex:teal rdf:type skos:Concept ;
  skos:inScheme ex:colours ;
  skos:topConceptOf ex:colours .

ex:green rdf:type skos:Concept ;
  skos:inScheme ex:colours ;
  skos:topConceptOf ex:colours .

ex:P_has_colour rdf:type owl:ObjectProperty ;
  rdfs:domain ex:ColoredStuff ;
  rdfs:range ??? .

I want to express the fact that the values of the ex:P_has_colour ObjectProperty must be a Concept from the ex:colours SKOS ConceptScheme. I think I can add a type to each and every SKOS Concept which denotes a colour (something like ex:teal rdf:type ex:ColourConcept ;), and set the range of my property: ex:P_has_colour rdfs:range ex:ColourConcept. Is this the right way to go?

Amleth
  • 1
  • 1
  • and there are no "constraints" in OWL - everything is about inference aka entailment of facts. Constraint's are nowadays handled via SHACL language – UninformedUser Sep 26 '19 at 18:19
  • in addition to your solution with adding type `ex:ColourConcept` to each colour, in OWL you can also define "complex" ranges, e.g. `(skos:Concept and skos:inScheme value ex:colours)` - you could just use this class expression as range or just define some "helper" concept like you already did and use it as range: `ex:ColourConcept EquivalentTo (skos:Concept and skos:inScheme value ex:colours)` - no need to add the type to the colours then – UninformedUser Sep 28 '19 at 07:29

1 Answers1

0

Translated from Manchester syntax to turtle, this seems to be the answer:

ex:colours rdf:type skos:ConceptScheme ;
  skos:hasTopConcept ex:teal ;
  skos:hasTopConcept ex:green .

ex:teal rdf:type skos:Concept ;
  skos:inScheme ex:colours ;
  skos:topConceptOf ex:colours .

ex:green rdf:type skos:Concept ;
  skos:inScheme ex:colours ;
  skos:topConceptOf ex:colours .

ex:P_has_colour rdf:type owl:ObjectProperty ;
  rdfs:domain ex:ColoredStuff ;
  rdfs:range [ owl:intersectionOf ( :ConceptScheme
                                  [ rdf:type owl:Restriction ;
                                    owl:onProperty :inScheme ;
                                    owl:hasValue :colours
                                  ]
                                ) ;
             rdf:type owl:Class
           ] .
Amleth
  • 1
  • 1