You will need use an OntModel if you want to instantiate your OWL classes. I assume your vocabulary is actually based on OWL, i.e. all your classes are subclasses of owl:Thing - so if you want to use these in your Java code - perhaps to write queries - you will need to instantiate them something like this:
OntClass MY_OWL_CLASS = MODEL.createClass(MY_VOCAB_URI + "MyClassName"); Where MODEL is an instance of OntModel create something like this: OntModel MODEL = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM); I believe you can also extract inferred triples from an OntModel but I haven't tried this myself. Rob Rob Walpole Email [email protected] Tel. +44 (0)7969 869881http://www.linkedin.com/in/robwalpole On Thu, Aug 20, 2015 at 8:41 AM, kumar rohit <[email protected]> wrote: > Suppose a Protege file which is saved as "module.owl" in Rdf/xml serialized > form and we want to import it in Jena, what classes will we use? I mean RDF > classes like > > Model model = ModelFactory.createDefaultModel(); > > OR Ontmodel classes and methods like > > OntModel m = ModelFactory.createOntologyModel(); > > > I am confused so kindly explain the situation when to use RDF and when > to use OWL classes when working on Protege and Jena. >
