Merged
Conversation
Add a menu item, along with the corresponding support in the ClassHierarchyPreferences, to display only the classes below the ontology roots (if any) in the class hierarchy.
Even though the AssertedClassHierarchyProvider has a public `getRoots()` method returning a set of OWL classes (suggesting there can be several roots), the private code of the provider assumes that there can be only one root (`owl:Thing`). This will no longer always be the case when the "display from ontology roots" option will be enabled, because an ontology may very well declare more than one root (Uberon, for example, declares two roots). So we must update the hierarchy provider so that it is ready to deal with a _set_ of roots instead of a single root.
Add a `setDisplayFromOntologyRoots(boolean)` method to the class hierarchy provider. If called with true, it will attempt to find self-declared roots in the ontology sets (declared with the IAO:0000700 annotation) and, in the presence of such roots, will use them as the roots of the hierarchy. All the DisplayHierarchyFromOntologyRootsAction then has to do is to call this method whenever the action is performed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for ”self-declared” ontology roots: when an ontology contains http://purl.obolibrary.org/obo/IAO_0000700 annotations, the classes pointed by these annotations are used as the roots of the class hierarchy, instead of owl:Thing.
closes #1184
supersedes #1330 (with a cleaner history)