Awhile back I was looking for a way to change/add to the list of prefixes
at runtime.  This request dovetails nicely with what I was looking for.  I
got sidetracked with other issues at work before I could really get to it.

As I recall most storage layers don't keep a list of namespaces separate
from the nodes they are used with so there may not be a quick mechanism to
determine the namespaces at startup and the solution may have to resort to
querying for all the namespaces in the stored graph(s) first. So
determining which prefixes to use may be an issue.

However, once the prefixes have been determined (even if from the current
configuration file that is currently used) adding something like a custom
header to Fuseki processing to add the prefixes to a query should be fairly
simple.

The only issue will be how to do the overrides.  I'm not certain but
current processing may help here.  I expect that (but do not have time to
test) that later definitions override earlier definitions providing a query
with a prefix defined 2x and seeing what it does would tell you whether or
not it would be a simple as adding the default prefixes to the front of the
query input stream before it was processed normally.

The solution seems easy enough and unobtrusive enough to be implementable
and unobjectionable.

Personally, I can see that it would be handy to have the system add all the
prefixes it knows about on every query so that users always get back the
shortened (more familiar) versions of the URLs as they are much easier to
scan and understand.

Claude



On Mon, Feb 26, 2018 at 6:51 AM, Laura Morales <laure...@mail.com> wrote:

> Because to me it seems like a very useful feature for Fuseki. For users
> it's simpler to think in terms of short properties instead of long urls, so
> they can submit queries right away without worrying of what is the exact
> url for a particular prefix. I'm not saying that this is a fundamental
> feature that Fuseki must have, but rather just an option that would be
> really useful. By the way, this is already happening with "a". In order to
> use this keyword, there is no need to use "PREFIX rdf: <
> http://www.w3.org/1999/02/22-rdf-syntax-ns#>" all the time. Which I think
> is really useful because I can remember "a" by heart but I would never be
> able to recall such a long prefix.
> Should maybe this be in the SPARQL specifications before Fuseki adds it,
> the same way "a" is? I could send an email to w3c for consideration.
>
>
>
>
> Sent: Sunday, February 25, 2018 at 10:46 PM
> From: ajs6f <aj...@apache.org>
> To: users@jena.apache.org
> Subject: Re: Use PREFIXes by default
> If you are not concerned about performance, why not add those prefixes
> client-side?
>
>
> ajs6f
>



-- 
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren

Reply via email to