如果我连接cxn
到一个空的 Triplestore,我会说:
val CheckSparql = "select (count(?s) as ?scount) where { ?s ?p ?o . }"
val PreparedSparql = cxn.prepareTupleQuery(QueryLanguage.SPARQL, CheckSparql)
val Result = PreparedSparql.evaluate()
val ResBindSet = Result.next()
val TripleCount = ResBindSet.getValue("scount")
println(TripleCount.toString())
我明白了
"0"^^<http://www.w3.org/2001/XMLSchema#integer>
是否有一种 RDF4J 方法可以仅检索该文字的值?
我只想要 0 或“0”,没有数据类型
我想如果可能的话,我应该尝试在没有字符串操作/正则表达式的情况下做到这一点。