It would be nice to support SPARQL as one of the query languages.
Here is an example query that matches book title.
SELECT ?title
WHERE {
<book1> <title> ?title .
}
Let's omit prefixes and assume we currently support only SELECT ... WHERE ... queries for now.
Some related implementation are available in la-n-egg-rpq.