Hi,

In our project we use Virtuoso’s Jena provider for writing to/reading from
the triplestore.

Data are added initially with:

*virtDataset.addNamedModel(graphName, model, false)*

When the added model contains string literals, these are stored in Virtuoso
as xsd:strings. A sparql select query will thus return them like this:
*"added a string literal with
VirtDataset.addNamedModel"^^<http://www.w3.org/2001/XMLSchema#string
<http://www.w3.org/2001/XMLSchema#string>>*

Updates are added to the triplestore with sparql update. The queries are
built with Jena and the query execution is done with Virtuoso’s Jena
provider:



*VirtuosoUpdateFactory.create(update.toString(), virtgraph).exec();*When a
string literal is added/updated this way, it is stored in Virtuoso as a
simple literal.
 I.e. sparql select returns:
*"added a string literal with VirtuosoUpdateFactory.create"*

Since simple literals are synonyms for xsd:string literals in RDF 1.1, Jena
(ARQ) prints (toString) queries without ^^xsd:string. I assume that
VirtuosoUpdateRequest.exec() still treats simple literals and string
literals differently and that this is why strings get stored as simple
literals. I would however expect that adding triples with
VirtDataset.addNamedModel() and VirtuosoUpdateRequest.exec() should store
string literals in Virtuoso in the same way. Since this is not the case, we
get a mixture of simple literals and string literals in the database. To
avoid this we concatenate ^^xsd:string to all simple literals in the query
string argument given to *VirtuosoUpdateFactory.create*. This is rather
hacky and something we want to avoid. Is there a way to make
VirtuosoUpdateRequest.exec() store strings (simple literals) as typed
string literals? Or even better: are there plans to treat simple literals
as string literals in Virtuoso?

Jena provider version:  virt_jena3.jar + virtjdbc4.jar
Jena version: 3.0.1
Virtuoso version: 07.20.3215

Best regards,

Jens Kilde Mjelva
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to