Re: Jena listStatement

2014-06-27 Thread Andy Seaborne
On 26/06/14 13:08, Frederic Toublanc wrote: I "fixed" the issue with this query : PREFIX base: PREFIX rdf: SELECT ?x { ?x a base:ImageAnnotation ; base:images ?seq . ?seq ?p

Re: Jena listStatement

2014-06-26 Thread Frederic Toublanc
I "fixed" the issue with this query : PREFIX base: PREFIX rdf: SELECT ?x { ?x a base:ImageAnnotation ; base:images ?seq . ?seq ?p } When i use rdfs:member

Re: Jena listStatement

2014-06-25 Thread Andy Seaborne
On 24/06/14 14:32, Frederic Toublanc wrote: mm ? Before replying last time, I used your data and your query and got a result and also I went back over previous versions (I did ask which version you are running). It might be an idea to clear the database and start again in case it has mixed

Re: Jena listStatement

2014-06-24 Thread Frederic Toublanc
mm ? Here is the full code to exec the sparql : String query = "PREFIX base: " + "PREFIX rdfs: " + "PREFIX image: " + "SELECT * { " + "?x a base:ImageAnnotation ;" +

Re: Jena listStatement

2014-06-24 Thread Andy Seaborne
On 24/06/14 14:07, Frederic Toublanc wrote: I modified the uri for the example that's not the case in the real situation. Sorry about the junk at the end of file i forgot to remove it. Here the real extract from the TDB. And the uri are aligned. and this works: PREFIX base:

Re: Jena listStatement

2014-06-24 Thread Andy Seaborne
Frederic, Please read the rest of my message which directly addresses the problem. > You keep changing the URIs : sometimes they have "com.telemis.core" > and sometimes just "com.core". Also, please check your data. It is not valid - there is junk on the end of the file. When fixed,

Re: Jena listStatement

2014-06-24 Thread Andy Seaborne
Your data is unreadable - please check below and see what I see: > Here the extracted model (TURTLE) : > > * >* > *a

Re: Jena listStatement

2014-06-24 Thread Frederic Toublanc
I tried this : String uri = 1.2.392.200036.9107.500.305.14321.20070523.84015.1014321; String query = "PREFIX base: " + "PREFIX rdfs: " + "PREFIX image:

Re: Jena listStatement

2014-06-24 Thread Frederic Toublanc
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 : > 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 t

Re: Jena listStatement

2014-06-23 Thread Andy Seaborne
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:

Re: Jena listStatement

2014-06-23 Thread Frederic Toublanc
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 ;

Re: Jena listStatement

2014-06-23 Thread Frederic Toublanc
That worked : StmtIterator querySerie = Literal lit = model.createTypedLiteral() Thanks a lot ! 2014-06-23 15:18 GMT+02:00 Jean-Marc Vanel : > Something like : > > Resource uri = model.createResource( > " > > http://com.telemis.core.aim.base/ImageStudy/2.16.56.465769650.20070523082619.459

Re: Jena listStatement

2014-06-23 Thread Jean-Marc Vanel
Something like : Resource uri = model.createResource( " http://com.telemis.core.aim.base/ImageStudy/2.16.56.465769650.20070523082619.459.0"; ); Property prop = model.createProperty( "http://com.telemis.core.aim.base/instanceUID";); StmtIterator querySerie = model.listStatements(new SimpleSelec

Re: Jena listStatement

2014-06-23 Thread Andy Seaborne
On 23/06/14 13:09, Frederic Toublanc wrote: Hello everyone, I used JenaBean to persist my java model into the TDB database. Version? And how do you save it? In a transaction or at least TDB.sync the dataset before exiting. I wrote the content of the model with *model.write(System.out,"N3

Jena listStatement

2014-06-23 Thread Frederic Toublanc
Hello everyone, I used JenaBean to persist my java model into the TDB database. I wrote the content of the model with *model.write(System.out,"N3");* and i have the following result : < http://com.telemis.core.aim.base/ImageStudy/2.16.56.465769650.20070523082619.459.0 > a