jena-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <bimargul...@gmail.com>
Subject Re: sparql versus ^^ types
Date Fri, 10 Dec 2010 18:18:13 GMT
To be clearer, the resulting OWL RDF has
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
 attributes, and then tdbdump shows ^^ suffixes.

On Fri, Dec 10, 2010 at 12:20 PM, Benson Margulies
<bimargulies@gmail.com> wrote:
> Andy,
>
> I'm having trouble getting rid of all my ^^ noise.
>
> I run Jena schemagen against an Ontology that has no type annotations,
> I don't see any in the output of schemagen, but calls to
>
>  entityRef = model.createIndividual(entityUri, oclass);
>            entityRef.addLiteral(Rex.hasEntityDetectionSource, source);
>            entityRef.addLiteral(Rex.hasNormalizedText, normalizedText);
>            entityRef.addLiteral(Rex.hasOriginalText, rawText);
>
> end up adding the ^^ and the string data type.
>
> I suppose I'm missing something stupid?
>
>
> On Fri, Dec 10, 2010 at 11:53 AM, Andy Seaborne
> <andy.seaborne@epimorphics.com> wrote:
>>
>>
>> On 10/12/10 16:39, Benson Margulies wrote:
>>>
>>> Protege persuaded me to put types in my Ontology. So (as viewed by
>>> tdbdump), I have quads like:
>>>
>>> <urn:basistech.com:analysis#9>
>>> <http://www.basistech.com/ontologies/2010/6/rex.owl#hasOriginalText>
>>> "Fredrick Chopin"^^<http://www.w3.org/2001/XMLSchema#string>
>>> <urn:misc-test>  .
>>>
>>> should the following sparql match that?
>>>
>>> SELECT ?x where { ?x
>>> <http://www.basistech.com/ontologies/2010/6/rex.owl#hasOriginalText>
>>> "Fredrick Chopin" }
>>
>> Not in TDB.  Simple literals (plain literals without language tag) do not
>> match xsd:string.
>>
>> SELECT ?x where { ?x
>>   <http://www.basistech.com/ontologies/2010/6/rex.owl#hasOriginalText>
>>   "Fredrick Chopin"^^xsd:string
>> }
>>
>> TDB could canonicalise the input to make "" and ""^^xsd:string the same.
>>
>>        Andy
>>
>

Mime
View raw message