简体   繁体   English

OWL中的子组和超组(类/子类)关系

[英]Sub-group and Super-group (Class/Subclass) relation in OWL

I need some help regarding OWL syntax. 我需要有关OWL语法的帮助。 I have a synthetic population class called 'Person'. 我有一个称为“ Person”的综合人口课程。 Person contains population information, and PersonWithinAdminRegion is another class represents subgroup of person class. 人员包含人口信息,而PersonWithinAdminRegion是另一个类,代表人员类的子组。 For example 'Person' class contains information about all persons in the USA. 例如,“人员”类包含有关美国所有人员的信息。 FloridaPerson or MiamiPerson can be an example of PersonWithinAdminRegion. FloridaPerson或MiamiPerson可以是PersonWithinAdminRegion的示例。 Basically, PersonWithinAdminRegion is a subgroup of supergroup Person. 基本上,PersonWithinAdminRegion是超组Person的子组。 It not sub-class because sub-class inherits properties of super-class and add some more. 它不是子类,因为子类继承了超类的属性并添加了更多属性。 It is not the case in my situation. 在我的情况下情况并非如此。 My question is how to show sub-group of a super-group in OWL syntax? 我的问题是如何在OWL语法中显示超组的子组?

Person a owl:Class.
PersonWithinAdminRegion ? ?

There is no inheritance in OWL. OWL中没有继承。 Therefore no properties are inherited by subclasses. 因此,子类不会继承任何属性。 The subclass hierarchy is a type of subsumption hierarchy with only one semantic: a member of a subclass is a member of the (super) class. 子类层次结构是一种仅具有一种语义的包含层次结构:子类的成员是(super)类的成员。 An example: 一个例子:

:Person a owl:Class .
:PersonWithinAdminRegion a owl:Class .
:PersonWithinAdminRegion rdfs:subClassOf :Person .
:FloridaPerson a :PersonWithinAdminRegion .

From this, one can infer: 由此可以推断:

:FloridaPerson a :Person .

And that is all. 仅此而已。 No other properties or values will be inferred. 不会推断其他属性或值。 Eg RDFS and OWL semantics are more like set theory (classification) than object-oriented class definition. 例如,RDFS和OWL语义比面向对象的类定义更像集合论(分类)。

So it seems the above will get you the semantics that you want. 因此,上述内容似乎可以为您提供所需的语义。 If you wanted to go deeper into the subsumption hierarchy, let's say: 如果您想更深入地归入包含层次,请说:

:PersonInFloridaRegion rdfs:subClassOf :PersonWithinAdminRegion .
:p1 a :PersonInFloridaRegion .

...then you will be able to infer: ...那么您将可以推断:

:p1 a :PersonWithinAdminRegion .
:p1 a :Person .

...and so on. ...等等。

Even though I am still not sure of your modelling perspective, and whether there are some properties that Person has, but PersonWithinAdminRegion , doesn't. 即使我仍然不确定您的建模角度,以及Person是否具有某些属性,但PersonWithinAdminRegion却不确定。 Here is an idea for solution. 这是解决方案的想法。

You can create a generic class Person , and a subclass of it USAPerson , then a PersonWithinAdminRegion , which is a subclass of Persons as well and a sibling of PersonWithinAdminRegion . 您可以创建一个通用类Person ,以及它的USAPersonsubclass ,然后创建一个PersonWithinAdminRegion ,它也是Personssubclass ,也是PersonWithinAdminRegion的同级。 Thus: 从而:

  1. Both USAPerosn and PersonWithinAdminRegion are Person ; USAPerosnPersonWithinAdminRegion均为Person ;
  2. Persons will include USAPersons , so when make a subset of Person you can still have the control over USAPerosn ; Persons将包括USAPersons ,因此当创建Person的子集时,您仍然可以控制USAPerosn
  3. PersonWithinAdminRegion can still not have properties that USAPerson have. PersonWithinAdminRegion仍然不能具有USAPerson拥有的属性。

     Person a owl:Class USAPerson a owl:Class PersonWithinAdminRegion a owl:Class USAPerson rdfs:subClassOf Peron PersonWithinAdminRegion rdfs:subClassOf Peron 

Hope this helps. 希望这可以帮助。

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

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