You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by "Neubert, Joachim" <J....@zbw.eu> on 2015/05/20 10:07:48 UTC

Fuseki2 - how to customize example queries?

Congrats to the Fuseki2 interface - it's really fun to explore!

The generic example queries (Selection of triples, Selection of classes) can help giving users an idea about a dataset. They could be amended however with custom, dataset-specific queries (and prefixes relevant for that dataset).

Is there a way to do this?

Cheers, Joachim



Re: Fuseki2 - how to customize example queries?

Posted by Claude Warren <cl...@xenei.com>.
Joachim,

See http://www.granatum.org/pub/videos.html#reveald click on the image of
the revealed display and a video will play.

This system enabled cancer researchers to investigate the data which was
federated from multiple SPARQL endpoints and included researcher specific
data (e.g. data the researcher had produced).

The entire system has been written up in several papers.  This paper:
https://www.researchgate.net/publication/271191966_A_Roadmap_for_navigating_the_Life_Sciences_Linked_Open_Data_Cloud
describes how the data were described so that the revealed system could
locate associated data.

Claude

On Wed, May 20, 2015 at 9:07 AM, Neubert, Joachim <J....@zbw.eu> wrote:

> Congrats to the Fuseki2 interface - it's really fun to explore!
>
> The generic example queries (Selection of triples, Selection of classes)
> can help giving users an idea about a dataset. They could be amended
> however with custom, dataset-specific queries (and prefixes relevant for
> that dataset).
>
> Is there a way to do this?
>
> Cheers, Joachim
>
>
>


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

Re: AW: AW: Fuseki2 - how to customize example queries?

Posted by Andy Seaborne <an...@apache.org>.
Joachim,

I'd be interested in hearing how that goes.  Fuseki(1|2) can just act as 
a SPARQL server, no associated application in the war.  The shiro.ini 
can easily be used to block everything not associated with the dataset 
services.  This is possibly the important use case at the moment. As you 
say, a full customizable end user interface would be a great enhancement 
for Fuseki and not trivial.

	Andy

