Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pushing blank nodes to the triple store fails #125

Open
tobice opened this issue Mar 31, 2016 · 3 comments
Open

Pushing blank nodes to the triple store fails #125

tobice opened this issue Mar 31, 2016 · 3 comments

Comments

@tobice
Copy link
Contributor

tobice commented Mar 31, 2016

The evaluation uses N3 format to push new triplets to the triple store. My experimental pipeline produces blank nodes which after the conversion to N3 look like this:

@prefix ns0:   <http://linked.opendata.cz/ontology/chord/> .
@prefix ns1:   <http://linked.opendata.cz/resource/business-entity/> .

[ ns0:source  ns1:CZ00006947 ;
  ns0:target  <http://linked.opendata.cz/resource/domain/seznam.gov.cz/rejstriky/business-entity/28175492>
] .

[ ns0:source  ns1:CZ00241610 ;
  ns0:target  <http://linked.opendata.cz/resource/domain/seznam.gov.cz/rejstriky/business-entity/60437359>
] .

Although this syntax is valid according to several translators/validators that I tried online, Virtuoso (v7.2) doesn't like it. It fails with the following error message:

SP029: TURTLE RDF loader, line 8: Missing predicate and object between top-level blank node subject and a dot processed pending to here.

Switching to RDF/XML format here fixed the problem for me. The triplets were successfully pushed to the triple store.

I can make a pull request with this change. But maybe there is a reason for why N3 is used and this change could break something.

@jirihelmich
Copy link
Member

What about

[] ns0:source  ns1:CZ00006947 ;
  ns0:target  <http://linked.opendata.cz/resource/domain/seznam.gov.cz/rejstriky/business-entity/28175492> .

@tobice
Copy link
Contributor Author

tobice commented Mar 31, 2016

Well that does work indeed, but the conversion is done by Apache Jena and this is how Apache Jena represents blank nodes in N3. Which is apparently incompatible with how Virtuoso understands blank nodes in N3. Judging from the Apache Jena API, I only get to choose the output language, not its "dialect".

@tobice
Copy link
Contributor Author

tobice commented Mar 31, 2016

In case you missed it in the original message, this is the place I'm talking about (where the conversion happens).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants