Hey,
I have an OntModel with an attached pellet reasoner that I am querying
with ARQ. It contains typed literals (for example, *"0"^^<
http://www.w3.org/2001/XMLSchema#long>*) which I've added directly using
the typed literal api as follows:
*model.add(individual, Vocabulary.atIndex, model.createTypedLiteral(new
Long(ii)));*
*
*
Where atIndex is a data property that relates individuals to to an indexing
value. When I run a SPARQL query to retrieve this data, I get multiple rows
for each individual value like such:
---------------------------------------------------------------------------------------------------------------
| index | inv
|
================================================================
| 0 | example:inv-0
|
| "0"^^xsd:long | example:inv-0
|
================================================================
When I then view any serialization of this dataset, I see exactly one
relation between the individual and the value (with a different datatype).
(N-TRIPPLE example below).
*<http://example/ont#inv-0> <http://example/ont#atIndex> "0"^^<
http://www.w3.org/2001/XMLSchema#integer> .*
*
*
I've attempted to modify the query provided below in several ways but I've
yet to find a successful way to retrieve one distinct row. Adding DISTINCT
or GROUP BY clauses do nothing as jena treats them as distinct nodes (which
it makes sense that it does). I've attempted filter queries to limit
results using xpath string comparison operations to no avail.
PREFIX fn: <http://www.w3.org/2005/xpath-functions#>
PREFIX vocab: <http://example/ont#>
SELECT ?index ?inv
WHERE {
?inv vocab:atIndex ?index .
} ORDER BY ?index