Here's some context.  I need to walk an object hierarchy when the 
parent/child relationships are not always the same.  Here's a contrived 
example.  Notice the direction of the arrows

United States <- gn:parentFeature <- New York <- gn:parentFeature <- Kings 
County -> v:hasOrganizationUnit -> Walmart -> v:hasOrganizationalUnit -> 
Walmart Pharmacy -> :locatedAt -> Aisle 2 -> :locatedAt -> Shelf 3

I want to set things up so given a URI, I can get a list of the ancestors. 
 So if I called GetAncestors(Walmart Pharmacy) I would get Walmart, Kings 
County, New York, United States.  Or if I called it on Shelf 3, I would 
start there and work my way to United States.

I've identified two things that are making this challenging:
1.) inconsistent parent/child predicate.  In some ontology it might be 
hasOrganizationalUnit and in another it might be locatedAt.
2.) Inconsistent direction for the hierarchy.  So in some it might be a 
narrower and in another it's a broader relationship.

I was playing around with one idea:
make gn:parentFeature a rdfs:subPropertyOf skos:broader.
This allows me to make this kind of query:
SELECT *
WHERE {
?narrowerPredicate rdfs:subPropertyOf* skos:narrower .
?broader ?narrowerPredicate ?narrower .  # Cannot use ?narrowerPredicate*
}

But, I cannot use property paths on variables (is there a way to do this?) 
so I can't 'walk' the object hierarchy.
This also still leaves me with the trouble of walking the hierarchy when 
the relationships suddenly change to a broader type.

I'm open to extending these ontologies to make queries easier, but the 
objective is to have a very generic query that handles this.  Is it 
possible?

Thank you!

Bart Petersen

-- 
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, 
SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to