AlexSC
AlexSC

Reputation: 1933

How to declare a custom class relation in OWL2

My apologies if my question is too basic, but after some time looking for an answer, I had nowhere to go but here.

Suppose the following classes in an ontology (expressed in an OWL 2 file):

<owl:Class rdf:ID="ClasseOne">
</owl:Class>

<owl:Class rdf:ID="ClasseTwo">
</owl:Class>

What I have is 1000 instances of ClassOne and 5000 instances of ClassTwo. In my reality all the ClassOne instances are related in the very same way (let's say the relationship is named "isRelatedTo") to all the instances of ClassTwo.

My idea was to declare a class relation and use it in the declaration of ClassOne, instead of having an ObjectProperty that should have its value declared in each ClassOne instance.

How to accomplish that?

Thanks in advance!

Upvotes: 1

Views: 211

Answers (1)

UninformedUser
UninformedUser

Reputation: 8465

Classes are not related by properties in OWL except for subsumption/equivalence. Usually, individuals of a class A are related to individuals of a class B by a property p, e.g. A(a1), B(b1), p(a1, b1) states that an individual a1 of class A is related by p to an individual b1 of class B.

You could express something like any individual of A has a relationship p to an individual of B by using a subclass axiom with an OWL class expression as super class, e.g.

Class: A SubClassOf: p some B

(in Manchester OWL Syntax here)

Note, that this doesn't necessary mean the other way around, i.e. the direction matters.

Upvotes: 2

Related Questions