On 21/05/15 17:30, Neubert, Joachim wrote:
> Hi Andy,
>
> Well, I had supposed the web app has access to (at least) the config.ttl data. So, it's not so easy ...
>
>  From a data publishers point of view, the first option you mention would be clearly preferable. Repackaging a .war is before deployment not such a big thing. But when queries evolve (with changed data structures and/or changed requirements), repackaging and repdeploying the application after each change could cause some pain.
>
> Re. the UI in general, I suppose it's a good idea to seperate end user and system management tasks. (I have not yet dived into spiro config, but probably such a separation would make it easier to hide sysadmin options from end users.)
>
> Having a generic yet customizable end user interface would be a great enhancement for Fuseki - and, I suppose, it would require lots of work. Unfortunately, due to very limited skills in Java as well as in Javascript, I'll not be able to contribute actual code, but I'd happily contribute to in discussing conceptual ideas and testing.
>
> Re-considering the options for now, I suppose I can use the approach described in http://zbw.eu/labs/blog/publishing-sparql-queries-live for providing customized forms for the ZBW endpoints. That should work for Fuseki1 as well as for Fuseki2, so it does not hinder migrating in any way.
>
> Cheers, Joachim
>
> -----Ursprüngliche Nachricht-----
> Von: Andy Seaborne [mailto:andy@apache.org]
> Gesendet: Donnerstag, 21. Mai 2015 15:17
> An: users@jena.apache.org
> Betreff: Re: AW: Fuseki2 - how to customize example queries?
>
> Joachim,
>
> That is going to take some code.
>
> The interface a webapp - it happens to be served from the same server as the database though not much actually requires that (mainly a security issue).  The database engine and the webapp are relatively separate things, by design.  There are a set of operations, under /$/ to support the webapp.
>
> Two things occur to be:
>
> 1/ /$/"get customization"?dataset= to return a JSON struct of URLs to get various things.
>
> 2/ A small step might be to allow qonsole-config.js to also have a map from dataset to examples, not just a global block.
>
> Stepping back a moment:
>
> At the moment, the Fuseki2 UI has mixed purposes. Originally for server admin, the person or group publishing the data, there was a query interface (because the publisher/administrator might actually want to look at the data!).  That's why the dataset.html has "select endpoint"
> and upload.
>
> But it is also a query application, for more general use, a wider audience.  And per endpoint / per dataset.
>
> Seems to me that the two functions need to be provided differently.
>
> A page like dataset.html for data mgt tasks for the publisher, and a page for data consumer.
>
> The latter is open ended - starting from customizable query example through ever more data specific tasks.  It would be nice if there wasn't a big chasm between the two.
>
> 	Andy
>
> On 21/05/15 10:47, Neubert, Joachim wrote:
>> Hi Andy,
>>
>> Thanks for the hint. However, I can't see how this data structure
>> could
>   > be used/extended to provide *dataset-specific* queries, as in e.g.
>> http://zbw.eu/beta/sparql/stw or http://zbw.eu/beta/sparql/gnd.
>>
>> Could you imagine to supplement the generic queries with additional
>> custom queries loadedfrom a file referenced in config.ttl (opitonally, of course)?
>>
>> Something like
>>
>> <#someDataset>  rdf:type ja:RDFDataset ;
>>       skos:example <file:examples/someDataset.js>" .
>>
>> (with someDataset.js  in the same syntax as qonsole-config.js).
>>
>> Cheers, Joachim
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Andy Seaborne [mailto:andy@apache.org]
>> Gesendet: Donnerstag, 21. Mai 2015 00:05
>> An: users@jena.apache.org
>> Betreff: Re: Fuseki2 - how to customize example queries?
>>
>> On 20/05/15 09:07, Neubert, Joachim wrote:
>>> Congrats to the Fuseki2 interface - it's really fun to explore!
>>>
>>> The generic example queries (Selection of triples, Selection of classes) can help giving users an idea about a dataset. They could be amended however with custom, dataset-specific queries (and prefixes relevant for that dataset).
>>>
>>> Is there a way to do this?
>>
>> They are in the file:
>>
>> webapp/js/app/qonsole-config.js
>>
>> If you are using the standalone jar: webapp is in the FUSEKI_HOME area
>>
>> If you are using the war, you'll need to unpack the war and change it.
>>
>> 	Andy
>>
>>>
>>> Cheers, Joachim
>>>
>>>
>>>
>>
>


Re: AW: Fuseki2 - how to customize example queries?

Posted by Martynas Jusevičius <ma...@graphity.org>.
Joachim,

you could try our Graphity Processor which does what I think you need:
it enables declarative configuration of SPARQL queries for different
Linked Data URI paths.

Please take a look here: http://graphityhq.com/technology/graphity-processor

Let me know if you need more help.

Martynas
graphityhq.com

