rdfjenaowlsesamevirtuoso

Validate RDF triples against ontology in order to check correct structure


I am new to RDF/ontologies and the way to work in this domain is a bit unclear to me. Currently I am troubled about triple validation. I still think in the relational way where I first create a schema and then in order to insert data I need to follow that structure.

In order to insert triples I use Jena and then use the generated String to execute an Insert command. So here are my questions:


Solution

  • A) this kind of validation is not part of the RDF model, and so most triplestores/APIs do not support it. I would recommend that you let go of this mindset, but to answer your question: yes, there are tools that allow you to do this kind of thing. One example is the Pellet OWL reasoner, which has a constraint validation mode, but I'm sure there are others. Or you can of course implement your own validation, either by implementing some sort of parser listener that checks incoming triples, or by doing some after-the-fact checking on your triplestore, with queries, or by using an RDF-OO mapping solution like for example AliBaba or Empire.

    B) I am not sufficiently familiar with Virtuoso to be 100% sure, but I suspect that it does not validate inserts against the schema. As said, this is an unusual thing to do in the RDF world.

    C) (Updated): yes, if you are importing your ontology into Virtuoso, then you are indeed loading it into a triplestore, so that's all 3 steps taken care of.