%%ontology @uses: configOptions % %%namespace dco http://denkbares.com/ConfigOptions/ % !! Definitions Configuration Options %%turtle dco:ConfigOptionAssignment a owl:Class . dco:hasOption a owl:ObjectProperty . dco:hasOptionValue a owl:ObjectProperty . dco:ConfigOption a owl:Class . dco:ChoiceConfigOption rdfs:subClassOf ConfigOption . dco:ChoiceValue a owl:Class . dco:availableChoice a owl:ObjectProperty . % !! Definitions Constraints %%turtle dco:Constraint a owl:Class . dco:hasDisjointSet a owl:ObjectProperty . dco:contradicts a owl:ObjectProperty . % !! Definitions Car configuration set %%turtle dco:CarConfigSet a owl:Class. dco:hasConfigAssignment a owl:ObjectProperty . % ! Option Engine %%turtle dco:Engine a dco:ChoiceConfigOption ; dco:availableChoice dco:SmallEngine, dco:MediumEngine, dco:Turbo . dco:SmallEngine a ChoiceValue . dco:MediumEngine a ChoiceValue . dco:Turbo a ChoiceValue . % ! Option Hitch %%turtle dco:Hitch a dco:ChoiceConfigOption ; dco:availableChoice WithHitch, WithoutHitch . dco:WithHitch a ChoiceValue . dco:WithoutHitch a ChoiceValue . % ! Constraint 1 : Hitch contradicts Small Engine %% %%turtle dco:HitchConstradictsSmallEngine a Constraint ; hasDisjointSet (dco:WithHitch dco:SmallEngine) . % !! Car 1 %%turtle dco:Car1 a CarConfigSet ; hasConfigAssignment [ hasOption Engine; hasOptionValue MediumEngine ] , [ hasOption Hitch; hasOptionValue WithHitch] . % !! Car 2 %%turtle dco:Car2 a CarConfigSet ; hasConfigAssignment [ hasOption Engine; hasOptionValue SmallEngine ] , [ hasOption Hitch; hasOptionValue WithHitch] . % %%sparql SELECT ?option ?value WHERE { dco:Car2 dco:hasConfigAssignment ?assignment. ?assignment dco:hasOption ?option . ?assignment dco:hasOptionValue ?value . } % !! Constraint Validation Query %%package configOptions