简体   繁体   English

如何在 OWL API 中将 object 属性与 class 一起使用?

[英]How to use object property with class in OWL API?

I'm currently using OWL API and Protege, and I have a problem, because Protege allows me to do something like this:我目前正在使用 OWL API 和 Protege,但我遇到了问题,因为 Protege 允许我执行以下操作:

在此处输入图像描述

This is pizza ontology.这是披萨本体。 I have individual Americana, and I add "hasBase DeepPanBase" (which is called in WebProtege as Relationship, in desktop version it is placed in Types), where hasBase is object property and DeepPanBase is class.我有个人 Americana,我添加了“hasBase DeepPanBase”(在 WebProtege 中称为关系,在桌面版本中它放置在类型中),其中 hasBase 是 object 属性,DeepPanBase 是 class。

Problem is that in OWL API I have function getOWLObjectPropertyAssertionAxiom, but it works for object property and two individuals.问题是在 OWL API 我有 function getOWLObjectPropertyAssertionAxiom,但它适用于 object 财产和两个人。

Is there a way to copy Protege approach and use class, or at least do some static individual?有没有办法复制 Protege 方法并使用 class,或者至少做一些 static 个人? Or should I jst do another individual for each scenario and that's it?或者我应该为每个场景做另一个人,就是这样?

The Types panel in Protégé refers to classes and the expression you see, with a qualifier, an object property and a class is a class expression (for example, an existential or universal restriction). Protégé 中的“类型”面板指的是类和您看到的表达式,带有限定符、object 属性和 class 是 class 表达式(例如,存在或通用限制)。 These are represented as class assertions or subclass assertions (depending whether the subject is an individual - class assertion - or you're declaring a superclass for a class).这些表示为 class 断言或子类断言(取决于主题是否是个人 - class 断言 - 或者您正在为一个类声明一个超类)。

For OWLAPI introduction: the most recent tutorial is linked here https://github.com/owlcs/owlapi/wiki/Tutorial:-A-starter 's-starter OWLAPI介绍:最新教程链接在这里https://github.com/owlcs/owlapi/wiki/Tutorial:-A-starter 's-starter

The wiki has a lot more docs. wiki 有更多的文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM