什么时候在 RDFS 中使用子类? [英] When to use the subclass in RDFS?

查看:61
本文介绍了什么时候在 RDFS 中使用子类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个关于场地信息的 RDFS 模式,其中包含例如:

I want to create a RDFS schema about venue info which contains for example:

只有照片和地址信息.

我找到了另一个关于它的架构:https://schema.org/Place.它包含的属性比我需要的要多.

I find another schema about it: https://schema.org/Place. It contains more properties than I need.

那么,我应该将我的模式场所作为 https://schema.org/Place 的子类吗?
或者我只是创建一个新类但重用 https://schema.org/Place 中的属性?

So, should I make my schema venue as a subclass of https://schema.org/Place?
Or I just make a new class but reuse the properties in https://schema.org/Place?

他们有区别吗?

推荐答案

语义网/链接数据的生命在于重用现有词汇,所以如果你只需要现有词汇的一个子集,最好不要重新发明任何新模式,但只是使用现有模式的部分.然后,您的数据甚至无需任何推理即可有用.

The semantic web / linked data lives of the re-use of existing vocabularies, so if you only need a sub-set of existing vocabularies, it's best to not re-invent any new schema, but just to use parts from existing ones. Your data will then even be useful without any reasoning.

此外,仅仅因为您使用现有词汇表并不意味着您需要使用其所有属性或类.把那些你不感兴趣/不能提供的东西留下.

Also, just cause you're using an existing vocabulary doesn't mean you need to use all of its properties or classes. Just leave those away that you're not interested in / can't provide.

那么,我应该将我的模式场所作为 https://schema.org/Place 的子类吗?或者我只是创建一个新类但重用 https://schema.org/Place 中的属性?

So, should I make my schema venue as a subclass of https://schema.org/Place? Or I just make a new class but reuse the properties in https://schema.org/Place?

因此,根据上述内容,我建议根本不要创建新类,而只需使用 https://schema.组织/地点.

So by the above i'd recommend not to create a new class at all, but just use https://schema.org/Place.

他们有区别吗?

是的,来自推理 &他们所做的验证立场.属性可以具有或多或少的特定域和范围.如果您创建了一个新类并且您要使用的属性域不是新类的超类,则在您的类的实例上使用该属性将是错误的.以 https://schema.org/address 为例,它可以与 https://schema.org/Organizationhttps://schema.org/Personhttps://schema.org/Place.如果您创建的类不是其中之一的子类,则不应使用 https://schema.org/address 在其任何实例上.

Yes, from a reasoning & verification standpoint they do. Properties can have more or less specific domains and ranges. If you create a new class and the domain of the property you want to use is not a super-class of your new class, it would be a mistake to use that property on instances of your class. As an example look at https://schema.org/address, it can be used with instances of type https://schema.org/Organization, https://schema.org/Person and https://schema.org/Place. If you create a class that is not a subclass of one of them you shouldn't use https://schema.org/address on any of its instances.

这篇关于什么时候在 RDFS 中使用子类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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