Jena cannot process OWL format files, so I used Protégé to create an ontology, saved it as RDF/XML, but the file ended with .owl
. The following code will read the ontology using owl-full language.
OntModel model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
model.read(fileInputStream, null); // sometimes it could be read(fileInputStream, "RDF/XML")
Shouldn't I use RDFS somewhere?