is it correct that a class can be an instance?

烂漫一生 提交于 2019-12-23 02:16:10

问题


In this document https://www.w3.org/TR/rdf-schema/#ch_introduction

it is written:

rdfs:Resource is an instance of rdfs:Class.

however it is also written:

This is the class of everything

is this a typo? can a class be an instance ?


回答1:


That's actually an interesting question. I just want to add to your comment in CaptSolo's answer:

but can I define my custom classes as instances of an instance? ( i highly doubt that )

It's not so much a question of whether you "can" do something or not (at least not in this case), but rather whether what you do will make sense. After all the Semantic Web was built on the premise that anyone can say anything about anything. Sometimes there are consequences, which can lead to "logical" inferences about your data.

So this one makes sense:

:foo a rdfs:Class.
:bar a :foo.

while this one doesn't:

:george a foaf:Person.
:foo a :george.

Can you assert both? Technically speaking, yes, I don't think there is a triple store that will stop you from doing so. But the latter is illogical - every RDFS class is defined as the set of its instances, so you are treating a person, "George", as a concept of sorts. If your ontology or data doesn't make sense, then none will use it.




回答2:


All RDFS classes are instances of the rdfs:Class class. Since rdfs:Resource is a class of everything it is also a class and thus an instance of rdfs:Class.

This may make sense if you consider that RDFS is itself defined in RDFS. What other type would you define rdfs:Class to be if not the rdfs:Class itself?

About "can class be an instance?" - when defining an ontology you define classes as instances of rdfs:Class or owl:Class. Technically they already are instances [of these classes].



来源:https://stackoverflow.com/questions/35866473/is-it-correct-that-a-class-can-be-an-instance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!