On Thu, May 21, 2015 at 6:30 PM, Neubert, Joachim <J....@zbw.eu> wrote:
> Hi Andy,
>
> Well, I had supposed the web app has access to (at least) the config.ttl data. So, it's not so easy ...
>
> From a data publishers point of view, the first option you mention would be clearly preferable. Repackaging a .war is before deployment not such a big thing. But when queries evolve (with changed data structures and/or changed requirements), repackaging and repdeploying the application after each change could cause some pain.
>
> Re. the UI in general, I suppose it's a good idea to seperate end user and system management tasks. (I have not yet dived into spiro config, but probably such a separation would make it easier to hide sysadmin options from end users.)
>
> Having a generic yet customizable end user interface would be a great enhancement for Fuseki - and, I suppose, it would require lots of work. Unfortunately, due to very limited skills in Java as well as in Javascript, I'll not be able to contribute actual code, but I'd happily contribute to in discussing conceptual ideas and testing.
>
> Re-considering the options for now, I suppose I can use the approach described in http://zbw.eu/labs/blog/publishing-sparql-queries-live for providing customized forms for the ZBW endpoints. That should work for Fuseki1 as well as for Fuseki2, so it does not hinder migrating in any way.
>
> Cheers, Joachim
>
> -----Ursprüngliche Nachricht-----
> Von: Andy Seaborne [mailto:andy@apache.org]
> Gesendet: Donnerstag, 21. Mai 2015 15:17
> An: users@jena.apache.org
> Betreff: Re: AW: Fuseki2 - how to customize example queries?
>
> Joachim,
>
> That is going to take some code.
>
> The interface a webapp - it happens to be served from the same server as the database though not much actually requires that (mainly a security issue).  The database engine and the webapp are relatively separate things, by design.  There are a set of operations, under /$/ to support the webapp.
>
> Two things occur to be:
>
> 1/ /$/"get customization"?dataset= to return a JSON struct of URLs to get various things.
>
> 2/ A small step might be to allow qonsole-config.js to also have a map from dataset to examples, not just a global block.
>
> Stepping back a moment:
>
> At the moment, the Fuseki2 UI has mixed purposes. Originally for server admin, the person or group publishing the data, there was a query interface (because the publisher/administrator might actually want to look at the data!).  That's why the dataset.html has "select endpoint"
> and upload.
>
> But it is also a query application, for more general use, a wider audience.  And per endpoint / per dataset.
>
> Seems to me that the two functions need to be provided differently.
>
> A page like dataset.html for data mgt tasks for the publisher, and a page for data consumer.
>
> The latter is open ended - starting from customizable query example through ever more data specific tasks.  It would be nice if there wasn't a big chasm between the two.
>
>         Andy
>
> On 21/05/15 10:47, Neubert, Joachim wrote:
>> Hi Andy,
>>
>> Thanks for the hint. However, I can't see how this data structure
>> could
>  > be used/extended to provide *dataset-specific* queries, as in e.g.
>> http://zbw.eu/beta/sparql/stw or http://zbw.eu/beta/sparql/gnd.
>>
>> Could you imagine to supplement the generic queries with additional
>> custom queries loadedfrom a file referenced in config.ttl (opitonally, of course)?
>>
>> Something like
>>
>> <#someDataset>  rdf:type ja:RDFDataset ;
>>      skos:example <file:examples/someDataset.js>" .
>>
>> (with someDataset.js  in the same syntax as qonsole-config.js).
>>
>> Cheers, Joachim
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Andy Seaborne [mailto:andy@apache.org]
>> Gesendet: Donnerstag, 21. Mai 2015 00:05
>> An: users@jena.apache.org
>> Betreff: Re: Fuseki2 - how to customize example queries?
>>
>> On 20/05/15 09:07, Neubert, Joachim wrote:
>>> Congrats to the Fuseki2 interface - it's really fun to explore!
>>>
>>> The generic example queries (Selection of triples, Selection of classes) can help giving users an idea about a dataset. They could be amended however with custom, dataset-specific queries (and prefixes relevant for that dataset).
>>>
>>> Is there a way to do this?
>>
>> They are in the file:
>>
>> webapp/js/app/qonsole-config.js
>>
>> If you are using the standalone jar: webapp is in the FUSEKI_HOME area
>>
>> If you are using the war, you'll need to unpack the war and change it.
>>
>>       Andy
>>
>>>
>>> Cheers, Joachim
>>>
>>>
>>>
>>
>

AW: AW: Fuseki2 - how to customize example queries?

Posted by "Neubert, Joachim" <J....@zbw.eu>.
Hi Andy,

Well, I had supposed the web app has access to (at least) the config.ttl data. So, it's not so easy ... 

>From a data publishers point of view, the first option you mention would be clearly preferable. Repackaging a .war is before deployment not such a big thing. But when queries evolve (with changed data structures and/or changed requirements), repackaging and repdeploying the application after each change could cause some pain.

Re. the UI in general, I suppose it's a good idea to seperate end user and system management tasks. (I have not yet dived into spiro config, but probably such a separation would make it easier to hide sysadmin options from end users.)

Having a generic yet customizable end user interface would be a great enhancement for Fuseki - and, I suppose, it would require lots of work. Unfortunately, due to very limited skills in Java as well as in Javascript, I'll not be able to contribute actual code, but I'd happily contribute to in discussing conceptual ideas and testing.

Re-considering the options for now, I suppose I can use the approach described in http://zbw.eu/labs/blog/publishing-sparql-queries-live for providing customized forms for the ZBW endpoints. That should work for Fuseki1 as well as for Fuseki2, so it does not hinder migrating in any way.

