Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] SPARQL for distance

James Howison james at howison.name
Wed Mar 25 13:33:48 PDT 2009


Yeah, I'm not entirely sure what you are getting at, concrete data  
with real semantics in Turtle format usually helps.  Otherwise we're  
left reconstructing what your data might look like on the basis of  
your queries ...

I could be well off base, but you might want to look at property  
paths, a recent extension to the ARQ SPARQL syntax.

http://seaborne.blogspot.com/2008/07/arq-property-paths.html

I suspect, though, that you'd be better off with simpler queries,  
after using OWL restrictions and/or SWRL rules to encode/introduce the  
semantics that you are getting at.

--J

On 25 Mar 2009, at 4:16 PM, Pitonyak, Andrew D wrote:

> I want to obtain all "triples" of distance one, two, or three from a  
> set of individuals.  For example, the following two queries provide  
> the set of distance one and then distance two from two individuals.  
> I was hoping for an easier way...
>
> For distance 1, I can use things such as:
>
> SELECT DISTINCT ?x ?y ?z
> WHERE {
>  ?x ?y ?z
>  FILTER (
>    STR(?x) = "http://wow#Person1" ||
>    STR(?z) = "http:// wow#Person1" ||
>    STR(?x) = "http://wow#Person2" ||
>    STR(?z) = "http:// wow#Person2"
>  )
> }
>
> For distance two, I can use something such as:
>
> SELECT DISTINCT *
> WHERE {
>  ?x ?y ?z .
>  ?z ?a ?c
>  FILTER (
>    STR(?x) = "http://wow#Person1" ||
>    STR(?z) = "http:// wow#Person1" ||
>    STR(?x) = "http://wow#Person2" ||
>    STR(?z) = "http:// wow#Person2"
>  )
> }
>
>
> --
> Andrew Pitonyak
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03




More information about the protege-owl mailing list