Load an OWL Ontology Model from an OWL file using Apache Jena

Load an OWL Ontology Model from a well formed OWL file using Apache Jena.

Javadoc available at https://www.javatapas.com/docs/javatapas/jena/LoadOwlOntologyModelFromFileUsingJena.html


public static OntModel loadOwlOntologyModelFromFileUsingJena(String inFile) {

	Model model = RDFDataMgr.loadModel(inFile);

	OntModel ontModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, model);

	return ontModel;

}