awgustavo
awgustavo

Reputation: 101

How validate a CIM RDF

I'm work with the Common Information Model and we are using RDF Files to represent eletrical substations. But I have found some problems to validate a file RDF with your RDF Schema. I need help in this problem. Somebody knows how to do that using JAVA.

Upvotes: 3

Views: 703

Answers (1)

Michael
Michael

Reputation: 4886

I'll preface this by noting that I don't know anything about the Common Information Model, and that I'm speaking generally for RDF, RDFS and "validation" ...

Valid to parse is trivially easy, so I'll assume that's not what you mean. My guess is that you're coming from XML and you're thinking RDFS is to RDF in the same way that an XML schema is to an XML document.

It's not.

You have to remember that if you specify, say, two ranges for a property (we'll call them A & B), it does not mean that the values of that property should be A or B. It actually means that they're both, that is, the intersection of A & B. Domain works similarly, and there is nothing to prevent you from using a value outside of the prescribed domain/range. So you might need to be careful with what you expect from the validation.

Further, if you start venturing into the OWL world, you add concerns for the consistency of the schema (aka the ontology) and its satisfiability. These are just as valid concerns w.r.t. the validity of the data.

Not to mention that it's hard to validate, in OWL, the restriction that a table has 4 legs. You can define three legs and it's assumed that it's valid; there is just a 4th leg the system does not yet know about. Similarly, if you define five legs, it will assume that two of the legs could be the same and thus it's not strictly invalid.

What you might want to look at, if you want to use RDFS, or really OWL, as a constraint language, is Pellet's Integrity Constraint Validator (ICV). It allows you to use OWL as the language for formalizing the constraints placed on your data by the schema. It does this by altering the semantics of OWL slightly to make it more amenable to this use case. The software has actually been ported to Stardog where it can be combined with transactional support in the database to preserve data integrity. The Stardog site also has a reference to the formal semantics of how the integrity constraints are evaluated should you be curious enough to delve into the definition a bit further.

Beyond that, you would need custom software to do the validation for you, assuming this is the type of validation you are interested in. Or you can look at a similar, but less featureful (& formal) bit of software than ICV called Jena Eyeball.

Upvotes: 2

Related Questions