public void setOntology(OWLOntology ont) { this.ont = ont; List<Object> data = new ArrayList<>(); data.add(directImportsHeader); // @@TODO ordering for (OWLImportsDeclaration decl : ont.getImportsDeclarations()) { data.add(new OntologyImportItem(ont, decl, editorKit)); } data.add(indirectImportsHeader); // @@TODO ordering try { for (OWLOntology ontRef : editorKit.getOWLModelManager().getOWLOntologyManager().getImportsClosure(ont)) { if (!ontRef.equals(ont)) { for (OWLImportsDeclaration dec : ontRef.getImportsDeclarations()) { if (!data.contains(dec)) { data.add(new OntologyImportItem(ontRef, dec, editorKit)); } } } } } catch (UnknownOWLOntologyException e) { throw new OWLRuntimeException(e); } setListData(data.toArray()); }