Re: listResources

2016-11-12 Thread kumar rohit
So it means if we have to get instances of Student, both methods can be used.? On Sat, Nov 12, 2016 at 4:15 PM, Claude Warren wrote: > Your statement > > model.listResourcesWithProperty(RDF.type, std) > > will list all the studen resources in the graph > > the statement: > >

Re: listResources

2016-11-12 Thread Claude Warren
in short, yes. On Sat, Nov 12, 2016 at 3:14 PM, kumar rohit wrote: > So it means if we have to get instances of Student, both methods can be > used.? > > On Sat, Nov 12, 2016 at 4:15 PM, Claude Warren wrote: > > > Your statement > > > >

Re: duplicate values inferred

2016-11-12 Thread javed khan
Hello Lorenz, kindly if you can suggest me how to avoid this situation. Recent data property value can be achieved using Jena but I dont know how to do it in this case because Student is a class here. On Sat, Nov 12, 2016 at 4:55 PM, Lorenz B. < buehm...@informatik.uni-leipzig.de> wrote: > And

Re: listResources

2016-11-12 Thread Claude Warren
Your statement model.listResourcesWithProperty(RDF.type, std) will list all the studen resources in the graph the statement: model.listStatements(null,RDF.type, "Student"); will probably list nothing given what I think you have in the graph as you probably don't have any statements where the

Re: listResources

2016-11-12 Thread Lorenz B.
Kumar, > Thank you Lorenz. > > I have *OntClass std = model.getOntClass(ns + "Student");* > > for (Iterator i = model.listResourcesWithProperty(RDF.type, std); > i.hasNext();) { >model.listStatements(null,RDF.type, "Student"); Again, classes in RDF are identified by URIs,

How do I do a join between multiple model.listStatments calls?

2016-11-12 Thread Niels Andersen
Dear user community, Our current approach to joining multiple model.listStatements (with SimpleSelector) calls is to take the content of the iterators returned and add them to separate HashSets and then use functions such as retainAll to find the intersection between the two sets. This works

Re: How do I do a join between multiple model.listStatments calls?

2016-11-12 Thread Martynas Jusevičius
Why not SPARQL FILTER? https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#expressions On Sun, 13 Nov 2016 at 08.59, Niels Andersen wrote: > Dear user community, > > Our current approach to joining multiple model.listStatements (with > SimpleSelector) calls is to take the