vivo-project / VIVO

VIVO is an extensible semantic web application for research discovery and showcasing scholarly work
http://vivoweb.org
BSD 3-Clause "New" or "Revised" License
202 stars 127 forks source link

SPARQL Operation - Pageable and sortable flag #3878

Closed chenejac closed 1 year ago

chenejac commented 1 year ago

Is your feature request related to a problem? Please describe. In the case SPARQL operation is based on a query which is fetching a lot of items, pagination and sorting should be supported

GET http://localhost:8080/vivo/api/rest/1.0.0/geolocation/?limit=10&offset=30&sortBy=name&order=ASC

Describe the solution you'd like The ontology class for SPARQL operation besides text of the query should also have properties pageable (true or false) and sortable (true or false). For instance, if sortable is set to true for some SPARQL operation, HTTP request url parameters will be checked, and if there is sortBy=name and order=ASC parameter, the query will be extended with the suffix ASC(name)

chenejac commented 1 year ago

How those data properties should be used can be found at https://github.com/vivo-project/VIVO/issues/3720#issuecomment-1554354116

Do we need also defaultOffset, defaultLimit, defaultSortBy, defaultOrder?