title: How to I recurse through the nested class expressions using the OWLAPI?
body: <p>Given a class expression C, I would like to recursively iterate through its nested class expressions, like</p>
  
  <ul>
  <li><p>A and R some P some B</p>
  
  <ul>
  <li><p>A</p></li>
  <li><p>R some P some B</p>
  
  <ul>
  <li><p>P some B</p>
  
  <ul>
  <li>B</li>
  </ul></li>
  </ul></li>
  </ul></li>
  </ul>
  
  <p>It is possible to build an index bottom up with OWLObject.getNestedClassExpressions(), but that seems a bit of an overkill. Is there a better way (OWLAPI 4)?</p>