Steve; To get the immediate children of Books, use:
SELECT ?subc
WHERE {
?subc rdfs:subClassOf :Books
}
subClassOf* will get the transitive subclasses including the object.
Use '+' to omit the object.
-- Scott
On May 15, 12:49 pm, dalguy72 <[email protected]> wrote:
> Let's say I have an ontology with the follownig tree structure ( a
> simplified example from the class view in topbraid):
>
> Media
> -----Books
> --------Horror
> --------Science Fiction
> --------Comedy
> --------History
> --------------US History
> --------------World History
> -----DVDs
> -------Horror
> -------Drama
> -------Action
>
> And I want to construct a sparql query that will give me all the
> "children" for a specific node (i.e. Books as the selection would
> return Horror, Sci Fiction, Comedy, History, US History, World
> History, while DVDs -> Horror would return an empty item, while DVDs
> would return Horror, Drama, Action). The ontology itself has a
> "rdf:subClassOf" which points back to the parent class. Is there
> anyway to do this in one statement inside topbraid composer, or would
> I need to write a small program to iterate through the answers and ask
> it several times.
>
> Steve
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TopBraid Composer Users" group.
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-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---