Open pnrobinson opened 7 years ago
Agreed, is currently only available through graph property of MinimalOntology<>
and should be a convenience function in Ontology<>
.
Should be fine after merging #20.
DoesgetParents(Term t)
and getAncestors(Term t)
return the Term t
itself? This is an important design decision. In ontologizer it did.
getParents()
does not return the parents, a term is not its own parent.
As for getAncestors()
, there is a boolean
flag and by default, it returns itself, a term is contained in the set of ancestors.
cf. http://javadoc.io/doc/com.github.phenomics/ontolib-core/0.3
This might be a break of consistency and principle of least surprise.
Maybe getParents()
should not return itself, as should getAncestors()
and then there should be a getParentsAndSelf()
and a getAncestorsAndSelf()
?
I think this is a good solution.
Hi! Are we planning to offer methods such as getParents() ? (distinct from getAncestors?) It would be useful to have this as a simple API function.