My ontology consists of three classes: A, B, C and they connect like this A->B->C (A.hasB and B.hasC). A has attributes hasName and hasB, B has the attribute hasC and C has the attribute hasDog (there are no subclasses).
Now, I want to find all C instances that have satisfy two qualifiers: hasDog = "Fido" AND are linked (via B) to an A instance with a hasName ="foo". Do I need to specify that C instances link to A instances via B or is that in the rules /ontology support? Do the links in my ontology need to be bidirectional for this to work?
In my sparql query I want to just state the name filters on the nodes; A.hasName="foo" and C.hasName="bar". I would
like either a rulebase or semantic inference to apply (or hold) the logic that A connects to B which connects to C when running the query. That way I do not have to put the connection logic into each sparql query (like you do in an sql statement where you specify foreign/primary key connections to link tables in the where clause)
What is the right way to implement/define the connections between the classes in an ontology? Is it rules?
It looks like I can basically load my owl file but the Oracle docs are a little vague in this area. I am also not finding the right information on NDM to know if that is the right path.
We want our application to be ontology independent so currently we are running a bunch of queries to find how A links to C, there must be a better way to handle this. Any ideas greatly appreciated.