Hi,
We are upgrading Jena from version 2.8.8 to the latest one available 3.16.0
Now we have the following code to initialize OntModel from a .owl input file
public static OntModel getOntModel()
throws BusinessArchitectureException
{
OntModel ontModel = null;
OntModelSpec s = new
OntModelSpec(OntModelSpec.OWL_MEM_MICRO_RULE_INF);
//FileManager fileMgr = FileManager.get(); // Used for Jena 2
FileManager fileMgr = FileManagerImpl.get(); // Used for Jena 3
try {
Model model =
fileMgr.loadModel(REPORTS_EXTENSION_OWL_FILE_PATH);
ontModel = ModelFactory.createOntologyModel(s, model);
}
catch (Exception e) {
e.printStackTrace();
}
return ontModel;
}
This code when used in Jena 2 generated 235 OntClasses
(ontModel.listClasses()), but with Jena 3 it created only 23 OntClasses.
Difference is the classes like the following which are only generated while
using Jena 2:
OntClass ----------- 74a1eaff:173a0249c84:-7f26
OntClass ----------- 74a1eaff:173a0249c84:-7ffb
Because of these missing classes, we are running in to issues.
So just wanted to check why are these extra ont classes not getting generated
with Jena 3 when we are using the same input file.
Has something changed in the api implementation?
Do we need to use some other createOntologyModel api in Jena 3 or need to do it
some other way?
Kindly respond
Regards,
Ashwani