Skip to content

Commit

Permalink
improve OmlRead.getImportedOntologyClosure
Browse files Browse the repository at this point in the history
  • Loading branch information
melaasar committed Aug 8, 2023
1 parent 3af9d8f commit 4e90b9c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions io.opencaesar.oml/src/io/opencaesar/oml/util/OmlRead.java
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,7 @@ public static Ontology getImportedOntologyByPrefix(Ontology ontology, String pre
* @return a collection of ontologies directly or transitively imported by the given ontology
*/
public static Collection<Ontology> getImportedOntologyClosure(Ontology ontology, boolean inclusive) {
return closure(ontology, inclusive, i -> i.getOwnedImports().stream()
.map(j -> getImportedOntology(j))
.collect(Collectors.toList()));
return closure(ontology, inclusive, i -> getImportedOntologies(i));
}

/**
Expand Down

0 comments on commit 4e90b9c

Please sign in to comment.