0

When I create a RDFS_MEM_RDFS_INF model in Jena and read some RDFS-File, a number of statements, that were not explicitly stated in the file are added. E.g. if we have a triple

a p b

and p is a rdfs:subPropertyOf q, than

a q b is

also in the model. A concrete example is the following: if

a skos:related b

is in the file

a skos:semanticRelation b

is also in the model.

Is there any possibility to check whether a statement in the model is an axiom or an inferred one? There are such methods for OWL Models, but I use the RDFS Model. A trivial solution would be to build two models, one without and one with inference, but I would prefer a less memory consuming solution.

Cœur
  • 37,241
  • 25
  • 195
  • 267

2 Answers2

0

To preserve djthequest's answer from a comment:

Jena InfModel has a method getRawModel(). This Model wont contain the inferred statements, it will contain only the axioms in the file. use a check against that. If you are using the OntModel it has got a method getBaseModel().

and Christian Wartena's response indicating that this was a solution:

Thanks. This works fine! I didn't find that method when I was reading the documentation last week.

(I'll remove this answer if djthequest posts one.)

Community
  • 1
  • 1
Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
0

Jena InfModel has a method getRawModel(). This Model wont contain the inferred statements, it will contain only the axioms in the file. use a check against that. If you are using the OntModel it has got a method getBaseModel().