我想对特定类的个体可以通过对象属性获取的值添加限制。
例如,我有类 GPS
和 Means
(包含实例 Spoofing
、Jamming
、Speed_Change
、Sign_Change
)通过对象属性HasMeans
连接:
GPS -----> 具有平均值平均值
我想确保GPS
类的任何实例只能连接到Means
类实例Jamming
和Spoofing
而不是其他。
如果我说 GPS
实例 G1
HasMeans
Speed_Change
,我的目标是在运行时将其分类为错误推理者。
提前致谢!
最佳答案
您需要以下 OWL2 功能:
在 Manchester Syntax在 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
这就是不一致解释的样子:
关于owl - 在Protege中添加限制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50004546/