Open jblemee opened 5 years ago
The most crucial challenge is if and how pagination fits into LDflex conceptually. I see two issues:
The relation is between documents. So it would not be data["https://ruben.verborgh.org/profile/#me"].next
(given that #me
is not the document) but data["https://ruben.verborgh.org/profile/"].next
(given that /profile/
is a document and that the next
link has that document as starting point)
The Link
header contents are not part of the document triples, whereas LDflex currently focuses on those.
I can elaborate on both, but already wanted to get the main points across.
const queryEngine = new ComunicaEngine('https://ruben.verborgh.org/profile/');
const path = new PathFactory({ context, queryEngine });
const nextPathFactory = path.next()
const ruben = nextPathFactory.create({ subject: namedNode('https://ruben.verborgh.org/profile/#me') })
?
Yes, that would be the way.
It's not a technical limitation; the implementation could do a GET
on the document and read+parse the Link
header. The question is rather whether we should, because the idea of LDflex is to query the RDF data inside of the representation. So what if an actual next
link is part of the representation? Do we treat it equally, or with priority? This is part of a bigger discussion on whether hypermedia controls should be part of the representation or the HTTP headers (and in the latter case, whether the "triples" in the HTTP Link
and other headers can be considered triples).
So at the moment, I don't think such functionality is a good fit for LDflex.
Hello,
I need LDFlex to support pagination and I would like some advice before starting an PR.
Do someone think about this feature in LDFLex. If yes, how do you see it ?
I was thinking of something like :