-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The @rdfList annotation should produce JSON arrays in JSON mode but nested objects (with the usual first/rest properties) in RON (RDF Object Notation) mode.
A goal is to make it possible to expose the intermediate list nodes. This means that at least internally the pattern ?rdf:rest* ?inter . ?iter rdf:first ?item needs to be constructed. Ideally, it would also be possible to provide a pattern and designate one variable as the intermediate one.
So what needs to be clarified is the interaction between @pattern and @rdfList.
Rough ideas:
- Have pattern point to the variable which carries the list, then use
@rdfListon that variable.
{
myList @pattern(of: "?s eg:authors ?l") @rdfList(from: "l", to: "item", via: "intermediate")
}Generated pattern would be:
SELECT * {
?s eg:authors ?l .
?l rdf:rest* ?intermediate . ?intermediate rdf:first ?item .
}- Point the pattern's target to the list items, and use
@rdfListto declare the intermediate variable.
{
myList @pattern(of: "?s eg:authors/rdf:rest* ?i . ?i rdf:first ?o", from: "s", to: "o")
@rdfList(of: "?i")
}Metadata
Metadata
Assignees
Labels
No labels