I have two classes A and B and I want to assert that A is relatedClass B.
I want to do it at a class level, at first I thought of creating an object property relatedClass and adding that assertion. But I can only do that between individuals.
OWLObjectProperty related = dataFactory.getOWLObjectProperty(IOR + "#relatedClass");
OWLAxiom axiom = dataFactory.getOWLObjectPropertyAssertionAxiom(related, classA, classB);
This is incorrect because the method expects classA and classB to be individuals.
Is it possible to set relationships between classes? How is it done using the OWL API?
I'm following this pattern to transform a taxonomy and it says:
Assert that competence is relatedClass of performance
Where both competence and performance are classes.
Update
Ok, so based on your answers and comments I've been trying to understand which relationship is the pattern talking about. But I'm at a loss.
Firstly, the meaning of related is the same that the meaning of skos:related so it's very general:
The property skos:related is used to assert an associative link between two SKOS concepts.
It's is used when two concepts are related but one isn't a more general or specific concept of the other. Plus, it's a symmetric property. One example from my domain is that "Information Systems" is related to "Systems security" (but as you can see it's a very generic kind of relationship).
Here is the diagram that is included as part of the pattern:
And here is a (very blurry, but that's how it looks on the paper) version of the diagram for the example:
So what I'm getting from here is that it needs to be an ObjectProperty and I have to set up the domain and range, but how does it work if:
ClassA related ClassB
ClassC related ClassD
How do I set the domain and range in that case? Or do you think I should have one per pair of related classes?


relatedrelation might be an annotation property. Annotation property assertions are created with similar methods to object property assertions. - Ignazio