http://stackoverflow.com/questions/42106416/how-can-i-get-the-value-object-of-a-resources-property
Dimtri - I hope you will copy the solution over to StackOverflow.
Andy
On 08/02/17 07:12, Dmitri Pisarenko wrote:
Hello!
I have the following code, in which I find a resource by its e-mail.
val varn = "x"
val query = createQuery("""SELECT ?${varn}
WHERE { ?x <http://www.w3.org/2001/vcard-rdf/3.0#EMAIL>
"${email}" }""")
val qexec = createQueryExecution(ds, query)
val rs = qexec.execSelect()
if (rs.hasNext()) {
val solution = rs.nextSolution()
val rec = solution[varn]
// Here I need to find the value of the property
FirstContactTime
}
Now I want to find out whether `rec` has a property `FirstContactTime` and if
yes, its value.
I tried
`rec.model.listObjectsOfProperty(ds.defaultModel.createProperty(FirstContactTime))`
but it doesn't return anything. The debugger says `rec` does have a property
`FirstContactTime`.
How can I get the value of `FirstContactTime` (`2017-03-03T10:35:00Z`) in my
code?
Thanks in advance
Dmitri Pisarenko