On Fri, Jul 13, 2012 at 3:05 PM, Andy Seaborne <[email protected]> wrote:
>>> model.createTypedLiteral(new Long(ii)));
>
> That puts in a typed literal as xsd:long, because xsd:long reflects all the
> range limitations of a Java Long.
>
> Try putting in a xsd:integer with:
>
> m.createTypedLiteral("0", XSDDatatype.XSDinteger) ;
>
> because it looks like inference is inferring this value from the derived
> datatype xsd:long.

(Coworker of Rob --- we'd be discussing this before emails got sent.
Replying on his behalf for the moment...)

We also ended playing with BigIntegers too, since it seems to be the
case that unqualified integers in SPARQL queries and results are
xsd:integers, which correspond to Java BigIntegers.

Given some experiments with what happened with Pellet vs without, we
were starting to come to the same conclusion (i.e., that one of the
triples was inferred), but we weren't sure what sort of OWL inference
about datatypes is allowed, and hence whether this was something that
could be explained that way.  It seems like this is the case though.

> PS This would not happen with TDB - it stores the integer value, and looses
> the xsd:long/xsd:integer distinction.

Actually, the base model is stored with TDB, but I guess Pellet's
storage isn't.  Maybe it's worth looking into whether Pellet can be
made to use TDB for storage.

//JT

-- 
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/

Reply via email to