在OWL中表示UML图 [英] Represent UML diagram in OWL

查看:94
本文介绍了在OWL中表示UML图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个类 Person Vehicle ,它们之间具有 owns .

I have two classes Person and Vehicle having owns as relation between them.

它们之间具有1 to many关系,就像一个人可以拥有许多车辆一样.人员具有属性名称"(人员名称),车辆也具有属性名称"(品牌名称). 问题是如何使用protege编辑器在OWL中对此建模? 如果在' owns '关系上有一个属性说' DateOfPurchase ',该如何在OWL中表示呢?

There is 1 to many relation between them like one person can own many vehicles. Person has attribute 'name' (person name) and vehicle also has attribute 'name' (brand name). Question is how to model this in OWL using protege editor? If there is an attribute on 'owns' relation saying 'DateOfPurchase' how to represents this in OWL ?

推荐答案

OWL中的对象属性描述个人之间的关系,而不是类之间的关系.这是一个借来的" URI,仅此而已.因此,您需要对每个语句(例如:PersonA :owns :VehicleB)进行验证. RDF允许,但是Protégé不允许.因此,这是一种解决方法:

Object properties in OWL describe relation between individuals, not between classes. It is a "borrowed" URI, nothing else. So, what you need is to reify each statement such as :PersonA :owns :VehicleB. RDF allows that, however Protégé does not. So, here's a workaround:

您创建两个对象属性:hasSubjectOfOwns:hasObjectOfOwns,对于每种情况,您都需要描述dateOfPurchase,定义一个代表该语句的个体,并断言:

You create two object properties :hasSubjectOfOwns and :hasObjectOfOwns, and for each case you need to describe dateOfPurchase, you define an individual representing the statement, and assert :

:AownsB :hasSubjectOfOwns :PersonA; :hasObjectOfOwns :VehicleB; :dateOfPurchase "2014-10-01"^^xsd:date

最初,您需要创建一个属性链,在Protégé中将如下所示: inverse (hasSubjectOfOwns) o hasObjectOfOwns SubPropertyOf owns

Initially you'd need to create a property chain, which in Protégé would look like that: inverse (hasSubjectOfOwns) o hasObjectOfOwns SubPropertyOf owns

这篇关于在OWL中表示UML图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