I’m interested in modelling an ontology where entities inherit related “properties” (also entities) from other entities.
I have written a small example, with two types of relations:
And added the following instances:
drink has water as an ingredient.
sweetDrink inherits from drink and has sugar as an ingredient.
coffeeDrink inherits from drink and has coffee as an ingredient.
sweetCoffee inherits from sweetDrink and coffeeDrink.
My goal is to query sweetCoffee’s ingredients as fast as possible from a Java API.
I didn’t want to over-complicate the example, but my ingredients also have ingredients, and can inherit them from other ingredients as well, etc.
What is the best approach to do this with Graql/Graph APIs?