ontoportal-lirmm / ontologies_linked_data

Models and serializers for ontologies and related artifacts backed by 4store

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

update the path_to_root of a concept methods to use custom roots

syphax-bouazzouni opened this issue · comments

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

Done

Tree without a concept_schemes

Image

Tree with concept_schemes

Image