W3C home > Mailing lists > Public > semantic-web@w3.org > April 2007

Re: Question about ontology query languages... (please reply!!!)

From: Bijan Parsia <bparsia@cs.man.ac.uk>
Date: Wed, 11 Apr 2007 17:56:05 +0100
Message-Id: <AAD27648-8535-461E-835B-C4FC18A8C8EF@cs.man.ac.uk>
Cc: semantic-web@w3.org
To: "Cristina Lancioni, Doctor in Computer Science" <cristina.lancioni@unicam.it>

On 10 Apr 2007, at 14:10, Cristina Lancioni, Doctor in Computer  
Science wrote:

> Hello,
> I'm a phd student in Information Technology at the University of  
> Camerino (Italy).
> I would like to know if it's possible to do recursive queries in  

"Recursive query" can mean several things.

> In fact I've this problem. I've an ontology in OWL with only  
> relations is-a.

Do you mean the subclass tree? are you using subclassof?

> This ontology is made like a tree. I would like to select a  
> subgraph made of the path from the leaf node to the root node  
> (result example: A(leaf) is-a B is-a C is-a D(root)).

Are you querying for class names?

> 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?

If you are building the ontology yourself, you could use a transitive  
role in the ontology (e.g., for is-a), then a standard sparql query  
will do the job (assuming that the store supports it).

There are some query languages that support a transitive closure  
operator in the query, e.g., the one with Kowari/whatever it's called  
now, the one in wilbur (which has more general regular expressions),  
or you might try SPARQL Rules

Vanilla sparql will not do the job.

You could also lobby your favorite engine implementor for an extension.

Received on Wednesday, 11 April 2007 16:55:27 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 08:45:00 UTC