When the _pageSize query parameter is set on a request, if the range of selected nodes contains a blank node, it will not be returned in the result graph (intended). However, in this case the http://www.w3.org/1999/xhtml/vocab#next property is not set on the page resource, even if there are more results in the data set. As a result, the UI does not render the "next page" link, and consumers of the API are not able to determine whether they can query again for more results.
This seems to be caused by the consume method on APIQuery.ResultResourcesReader, which strips blank nodes from its result set. Subsequently the fetchDescriptionOfAllResources method on APIQuery compares the number of remaining nodes to the original _pageSize that was requested and determines that the result set is complete. The createMetadata method on APIEndpointImpl infers that since the result set is complete, the next property should be omitted.
We can replicate this issue in elda-standalone by adding (for example) a blank node whose type is egc:BoardGame to the example-data.ttl data set, and then querying the again/games endpoint.
Related to #63 , perhaps they should be fixed at the same time.
When the
_pageSizequery parameter is set on a request, if the range of selected nodes contains a blank node, it will not be returned in the result graph (intended). However, in this case thehttp://www.w3.org/1999/xhtml/vocab#nextproperty is not set on the page resource, even if there are more results in the data set. As a result, the UI does not render the "next page" link, and consumers of the API are not able to determine whether they can query again for more results.This seems to be caused by the
consumemethod onAPIQuery.ResultResourcesReader, which strips blank nodes from its result set. Subsequently thefetchDescriptionOfAllResourcesmethod onAPIQuerycompares the number of remaining nodes to the original_pageSizethat was requested and determines that the result set is complete. ThecreateMetadatamethod onAPIEndpointImplinfers that since the result set is complete, thenextproperty should be omitted.We can replicate this issue in
elda-standaloneby adding (for example) a blank node whose type isegc:BoardGameto theexample-data.ttldata set, and then querying theagain/gamesendpoint.Related to #63 , perhaps they should be fixed at the same time.