Re: How to read a list?

2017-03-25 Thread Dmitri Pisarenko
Hello, Lorenz! Thanks for your answer. Changing val obj = prop.`object` to val obj = prop.`object`.`as`(RDFList::class.java) did the trick. > But I can't tell anymore without seeing method findStatement() open fun findStatement(property:String, resource:Resource):Statement? {

Re: How to read a list?

2017-03-25 Thread Lorenz B.
@Andy As far as I understand the code, what you mentioned is just the first step to get some subject resource. And the findStatement() method is supposed to return the list, but it's not clear what he's doing in this method: val prop = findStatement(Bp2BatchCompanyIds, rec as Resource) > Hi -

Re: How to read a list?

2017-03-25 Thread Lorenz B.
According to your data it is in fact stored as RDFList. You could try to call obj.as( RDFList.class ) since RDFList is a subinterface of Resource. But I can't tell anymore without seeing method findStatement() > Hello! > > I have a Jena-based database with an individual batch in it. A batch

Re: How to read a list?

2017-03-25 Thread Andy Seaborne
Hi - could you print the data in a readable syntax such as Turtle? and a complete, self-contained example? The list occurs at: ( 136648473 136648520