Cheers, Joachim

-----Ursprüngliche Nachricht-----
Von: Andy Seaborne [mailto:andy@apache.org] 
Gesendet: Donnerstag, 21. Mai 2015 15:17
An: users@jena.apache.org
Betreff: Re: AW: Fuseki2 - how to customize example queries?

Joachim,

That is going to take some code.

The interface a webapp - it happens to be served from the same server as the database though not much actually requires that (mainly a security issue).  The database engine and the webapp are relatively separate things, by design.  There are a set of operations, under /$/ to support the webapp.

Two things occur to be:

1/ /$/"get customization"?dataset= to return a JSON struct of URLs to get various things.

2/ A small step might be to allow qonsole-config.js to also have a map from dataset to examples, not just a global block.

Stepping back a moment:

At the moment, the Fuseki2 UI has mixed purposes. Originally for server admin, the person or group publishing the data, there was a query interface (because the publisher/administrator might actually want to look at the data!).  That's why the dataset.html has "select endpoint" 
and upload.

But it is also a query application, for more general use, a wider audience.  And per endpoint / per dataset.

Seems to me that the two functions need to be provided differently.

A page like dataset.html for data mgt tasks for the publisher, and a page for data consumer.

The latter is open ended - starting from customizable query example through ever more data specific tasks.  It would be nice if there wasn't a big chasm between the two.

	Andy

On 21/05/15 10:47, Neubert, Joachim wrote:
> Hi Andy,
>
> Thanks for the hint. However, I can't see how this data structure 
> could
 > be used/extended to provide *dataset-specific* queries, as in e.g.
> http://zbw.eu/beta/sparql/stw or http://zbw.eu/beta/sparql/gnd.
>
> Could you imagine to supplement the generic queries with additional 
> custom queries loadedfrom a file referenced in config.ttl (opitonally, of course)?
>
> Something like
>
> <#someDataset>  rdf:type ja:RDFDataset ;
>      skos:example <file:examples/someDataset.js>" .
>
> (with someDataset.js  in the same syntax as qonsole-config.js).
>
> Cheers, Joachim
>
> -----Ursprüngliche Nachricht-----
> Von: Andy Seaborne [mailto:andy@apache.org]
> Gesendet: Donnerstag, 21. Mai 2015 00:05
> An: users@jena.apache.org
> Betreff: Re: Fuseki2 - how to customize example queries?
>
> On 20/05/15 09:07, Neubert, Joachim wrote:
>> Congrats to the Fuseki2 interface - it's really fun to explore!
>>
>> The generic example queries (Selection of triples, Selection of classes) can help giving users an idea about a dataset. They could be amended however with custom, dataset-specific queries (and prefixes relevant for that dataset).
>>
>> Is there a way to do this?
>
> They are in the file:
>
> webapp/js/app/qonsole-config.js
>
> If you are using the standalone jar: webapp is in the FUSEKI_HOME area
>
> If you are using the war, you'll need to unpack the war and change it.
>
> 	Andy
>
>>
>> Cheers, Joachim
>>
>>
>>
>


Re: AW: Fuseki2 - how to customize example queries?

Posted by Andy Seaborne <an...@apache.org>.
Joachim,

That is going to take some code.

The interface a webapp - it happens to be served from the same server as 
the database though not much actually requires that (mainly a security 
issue).  The database engine and the webapp are relatively separate 
things, by design.  There are a set of operations, under /$/ to support 
the webapp.

Two things occur to be:

1/ /$/"get customization"?dataset= to return a JSON struct of URLs to 
get various things.

2/ A small step might be to allow qonsole-config.js to also have a map 
from dataset to examples, not just a global block.

Stepping back a moment:

At the moment, the Fuseki2 UI has mixed purposes. Originally for server 
admin, the person or group publishing the data, there was a query 
interface (because the publisher/administrator might actually want to 
look at the data!).  That's why the dataset.html has "select endpoint" 
and upload.

But it is also a query application, for more general use, a wider 
audience.  And per endpoint / per dataset.

Seems to me that the two functions need to be provided differently.

