For specific applications, it is desirable to only keep the propagating relationships in the ontology graph. However, the current code includes relationships of all types by default.
This PR adds an option for dropping non-propagating relationships during the ontology parsing. An OntologyLoaderOptions class is added to phenol-io that can be used in OntologyLoader.loadOntology(...):
This is a non-breaking change and the default loading is unaffected. However, if desired, the user can choose to drop the unwanted non-propagating relationships from the ontology graph.
As a second item, the PR addresses an inconsistency, where OntologyAlgorithm.getParentTerms() considered relationship propagation when fetching parent term IDs, but the symmetric function OntologyAlgorithm.getChildTerms() did not consider the propagation aspect. Now, both functions consider the propagation.
For specific applications, it is desirable to only keep the propagating relationships in the ontology graph. However, the current code includes relationships of all types by default.
This PR adds an option for dropping non-propagating relationships during the ontology parsing. An
OntologyLoaderOptions
class is added tophenol-io
that can be used inOntologyLoader.loadOntology(...)
:This is a non-breaking change and the default loading is unaffected. However, if desired, the user can choose to drop the unwanted non-propagating relationships from the ontology graph.
As a second item, the PR addresses an inconsistency, where
OntologyAlgorithm.getParentTerms()
considered relationship propagation when fetching parent term IDs, but the symmetric functionOntologyAlgorithm.getChildTerms()
did not consider the propagation aspect. Now, both functions consider the propagation.