- From: Peter Wilson <pwilson@gorge.net>
- Date: Mon, 11 Apr 2005 09:31:09 -0700
- To: public-rdf-dawg-comments@w3.org
I am working on a SPARQL engine written in Javascript.
In implementing this engine I added some of the features that the
Mozilla RDF implementation makes particularly easy:
1.WHERE RESOURCES(?R) This binds ?R, in turn, to all the resources
in the current graph.
2.WHERE ARCSOUT(?S ?P) This binds ?P, in turn, to all predicates
referenced by the specified subject for some object.
3.WHERE ARCSIN(?O ?P) This binds ?P, in turn, to all predicates
which reference the specified object for some subject.
These are all hard to achieve using the current SPARQL features.
4.WHERE IN(list of literals or resources ?V) This binds ?V, in turn, to
each literal or resourse in the list.
SELECT ?S ?P ?V
WHERE IN(1 2 <ns:someName> ?V) (?S ?P ?V)
IN may also be used as a value check when ?V is already bound. This is
inspired by the very useful SQL IN clause.
5. I have not yet implemented this predicate yet but I have been
considering :
WHERE FIRST( patternElementList )
This operates like a UNION but only succeeds for the first
successful patternElement (if any). This would allow a default/fallback
mechanism
when the current graph does not contain some expected facts.
Peter Wilson
Received on Monday, 11 April 2005 16:27:39 UTC