Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
986 views
in Technique[技术] by (71.8m points)

rdf - How to change the tag when creating a class

so, when someone creates a subclass of something in Protegé, this is what comes out of It:

:Wedding rdf:type owl:Class
     rdfs:subClassOf bruh:Event

Given that "bruh" is a prefix that I have instanciated, because of an ontology that I am reusing. How can I do something more like this:

:Wedding rdf:type bruh:Ocurrence
     rdfs:subClassOf bruh:Event

Since "Occurence" is a class that I am reusing? It's not the same as creating instances, right?

question from:https://stackoverflow.com/questions/65834033/how-to-change-the-tag-when-creating-a-class

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
:Wedding rdf:type bruh:Ocurrence

This is the declaration of an instance, with IRI :Wedding.

:Wedding rdf:type owl:Class

This is the declaration of a class, with IRI :Wedding.

This is called punning (i.e., using the same IRI for different categories of entities. As mentioned by @ssz in the comment, this is allowed in OWL 2 DL (classes and individuals can share an IRI, but not properties - a data property and an object property cannot share an IRI, this would make the ontology OWL 2 Full).

However, you should expect these to appear as separate axioms (the subclassof property won't appear on the XML element describing the instance, it will appear on the class).

Note that punned individuals and classes are not related logically, they just happen to have the same name. So, it is important to know why you wish to pun them - you're not mentioning this in the question, so I wonder if you are trying to pun the entities or just trying to describe one of the two - the class or the individual.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...