I tried this : String uri = 1.2.392.200036.9107.500.305.14321.20070523.84015.1014321; String query = "PREFIX base:<http://com.core.aim.base/> " + "PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> " + "PREFIX image:<http://com.core.aim.base/Image/> " + "SELECT * {" + " ?x a base:ImageAnnotation ;" + " base:images ?seq ." + " ?seq rdfs:member image:" + uid + " }";
and i have no result. Then i tried this : String query = "PREFIX base:< http://com.core.aim.base/> " + "PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> " + "PREFIX image:<http://com.core.aim.base/Image/> " + "SELECT * {" + " ?x a base:ImageAnnotation ;" + " base:images ?seq ." + " }"; And i have the following result : -------------------------------------------------------------------------------------------------------------------------------------------------- | x | seq | ================================================================================================================================================== | < http://com.core.aim.base/ImageAnnotation/5bb1f719-30f2-445c-89f7-498600eca6ed-msr> | _:b0 | -------------------------------------------------------------------------------------------------------------------------------------------------- It seems that the rdfs:member doesn't work :( Here the extracted model (TURTLE) : *<http://com.core.aim.base/ImageAnnotation/5bb1f719-30f2-445c-89f7-498600eca6ed-msr <http://com.core.aim.base/ImageAnnotation/5bb1f719-30f2-445c-89f7-498600eca6ed-msr>>* * a <http://com.core.aim.base/ImageAnnotation <http://com.core.aim.base/ImageAnnotation>> ;* * <http://com.core.aim.base/images <http://com.core.aim.base/images>>* * [ a <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq>> ;* * <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1>>* * <http://com.core.aim.base/Image/1.2.392.200036.9107.500.305.14321.20070523.84015.1014321 <http://com.core.aim.base/Image/1.2.392.200036.9107.500.305.14321.20070523.84015.1014321>>* * ] ;* * <http://com.core.aim.base/xsiType <http://com.core.aim.base/xsiType>>* * "ImageAnnotation"^^<http://www.w3.org/2001/XMLSchema#string <http://www.w3.org/2001/XMLSchema#string>> .* 2014-06-24 9:31 GMT+02:00 Frederic Toublanc <frederic.toubl...@telemis.com>: > Thanks for the answer Andy. > You want me to post my example by using prefixes ? > > > 2014-06-23 19:41 GMT+02:00 Andy Seaborne <a...@apache.org>: > > Frederic, >> >> As your pattern requirements become more complicated, you may find it >> easier to use SPARQL. A SimpleSelector is a filter on triples and does not >> extend to links between triples. >> >> ARQ supports rdfs:member directly for querying the contents of Seq. >> >> PREFIX base: <http://com.telemis.core.aim.base/> >> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> >> PREFIX image: <http://com.telemis.core.aim.base/Image/> >> >> SELECT * { >> ?x a base:ImageAnnotation ; >> base:images ?seq . >> ?seq rdfs:member >> image:1.2.392.200036.9107.500.305.14321.20070523.84015.1014321 >> } >> >> >> Andy >> >> PS Could you make your readable? It looks like HTML to plain text and >> quite hard to read. prefixes would also make the examples more readable. >> >> >> On 23/06/14 16:21, Frederic Toublanc wrote: >> >>> I have an other problem. >>> >>> I have : >>> >>> < >>> http://com.telemis.core.aim.base/ImageAnnotation/http:// >>> www.telemis.com/2013/measure-rdf/1.0/5d08eb78-8b40-4f6f- >>> b56b-e18cd606d223-msr >>> >>>> >>>> a <http://com.telemis.core.aim.base/ImageAnnotation> ; >>> <http://com.telemis.core.aim.base/images> >>> [ a <http://www.w3.org/1999/02/22- >>> rdf-syntax-ns#Seq> ; >>> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> >>> < >>> http://com.telemis.core.aim.base/Image/1.2.392.200036. >>> 9107.500.305.14321.20070523.84015.1014321 >>> >>>> >>>> ] . >>> >>> >>> When querying i have the ressource >>> *<http://com.telemis.core.aim.base/Image/1.2.392.200036. >>> 9107.500.305.14321.20070523.84015.1014321 >>> <http://com.telemis.core.aim.base/Image/1.2.392.200036. >>> 9107.500.305.14321.20070523.84015.1014321>>.* >>> How can i create a Selector to get the* >>> <http://com.telemis.core.aim.base/ImageAnnotation/http:// >>> www.telemis.com/2013/measure-rdf/1.0/5d08eb78-8b40-4f6f- >>> b56b-e18cd606d223-msr >>> <http://com.telemis.core.aim.base/ImageAnnotation/http:// >>> www.telemis.com/2013/measure-rdf/1.0/5d08eb78-8b40-4f6f- >>> b56b-e18cd606d223-msr>>* >>> subject as the property * <http://com.telemis.core.aim.base/images >>> <http://com.telemis.core.aim.base/images>>* is a sequence type. >>> >>> >>> I want to get all the ImageAnnotation which contains >>> < >>> http://com.telemis.core.aim.base/Image/1.2.392.200036. >>> 9107.500.305.14321.20070523.84015.1014321> >>> in their list of <http://com.telemis.core.aim.base/images> >>> >>> >>> >> >