I have ontology file which i have created using Protege.. For my java application i need to retrieve classes and their properties.. I have tried following code but it retrieves only tripples.. I m new to Jena Api and Ontology so pls help
String URI = "http://www.semanticweb.org/ontologies/2012/0/SBIRS.owl";
String inputFileName = "D:\\SBIRS.owl";
System.out.println("File Name" + inputFileName);
OntModel model = ModelFactory.createOntologyModel();
StmtIterator si=model.listStatements();
ResIterator iter=model.listSubjects();
while(iter.hasNext())
{
Resource res=iter.nextResource();
System.out.println("Property==>" + res.getProperty(null).toString());
System.out.println("Resource URI==>" + res.getURI());
}