A page like dataset.html for data mgt tasks for the publisher, and a 
page for data consumer.

The latter is open ended - starting from customizable query example 
through ever more data specific tasks.  It would be nice if there wasn't 
a big chasm between the two.

	Andy

On 21/05/15 10:47, Neubert, Joachim wrote:
> Hi Andy,
>
> Thanks for the hint. However, I can't see how this data structure could
 > be used/extended to provide *dataset-specific* queries, as in e.g.
> http://zbw.eu/beta/sparql/stw or http://zbw.eu/beta/sparql/gnd.
>
> Could you imagine to supplement the generic queries with additional
> custom queries loadedfrom a file referenced in config.ttl (opitonally, of course)?
>
> Something like
>
> <#someDataset>  rdf:type ja:RDFDataset ;
>      skos:example <file:examples/someDataset.js>" .
>
> (with someDataset.js  in the same syntax as qonsole-config.js).
>
> Cheers, Joachim
>
> -----Ursprüngliche Nachricht-----
> Von: Andy Seaborne [mailto:andy@apache.org]
> Gesendet: Donnerstag, 21. Mai 2015 00:05
> An: users@jena.apache.org
> Betreff: Re: Fuseki2 - how to customize example queries?
>
> On 20/05/15 09:07, Neubert, Joachim wrote:
>> Congrats to the Fuseki2 interface - it's really fun to explore!
>>
>> The generic example queries (Selection of triples, Selection of classes) can help giving users an idea about a dataset. They could be amended however with custom, dataset-specific queries (and prefixes relevant for that dataset).
>>
>> Is there a way to do this?
>
> They are in the file:
>
> webapp/js/app/qonsole-config.js
>
> If you are using the standalone jar: webapp is in the FUSEKI_HOME area
>
> If you are using the war, you'll need to unpack the war and change it.
>
> 	Andy
>
>>
>> Cheers, Joachim
>>
>>
>>
>


AW: Fuseki2 - how to customize example queries?

Posted by "Neubert, Joachim" <J....@zbw.eu>.
Hi Andy,

Thanks for the hint. However, I can't see how this data structure could be used/extended to provide *dataset-specific* queries, as in e.g. http://zbw.eu/beta/sparql/stw or http://zbw.eu/beta/sparql/gnd. 

Could you imagine to supplement the generic queries with additional custom queries loaded from a file referenced in config.ttl (opitonally, of course)?

Something like

<#someDataset>  rdf:type ja:RDFDataset ;
    skos:example <file:examples/someDataset.js>" .

(with someDataset.js  in the same syntax as qonsole-config.js).

Cheers, Joachim

-----Ursprüngliche Nachricht-----
Von: Andy Seaborne [mailto:andy@apache.org] 
Gesendet: Donnerstag, 21. Mai 2015 00:05
An: users@jena.apache.org
Betreff: Re: Fuseki2 - how to customize example queries?

On 20/05/15 09:07, Neubert, Joachim wrote:
> Congrats to the Fuseki2 interface - it's really fun to explore!
>
> The generic example queries (Selection of triples, Selection of classes) can help giving users an idea about a dataset. They could be amended however with custom, dataset-specific queries (and prefixes relevant for that dataset).
>
> Is there a way to do this?

They are in the file:

webapp/js/app/qonsole-config.js

If you are using the standalone jar: webapp is in the FUSEKI_HOME area

If you are using the war, you'll need to unpack the war and change it.

	Andy

>
> Cheers, Joachim
>
>
>


Re: Fuseki2 - how to customize example queries?

Posted by Andy Seaborne <an...@apache.org>.
On 20/05/15 09:07, Neubert, Joachim wrote:
> Congrats to the Fuseki2 interface - it's really fun to explore!
>
> The generic example queries (Selection of triples, Selection of classes) can help giving users an idea about a dataset. They could be amended however with custom, dataset-specific queries (and prefixes relevant for that dataset).
>
> Is there a way to do this?

They are in the file:

webapp/js/app/qonsole-config.js

If you are using the standalone jar: webapp is in the FUSEKI_HOME area

If you are using the war, you'll need to unpack the war and change it.

	Andy

>
> Cheers, Joachim
>
>
>