On 1/6/17 4:42 AM, Olivier Filangi wrote: > Dear all, > > I have a strange behaviour with a kind of query with Virtuoso (07.20.3217). > > Accoding the following tripplet I put with a insert query : > > PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> > PREFIX :<urn:my:graph> > > > INSERT DATA > { > GRAPH <mygraph> { > :A rdf:type :mytype1. > :B rdf:type :mytype1. > :C rdf:type :mytype1. > > :X1 rdf:type :mytype2. > :X2 rdf:type :mytype2. > > :A :myrel :X1. > :B :myrel :X2. > :C :myrel :X1. > } > }
Next time around, you can use Nanotation [1], we can make this a live
example by simply placing the Turtle within {} and then sponging
(importing) the URI of this response into our live URIBurner instance
[2]. For example:
{
@prefix : <#> .
:A rdf:type :mytype1.
:B rdf:type :mytype1.
:C rdf:type :mytype1.
:X1 rdf:type :mytype2.
:X2 rdf:type :mytype2.
:A :myrel :X1.
:B :myrel :X2.
:C :myrel :X1.
}
Anyway, I've loaded the sample data into the URIBurner instance [3], and
I have the following query solution:
http://linkeddata.uriburner.com/sparql?default-graph-uri=&query=%23+define+get%3Asoft+%22no-sponge%22%0D%0A%0D%0APREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0APREFIX++++%3A+%3Chttp%3A%2F%2Fkingsley.idehen.net%2FDAV%2Fhome%2Fkidehen%2FPublic%2FSPARQL%2Ftest-data%2Fproperty-paths-1.ttl%23%3E%0D%0A%0D%0ASELECT+DISTINCT+%3FA+%3FB%0D%0AFROM+%3Chttp%3A%2F%2Fkingsley.idehen.net%2FDAV%2Fhome%2Fkidehen%2FPublic%2FSPARQL%2Ftest-data%2Fproperty-paths-1.ttl%3E%0D%0AWHERE%0D%0A%7B+%0D%0A%3FA+%3FsubProperty8+%3FB.%0D%0A+++++%3FsubProperty8+rdfs%3AsubPropertyOf*+%3Amyrel.%0D%0A%0D%0A%23constraint+1%0D%0A+++++%3FA+rdf%3Atype+%3FA_SubClassOf.%0D%0A+++++%3FA_SubClassOf+rdfs%3AsubClassOf*+%3Amytype1.%0D%0A%0D%0A%23constraint+2%0D%0A+++++%3FB+rdf%3Atype+%3FB_SubClassOf.%0D%0A+++++%3FB_SubClassOf+rdfs%3AsubClassOf*+%3Amytype2.%0D%0A%0D%0A%7D%0D%0A&should-sponge=&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=30000000
Conversely, using your data verbatim reveals an issue with @prefix
handling :
http://linkeddata.uriburner.com/sparql?default-graph-uri=&query=%23+define+get%3Asoft+%22no-sponge%22%0D%0A%0D%0APREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0APREFIX++%3A+%3Chttp%3A%2F%2Fkingsley.idehen.net%2FDAV%2Fhome%2Fkidehen%2FPublic%2FSPARQL%2Ftest-data%2Fproperty-paths-2.txt%23%3E%0D%0A%0D%0ASELECT+DISTINCT+%3FA+%3FB%0D%0AFROM+%3Chttp%3A%2F%2Fkingsley.idehen.net%2FDAV%2Fhome%2Fkidehen%2FPublic%2FSPARQL%2Ftest-data%2Fproperty-paths-2.txt%3E%0D%0AWHERE%0D%0A%7B+%0D%0A%3FA+%3FsubProperty8+%3FB.%0D%0A+++++%3FsubProperty8+rdfs%3AsubPropertyOf*+%3Amyrel.%0D%0A%0D%0A%23constraint+1%0D%0A+++++%3FA+rdf%3Atype+%3FA_SubClassOf.%0D%0A+++++%3FA_SubClassOf+rdfs%3AsubClassOf*+%3Amytype1.%0D%0A%0D%0A%23constraint+2%0D%0A+++++%3FB+rdf%3Atype+%3FB_SubClassOf.%0D%0A+++++%3FB_SubClassOf+rdfs%3AsubClassOf*+%3Amytype2.%0D%0A%0D%0A%7D%0D%0A&should-sponge=&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=30000000
Conclusion:
There is an issue with @prefix handling regarding the Turtle source data
when loaded into Virtuoso.
My initial presumptions about property-paths "*" operator where
inaccurate i.e., "*" is indeed about 0 or more occurrences of a relation
in the property path expression.
Links:
[1] http://kidehen.blogspot.com/2014/07/nanotation.html
[2] http://linkeddata.uriburner.com/sparql
--
Regards,
Kingsley Idehen
Founder & CEO
OpenLink Software (Home Page: http://www.openlinksw.com)
Weblogs (Blogs):
Legacy Blog: http://www.openlinksw.com/blog/~kidehen/
Blogspot Blog: http://kidehen.blogspot.com
Medium Blog: https://medium.com/@kidehen
Profile Pages:
Pinterest: https://www.pinterest.com/kidehen/
Quora: https://www.quora.com/profile/Kingsley-Uyi-Idehen
Twitter: https://twitter.com/kidehen
Google+: https://plus.google.com/+KingsleyIdehen/about
LinkedIn: http://www.linkedin.com/in/kidehen
Web Identities (WebID):
Personal: http://kingsley.idehen.net/dataspace/person/kidehen#this
:
http://id.myopenlink.net/DAV/home/KingsleyUyiIdehen/Public/kingsley.ttl#this
smime.p7s
Description: S/MIME Cryptographic Signature
------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi
_______________________________________________ Virtuoso-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/virtuoso-users
