-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support a demonstration of prefiltering of variables #4
Comments
How would you see those restrictions being defined? E.g, in your examples both of these would have to be interpreted as literals. You might even want to have a stronger restriction that the second one has to be a number. In the case of other variables you could demand a uri, prefixed or full, etc. These restrictions would either have to be defined in the metadata that generates the derived resource, or in the filter body itself. Feel free to suggest how you see it. |
I wasn't clear in my remarks. It would be great to have an abstraction added to the code base that can be used to map variables that are written by some external actor on an URL to variables that are internally injected into the SPARQL. E.g. an
An
|
I would think that you probably still want to define somewhere which mapper should be used for which variable? Assume you have a query with 2 variables in it, one that expects a URI as input, and another one that expects a literal, the server would need to know which mapper to use for which variable. Otherwise you would have to create a custom mapper for every query (and then still somehow link that query to the mapper, unless you only allow 1 type of query per server). |
Maybe. I could also imagine that if it is known that A simple abstraction what to do with the |
In the current solution it is possible to add a
derived:template
:But this provides an unlimited variation of variables that could in principle be injected into a the SPARQL query of the filter. An example could be provided (or an abstraction) how these variables first get validated, or even mapped into the the actual variables that get used by the SPARQL query.
E.g. I want to state that if a user sends
name
on the URL, it should be mapped to afoaf:name
variable. And if the user sends as second variable2
it should be mapped to"2"^^xsd:integer
.The text was updated successfully, but these errors were encountered: