Hi,
I´m experiencing an issue with model validation. I attached a snippet of my
ontology which contains the necessary parts. Whenever I use the following
code which is a simplified version of the real coding, I´m getting the
validation error from below.
InfModel inferredModel =
ModelFactory.createInfModel(ReasonerRegistry.getOWLReasoner(),
ModelFactory.createDefaultModel());
URL weather = this.getClass().getResource("weatherontology.owl");
inferredModel.read(weather.toString());
ValidityReport report = inferredModel.validate();
Iterator<Report> it = report.getReports();
while(it.hasNext()) {
Report rep = it.next();
System.out.println(rep.toString());
Assert.assertTrue(report.isValid());
However, if I change the very first line to the following, it is working
fine:
InfModel inferredModel = ModelFactory.createOntologyModel();
Validation error:
Error ("range check"): "Incorrectly typed literal due to range (prop,
value)"
Culprit =
https://www.auto.tuwien.ac.at/downloads/thinkhome/ontology/WeatherOntology.owl#TEST_Wind071020131300
Implicated node:
https://www.auto.tuwien.ac.at/downloads/thinkhome/ontology/WeatherOntology.owl#hasDirection
Implicated node: '339.5'^^http://www.w3.org/2001/XMLSchema#float
Any clue on this?
Best regards,
Stefan
I´m experiencing an issue with model validation. I attached a snippet of my
ontology which contains the necessary parts. Whenever I use the following
code which is a simplified version of the real coding, I´m getting the
validation error from below.
InfModel inferredModel =
ModelFactory.createInfModel(ReasonerRegistry.getOWLReasoner(),
ModelFactory.createDefaultModel());
URL weather = this.getClass().getResource("weatherontology.owl");
inferredModel.read(weather.toString());
ValidityReport report = inferredModel.validate();
Iterator<Report> it = report.getReports();
while(it.hasNext()) {
Report rep = it.next();
System.out.println(rep.toString());
Assert.assertTrue(report.isValid());
However, if I change the very first line to the following, it is working
fine:
InfModel inferredModel = ModelFactory.createOntologyModel();
Validation error:
Error ("range check"): "Incorrectly typed literal due to range (prop,
value)"
Culprit =
https://www.auto.tuwien.ac.at/downloads/thinkhome/ontology/WeatherOntology.owl#TEST_Wind071020131300
Implicated node:
https://www.auto.tuwien.ac.at/downloads/thinkhome/ontology/WeatherOntology.owl#hasDirection
Implicated node: '339.5'^^http://www.w3.org/2001/XMLSchema#float
Any clue on this?
Best regards,
Stefan