Skip to content
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

Namespace prefixes in parametrized queries #2

Closed
albertmeronyo opened this issue Jan 26, 2016 · 1 comment
Closed

Namespace prefixes in parametrized queries #2

albertmeronyo opened this issue Jan 26, 2016 · 1 comment
Assignees

Comments

@albertmeronyo
Copy link
Member

  • you seem to have to fill in complete IRIs; maybe this can be solved
    by having good preflabels where you can just enter the string,
    alternatively it would be nice if you could at least use the prefix;
    even better would be if you got an option list
    • The last is not possible
    • We could add a link to prefix.cc to do an educated guess as to what namespace a prefix would expand to.
    • AR: Alternatively, could the query file itself contain information on the prefix, much like there are tags in the comments using #+ ? For example: ?dataset sdmx-dimensions:refArea ?_country in the actual query and #? ?_country: <http://.../> in the comments? Most query-writers wouldn't bother, but we could make use it to make sure some of the more frequently-used query patterns are easy to adapt.
@albertmeronyo
Copy link
Member Author

It's a good idea to allow the UI to ingest both full IRIs and namespace-abbreviated ones. I'm fixing this in the implementation.

On the other hand, the prefix.cc, and #? ?_foo: implementations have issues. With prefix.cc, it's very unlikely you'll need to replace parameter values with resources in the foaf: or prov: namespaces. The #? ?_foo thing would be overkill for something which is an issue only at demo time with the swagger-ui interface (where you have to type the IRIs), since most of the usage of grlc enabled APIs will be programatic and users will never have to write those IRIs themselves.

I think the prettiest thing to do is to let parameter value IRIs to be abbreviated with arbitrary namespaces. If a namespace is defined in the query as e.g. PREFIX foo: , but never used in the query template, chances are that foo:thing will be a reasonable resource to use as parameter value in ?_var_iri placeholders (queries should indeed document this).
@rijpma @RinkeHoekstra

@albertmeronyo albertmeronyo self-assigned this Feb 4, 2016
albertmeronyo pushed a commit that referenced this issue Oct 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant