How could I do this using only a single query? Shoud I do this with SPARQL? If not, do You know another ontology query language to do this?

SPARQL can't do arbitrary path expressions.

Look at:

http://psparql.inrialpes.fr/

for an extension that can. You might also want to look at the path expressions offered by WQL:

http://wilbur-rdf.sourceforge.net/2004/05/11-comparison.shtml

or at running your queries on an inferencing store, if your is-a relationships are transitive.

Another question: what do the CONSTRUCT work?

Sorry, you'll have to rephrase that.

Reply via email to