如何将类的每个实例与另一个类的每个实例相关联? [英] How to relate each instance of class with each instance of another class?

查看:109
本文介绍了如何将类的每个实例与另一个类的每个实例相关联?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Protégé4.3开发一个简单的本体,并尝试创建一个模型,使类 C 的每个实例都具有特定的值 v ,该值是给定属性 p 的类 V 的实例.我可以使用一个公理得到这个推论

I'm working on a simple ontology, using Protégé 4.3 and trying to create a model such that every instance of a class C has some particular value v, which is an instance of a class V, for a given property p. I can get this inference using an axiom

C subClassOf (p v)

但是我想我希望能够更像a

but I think I want to be able to state this more along the lines of a

C subClassOf (p 一些 V)

因为我实际上希望每个 C 实例都与 V 的每个 实例相关.

because I'd actually like each instance of C to be related to every instance of V.

我的示例是汽车和动作-我想为汽车创建一组动作.当我创建汽车的新实例时,我希望每个实例都有一套动作.如果我添加了新的动作实例,我希望所有汽车实例都能反映出它们所有相关的动作.

My example is automobiles and actions — I want to create a set of actions for automobiles. When I create new instances of automobiles I want each to have a set of actions. If I add new instances of actions I want all the instances of automobiles to reflect all their related actions.

为了添加更多细节,我定义了 Auto 类和两个子类: Car Truck .我还定义了一个 Action 类和一个子类 TruckAction .我定义了一个 hasAction 属性,其域为 Auto ,范围为 Action ,用于关联自动操作和操作.我进一步创建了几个不同类型的人:

To add further detail, I have defined the Auto class and two subclasses: Car and Truck. I have also defined an Action class and a subclass, TruckAction. I have defined a hasAction property with domain Auto and range Action to relate autos and actions. I have further created several individuals of different types:

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