update the path_to_root of a concept methods to use custom roots
syphax-bouazzouni opened this issue · comments
Syphax bouazzouni commented
Context
The /tree
endpoint of a concept gives the path that takes the concept to reach one the roots of the resource. This endpoint is using to achieve that a function called path_to_root
.
Issue
The path_to_root
method was testing that it reached the root, if the tested concept has no more parents or is owl:Thing. The problem is that with
The roots are no more only the concepts that doesn't have parents, but it depends also of the used schemes.
Requirement
- Update path_to_root, is root test like so :
concept.is_root? = concept.parents.empty? OR schemes_roots.contain?(concept)
Deployment
- testportal
- stageportal
- agroportal
- bioportal
Syphax bouazzouni commented