title: How can I get all the classes from a loaded ontology with owlapi?
body: <p>How can I get all the classes from a loaded ontology with owlapi? Here I have an example on how to get one class, but I'm interested on accessing all the classes defined at the ontology.</p>
  
  <pre><code>    OWLOntologyManager manager = WLManager.createOWLOntologyManager();
      OWLOntology ontology = manager.loadOntology(IRI.create(fileURI));
      OWLDataFactory owlDF = manager.getOWLDataFactory();
  //Example to get ONE class, but I want ALL!
      OWLClass stringDocuClass = owlDF.getOWLClass(IRI.create("http://example.com/my_ontology.owl#StringDocu"));
  </code></pre>
  
  <p>I'm working with java owlapi 4.2.3 (see the API: <a href="http://owlapi.sourceforge.net/javadoc/" rel="nofollow">http://owlapi.sourceforge.net/javadoc/</a>)</p>