ontoportal-lirmm / ontologies_api

Hypermedia API for ontologies
http://data.agroportal.lirmm.fr/
Other
2 stars 8 forks source link

Adding concept_scheme parameter to /classes endpoint #100

Open galviset opened 1 week ago

galviset commented 1 week ago

Currently if there's a SKOS vocabulary with several ConceptSchemes, it is only possible to query for its root (/ontologies/:ontology/classes/root) with the concept_scheme parameter.

In the context where some communities use concept schemes independently, I think it would be reasonable to consider adding concept_scheme as a parameter to the ontologies/:ontology/classes endpoint as well.

jonquet commented 1 week ago

/ontologies/:ontology/schemes is supposed to be this. e.g., https://data.agroportal.lirmm.fr/ontologies/INRAETHES/schemes

And to get the scheme in which a concept is in the "inScheme" maybe used: https://data.agroportal.lirmm.fr/ontologies/INRAETHES/classes

galviset commented 2 days ago

Currently /ontologies/:ontology/schemes returns all schemes that are in the vocabulary (which makes sense). The issue with https://data.agroportal.lirmm.fr/ontologies/INRAETHES/classes is there's no way to filter out concepts from unwanted schemes which can represent a large amount of concepts in large vocabularies.

jonquet commented 2 days ago

You mean a service like https://data.agroportal.lirmm.fr/ontologies/INRAETHES/classes?scheme=URI1,URI2 That will only return the classes within a specific scheme. Indeed we don't have this. In theory, should not be too hard has we do have the inScheme property in the graph.

Note the UI already does this e.g., https://agroportal.lirmm.fr/ontologies/INRAETHES?p=classes&concept_schemes=http%3A%2F%2Fopendata.inrae.fr%2FthesaurusINRAE%2Fmt_46%2Chttp%3A%2F%2Fopendata.inrae.fr%2FthesaurusINRAE%2Fmt_49&conceptid=http%3A%2F%2Fopendata.inrae.fr%2FthesaurusINRAE%2Fc_3628