Arunava Maulik
Arunava Maulik

Reputation: 63

Add Restriction in Protege

I would like to add restrictions to the values that individuals of a particular class can take via an object property.

For example, I have the classes GPS and Means (contains instances Spoofing, Jamming, Speed_Change, Sign_Change) connected by the object property HasMeans:

GPS -----> HasMeans Means

I want to ensure that any instance of the class GPS can only connect to the Means class instancesJamming and Spoofing and not the others. If I say GPS instance G1 HasMeans Speed_Change, my objective is to classify this as an error when I run the reasoner.

Thanks in advance!

Upvotes: 2

Views: 1983

Answers (1)

Stanislav Kralin
Stanislav Kralin

Reputation: 11479

You need the following OWL2 capabilities:

In the Manchester Syntax used in Protégé:

Prefix: : <https://stackoverflow.com/q/50004546/7879193#>

Ontology: <https://stackoverflow.com/q/50004546/7879193>

Class: GPS
    SubClassOf: hasMean only {jamming, spoofing}

Class: Mean

ObjectProperty: hasMean
    Domain: GPS
    Range: Mean

Individual: gps1
    Types: GPS
    Facts: hasMean jamming, hasMean spoofing

Individual: gps2
    Types: GPS
    Facts: hasMean spoofing, hasMean speed_change

DifferentIndividuals: 
    jamming, spoofing, speed_change

Individual: jamming
    Types: Mean 

Individual: spoofing
   Types: Mean

Individual: speed_change
   Types:  Mean

This is how inconsistency explanation looks like:

Laconic inconsistency explanation screenshot

Upvotes: 2

Related Questions