Re: Fuseki / ARQ DESCRIBE query to include ?s ?p

2017-03-03 Thread A. Soroka
I'm not sure what you mean by such triples as "(?s ?p  and 
probably (?s  ?o). "

Can you give some concrete examples?

---
A. Soroka
The University of Virginia Library

> On Mar 3, 2017, at 5:13 AM, Beetz, J.  wrote:
> 
> Dear community,
> 
> I have set up a Pubby http://wifo5-03.informatik.uni-mannheim.de/pubby/ 
> frontend to allow dereferencing/content-negotiation/browser-navigation of a 
> vocabulary served by Fuseki 2.4.1 .
> As per the SPARQL standard, the default behavior of DESCRIBE queries that are 
> sent by the frontend to Fuseki is left to the implementation. Fusekis default 
> behavior is to send back the graph containing all triples where  resource> is the subject ( ?p ?o). I would also like to 
> include (?s ?p  and probably (?s  ?o). 
> 
> From the list archive I have seen that I can probably implement my own 
> execDescribe() similar to this thread from some time ago: 
> http://jena.markmail.org/message/5thzze4xhqhak34g?q=describe+query+%3Fs+%3Fp+%3Fo&page=2#query:describe%20query%20%3Fs%20%3Fp%20%3Fo+page:2+mid:5thzze4xhqhak34g+state:results
> 
> I wonder whether there is another (easier) way through a configuration 
> setting or similar which allows me to achieve this.
> 
> Thank you very much in advance for your help
> 
> Jakob
> 
> ___
> Dr. Jakob Beetz - Assistant Professor 
> Information Systems in the Built Environment (ISBE) Group
> Department of the Built Environment | Bouwkunde
> Eindhoven University of Technology, The Netherlands
> phone: +31 (0)40 247 2288 on-campus location: VRT 9.J06
> 



Re: Fuseki / ARQ DESCRIBE query to include ?s ?p

2017-03-03 Thread Martynas Jusevičius
Isn't Fuseki already doing the same as Pubby?

On Fri, Mar 3, 2017 at 11:13 AM, Beetz, J.  wrote:
> Dear community,
>
> I have set up a Pubby http://wifo5-03.informatik.uni-mannheim.de/pubby/ 
> frontend to allow dereferencing/content-negotiation/browser-navigation of a 
> vocabulary served by Fuseki 2.4.1 .
> As per the SPARQL standard, the default behavior of DESCRIBE queries that are 
> sent by the frontend to Fuseki is left to the implementation. Fusekis default 
> behavior is to send back the graph containing all triples where  resource> is the subject ( ?p ?o). I would also like to 
> include (?s ?p  and probably (?s  ?o).
>
> From the list archive I have seen that I can probably implement my own 
> execDescribe() similar to this thread from some time ago:
> http://jena.markmail.org/message/5thzze4xhqhak34g?q=describe+query+%3Fs+%3Fp+%3Fo&page=2#query:describe%20query%20%3Fs%20%3Fp%20%3Fo+page:2+mid:5thzze4xhqhak34g+state:results
>
> I wonder whether there is another (easier) way through a configuration 
> setting or similar which allows me to achieve this.
>
> Thank you very much in advance for your help
>
> Jakob
>
> ___
> Dr. Jakob Beetz - Assistant Professor
> Information Systems in the Built Environment (ISBE) Group
> Department of the Built Environment | Bouwkunde
> Eindhoven University of Technology, The Netherlands
> phone: +31 (0)40 247 2288 on-campus location: VRT 9.J06
>


Re: Fuseki / ARQ DESCRIBE query to include ?s ?p

2017-03-03 Thread A. Soroka
No, Pubby [1] is designed to present a simple "Linked Data" representation of 
resources the data for which are recorded in some SPARQL-equipped service (e.g. 
Fuseki).

You set up Pubby aimed at your SPARQL endpoint, and then when people make 
requests for a particular resource from Pubby, it gives them the results of a 
DESCRIBE query on that resource.

---
A. Soroka
The University of Virginia Library

[1]

> On Mar 3, 2017, at 9:37 AM, Martynas Jusevičius  wrote:
> 
> Isn't Fuseki already doing the same as Pubby?
> 
> On Fri, Mar 3, 2017 at 11:13 AM, Beetz, J.  wrote:
>> Dear community,
>> 
>> I have set up a Pubby http://wifo5-03.informatik.uni-mannheim.de/pubby/ 
>> frontend to allow dereferencing/content-negotiation/browser-navigation of a 
>> vocabulary served by Fuseki 2.4.1 .
>> As per the SPARQL standard, the default behavior of DESCRIBE queries that 
>> are sent by the frontend to Fuseki is left to the implementation. Fusekis 
>> default behavior is to send back the graph containing all triples where 
>>  is the subject ( ?p ?o). I would also 
>> like to include (?s ?p  and probably (?s > resource> ?o).
>> 
>> From the list archive I have seen that I can probably implement my own 
>> execDescribe() similar to this thread from some time ago:
>> http://jena.markmail.org/message/5thzze4xhqhak34g?q=describe+query+%3Fs+%3Fp+%3Fo&page=2#query:describe%20query%20%3Fs%20%3Fp%20%3Fo+page:2+mid:5thzze4xhqhak34g+state:results
>> 
>> I wonder whether there is another (easier) way through a configuration 
>> setting or similar which allows me to achieve this.
>> 
>> Thank you very much in advance for your help
>> 
>> Jakob
>> 
>> ___
>> Dr. Jakob Beetz - Assistant Professor
>> Information Systems in the Built Environment (ISBE) Group
>> Department of the Built Environment | Bouwkunde
>> Eindhoven University of Technology, The Netherlands
>> phone: +31 (0)40 247 2288 on-campus location: VRT 9.J06
>> 



RE: Fuseki / ARQ DESCRIBE query to include ?s ?p

2017-03-03 Thread Beetz, J.
Dear A. Soroka, 
Thank you for the quick reply.

> I'm not sure what you mean by such triples as "(?s ?p  and
> probably (?s  ?o). "
> 
> Can you give some concrete examples?

Suppose I have a graph:

@prefix foo: 

foo:Foo a owl:Class ;
rdfs:label "The Foo concept"@en . 

foo:Bar a owl:Class ;
rdfs:label "The Bar concept"@en ;
foo:has_part foo:Foo .

foo:has_part a owl:ObjectProperty ;

When doing a standard 

DESCRIBE  

on the my Fuseki SPARQL endpoint, I get the answer

foo:Foo rdf:type owl:Class .
foo:Foo rdfs:label "The Foo concept"@en .

but not 

foo:Bar foo:has_part foo:Foo .

since only triples are returned where the  
resource is the subject ( ?p ?o) not where it  is the object (?s ?p ) 
or predicate (?s  ?o)

I could navigate to foo:Bar by inserting foo:part_of as a reverse relationship 
to foo:has_part but do would like to avoid these additional triples in the 70k 
triple data set. 

I hope my question became somewhat clearer.

Thanks
Jakob
___
Dr. Jakob Beetz - Assistant Professor 
Information Systems in the Built Environment (ISBE) Group
Department of the Built Environment | Bouwkunde
Eindhoven University of Technology, The Netherlands
phone: +31 (0)40 247 2288 on-campus location: VRT 9.J06

> ---
> A. Soroka
> The University of Virginia Library
> 
> > On Mar 3, 2017, at 5:13 AM, Beetz, J.  wrote:
> >
> > Dear community,
> >
> > I have set up a Pubby http://wifo5-03.informatik.uni-mannheim.de/pubby/
> frontend to allow dereferencing/content-negotiation/browser-navigation of a
> vocabulary served by Fuseki 2.4.1 .
> > As per the SPARQL standard, the default behavior of DESCRIBE queries that 
> > are
> sent by the frontend to Fuseki is left to the implementation. Fusekis default
> behavior is to send back the graph containing all triples where  resource> is the subject ( ?p ?o). I would also like to
> include (?s ?p  and probably (?s  ?o).
> >
> > From the list archive I have seen that I can probably implement my own
> execDescribe() similar to this thread from some time ago:
> >
> http://jena.markmail.org/message/5thzze4xhqhak34g?q=describe+query+%3Fs+%3Fp+%3
> Fo&page=2#query:describe%20query%20%3Fs%20%3Fp%20%3Fo+page:2+mid:5thzze4xhqhak3
> 4g+state:results
> >
> > I wonder whether there is another (easier) way through a configuration
> setting or similar which allows me to achieve this.
> >
> > Thank you very much in advance for your help
> >
> > Jakob
> >
> > ___
> > Dr. Jakob Beetz - Assistant Professor
> > Information Systems in the Built Environment (ISBE) Group
> > Department of the Built Environment | Bouwkunde
> > Eindhoven University of Technology, The Netherlands
> > phone: +31 (0)40 247 2288 on-campus location: VRT 9.J06
> >



Re: Fuseki / ARQ DESCRIBE query to include ?s ?p

2017-03-04 Thread Andy Seaborne

Minor clarification:

Fuseki's default behaviour is the calculate the blank node closure based 
on the "subject ( ?p ?o)".



There's a registry DescribeHandlerRegistry and a context key for setting 
it (ARQConstants.registryDescribeHandlers).


The registry keeps a list of DescribeHandlerFactory and calls each one 
on the list.


Adding to that list or setting per query is doable but it's Java - in 
Fuseki from just configuring, it's not doable.


Adding a context setting to set the DescribeHandle policy by name would 
achieve that.


Andy

e.g.
https://gist.github.com/shellac/1313924

On 03/03/17 10:13, Beetz, J. wrote:

Dear community,

I have set up a Pubby http://wifo5-03.informatik.uni-mannheim.de/pubby/ 
frontend to allow dereferencing/content-negotiation/browser-navigation of a 
vocabulary served by Fuseki 2.4.1 .
As per the SPARQL standard, the default behavior of DESCRIBE queries that are sent by the frontend to 
Fuseki is left to the implementation. Fusekis default behavior is to send back the graph containing all 
triples where  is the subject ( ?p ?o). I would also 
like to include (?s ?p  and probably (?s  ?o).

From the list archive I have seen that I can probably implement my own 
execDescribe() similar to this thread from some time ago:
http://jena.markmail.org/message/5thzze4xhqhak34g?q=describe+query+%3Fs+%3Fp+%3Fo&page=2#query:describe%20query%20%3Fs%20%3Fp%20%3Fo+page:2+mid:5thzze4xhqhak34g+state:results

I wonder whether there is another (easier) way through a configuration setting 
or similar which allows me to achieve this.

Thank you very much in advance for your help

Jakob

___
Dr. Jakob Beetz - Assistant Professor
Information Systems in the Built Environment (ISBE) Group
Department of the Built Environment | Bouwkunde
Eindhoven University of Technology, The Netherlands
phone: +31 (0)40 247 2288 on-campus location: VRT 9.J06



RE: Fuseki / ARQ DESCRIBE query to include ?s ?p

2017-03-06 Thread Beetz, J.
Hi Andy,

Thanks a lot, this are  exactly the pointers I had whished for! 

I will give this a try.

Thank you for your quick and helpful answer,
Jakob

___
Dr. Jakob Beetz - Assistant Professor 
Information Systems in the Built Environment (ISBE) Group
Department of the Built Environment | Bouwkunde
Eindhoven University of Technology, The Netherlands
phone: +31 (0)40 247 2288 on-campus location: VRT 9.J06

> -Original Message-
> From: Andy Seaborne [mailto:a...@apache.org]
> Sent: zaterdag 4 maart 2017 20:00
> To: users@jena.apache.org
> Subject: Re: Fuseki / ARQ DESCRIBE query to include ?s ?p 
> 
> Minor clarification:
> 
> Fuseki's default behaviour is the calculate the blank node closure based
> on the "subject ( ?p ?o)".
> 
> 
> There's a registry DescribeHandlerRegistry and a context key for setting
> it (ARQConstants.registryDescribeHandlers).
> 
> The registry keeps a list of DescribeHandlerFactory and calls each one
> on the list.
> 
> Adding to that list or setting per query is doable but it's Java - in
> Fuseki from just configuring, it's not doable.
> 
> Adding a context setting to set the DescribeHandle policy by name would
> achieve that.
> 
>   Andy
> 
> e.g.
> https://gist.github.com/shellac/1313924
> 
> On 03/03/17 10:13, Beetz, J. wrote:
> > Dear community,
> >
> > I have set up a Pubby http://wifo5-03.informatik.uni-mannheim.de/pubby/
> frontend to allow dereferencing/content-negotiation/browser-navigation of a
> vocabulary served by Fuseki 2.4.1 .
> > As per the SPARQL standard, the default behavior of DESCRIBE queries that 
> > are
> sent by the frontend to Fuseki is left to the implementation. Fusekis default
> behavior is to send back the graph containing all triples where  resource> is the subject ( ?p ?o). I would also like to
> include (?s ?p  and probably (?s  ?o).
> >
> > From the list archive I have seen that I can probably implement my own
> execDescribe() similar to this thread from some time ago:
> >
> http://jena.markmail.org/message/5thzze4xhqhak34g?q=describe+query+%3Fs+%3Fp+%3
> Fo&page=2#query:describe%20query%20%3Fs%20%3Fp%20%3Fo+page:2+mid:5thzze4xhqhak3
> 4g+state:results
> >
> > I wonder whether there is another (easier) way through a configuration
> setting or similar which allows me to achieve this.
> >
> > Thank you very much in advance for your help
> >
> > Jakob
> >
> > ___
> > Dr. Jakob Beetz - Assistant Professor
> > Information Systems in the Built Environment (ISBE) Group
> > Department of the Built Environment | Bouwkunde
> > Eindhoven University of Technology, The Netherlands
> > phone: +31 (0)40 247 2288 on-campus location: VRT 9.J06
> >


Re: Fuseki / ARQ DESCRIBE query to include ?s ?p

2017-03-06 Thread Conal Tuohy
Jakob, you may also be able to tweak Pubby to use a SPARQL CONSTRUCT query
instead of DESCRIBE, in which case you can implement your Linked Data pages
in SPARQL. Note that you may find that listing all the triples in which a
given resource appears as the object or predicate will yield a very large
number of triples. You may find you need to implement some kind of
pagination mechanism.

On 6 March 2017 at 22:19, Beetz, J.  wrote:

> Hi Andy,
>
> Thanks a lot, this are  exactly the pointers I had whished for!
>
> I will give this a try.
>
> Thank you for your quick and helpful answer,
> Jakob
>
> ___
> Dr. Jakob Beetz - Assistant Professor
> Information Systems in the Built Environment (ISBE) Group
> Department of the Built Environment | Bouwkunde
> Eindhoven University of Technology, The Netherlands
> phone: +31 (0)40 247 2288 on-campus location: VRT 9.J06
>
> > -Original Message-
> > From: Andy Seaborne [mailto:a...@apache.org]
> > Sent: zaterdag 4 maart 2017 20:00
> > To: users@jena.apache.org
> > Subject: Re: Fuseki / ARQ DESCRIBE query to include ?s ?p  resource>
> >
> > Minor clarification:
> >
> > Fuseki's default behaviour is the calculate the blank node closure based
> > on the "subject ( ?p ?o)".
> >
> >
> > There's a registry DescribeHandlerRegistry and a context key for setting
> > it (ARQConstants.registryDescribeHandlers).
> >
> > The registry keeps a list of DescribeHandlerFactory and calls each one
> > on the list.
> >
> > Adding to that list or setting per query is doable but it's Java - in
> > Fuseki from just configuring, it's not doable.
> >
> > Adding a context setting to set the DescribeHandle policy by name would
> > achieve that.
> >
> >   Andy
> >
> > e.g.
> > https://gist.github.com/shellac/1313924
> >
> > On 03/03/17 10:13, Beetz, J. wrote:
> > > Dear community,
> > >
> > > I have set up a Pubby http://wifo5-03.informatik.
> uni-mannheim.de/pubby/
> > frontend to allow dereferencing/content-negotiation/browser-navigation
> of a
> > vocabulary served by Fuseki 2.4.1 .
> > > As per the SPARQL standard, the default behavior of DESCRIBE queries
> that are
> > sent by the frontend to Fuseki is left to the implementation. Fusekis
> default
> > behavior is to send back the graph containing all triples where  > resource> is the subject ( ?p ?o). I would also like
> to
> > include (?s ?p  and probably (?s 
> ?o).
> > >
> > > From the list archive I have seen that I can probably implement my own
> > execDescribe() similar to this thread from some time ago:
> > >
> > http://jena.markmail.org/message/5thzze4xhqhak34g?q=
> describe+query+%3Fs+%3Fp+%3
> > Fo&page=2#query:describe%20query%20%3Fs%20%3Fp%20%3Fo+
> page:2+mid:5thzze4xhqhak3
> > 4g+state:results
> > >
> > > I wonder whether there is another (easier) way through a configuration
> > setting or similar which allows me to achieve this.
> > >
> > > Thank you very much in advance for your help
> > >
> > > Jakob
> > >
> > > ___
> > > Dr. Jakob Beetz - Assistant Professor
> > > Information Systems in the Built Environment (ISBE) Group
> > > Department of the Built Environment | Bouwkunde
> > > Eindhoven University of Technology, The Netherlands
> > > phone: +31 (0)40 247 2288 on-campus location: VRT 9.J06
> > >
>



-- 
Conal Tuohy
http://conaltuohy.com/
@conal_tuohy
+61-466-324297


RE: Fuseki / ARQ DESCRIBE query to include ?s ?p

2017-03-06 Thread Beetz, J.
Conal, thanks!

This might even be the better option, also since the "Client" (Pubby in this 
case) is much more lightweight... 

While browsing the pubby source, I think I found an even easier way in 
https://github.com/cygri/pubby/blob/f819ac1a8e1f6ba5a2434347cc6510300d95f375/doc/config.ttl
 

# Queries for describing a resource denoted by "?__this__".
# Multiple queries can be specified, results will be merged.
#conf:resourceDescriptionQuery "CONSTRUCT { ?__this__ ?p ?o } WHERE { 
?__this__ ?p ?o }";
#conf:resourceDescriptionQuery "CONSTRUCT { ?s ?p ?__this__ } WHERE { 
?s ?p ?__this__ }";

This very much looks as if it were exactly what I've been looking in the first 
place... just at the wrong end of the tool chain. 
I'll give this a try and get back to the list in case someone in future has 
similar issues (even though it becomes somewhat off-topic and non 
ARQ/Fuseki/Jena specific)

Thanks again for the help
Jakob
___
Dr. Jakob Beetz - Assistant Professor 
Information Systems in the Built Environment (ISBE) Group
Department of the Built Environment | Bouwkunde
Eindhoven University of Technology, The Netherlands
phone: +31 (0)40 247 2288 on-campus location: VRT 9.J06

> -Original Message-
> From: Conal Tuohy [mailto:conal.tu...@gmail.com]
> Sent: maandag 6 maart 2017 13:35
> To: Jena Users
> Subject: Re: Fuseki / ARQ DESCRIBE query to include ?s ?p 
> 
> Jakob, you may also be able to tweak Pubby to use a SPARQL CONSTRUCT query
> instead of DESCRIBE, in which case you can implement your Linked Data pages
> in SPARQL. Note that you may find that listing all the triples in which a
> given resource appears as the object or predicate will yield a very large
> number of triples. You may find you need to implement some kind of
> pagination mechanism.
> 
> On 6 March 2017 at 22:19, Beetz, J.  wrote:
> 
> > Hi Andy,
> >
> > Thanks a lot, this are  exactly the pointers I had whished for!
> >
> > I will give this a try.
> >
> > Thank you for your quick and helpful answer,
> > Jakob
> >
> > ___
> > Dr. Jakob Beetz - Assistant Professor
> > Information Systems in the Built Environment (ISBE) Group
> > Department of the Built Environment | Bouwkunde
> > Eindhoven University of Technology, The Netherlands
> > phone: +31 (0)40 247 2288 on-campus location: VRT 9.J06
> >
> > > -Original Message-
> > > From: Andy Seaborne [mailto:a...@apache.org]
> > > Sent: zaterdag 4 maart 2017 20:00
> > > To: users@jena.apache.org
> > > Subject: Re: Fuseki / ARQ DESCRIBE query to include ?s ?p  > resource>
> > >
> > > Minor clarification:
> > >
> > > Fuseki's default behaviour is the calculate the blank node closure based
> > > on the "subject ( ?p ?o)".
> > >
> > >
> > > There's a registry DescribeHandlerRegistry and a context key for setting
> > > it (ARQConstants.registryDescribeHandlers).
> > >
> > > The registry keeps a list of DescribeHandlerFactory and calls each one
> > > on the list.
> > >
> > > Adding to that list or setting per query is doable but it's Java - in
> > > Fuseki from just configuring, it's not doable.
> > >
> > > Adding a context setting to set the DescribeHandle policy by name would
> > > achieve that.
> > >
> > >   Andy
> > >
> > > e.g.
> > > https://gist.github.com/shellac/1313924
> > >
> > > On 03/03/17 10:13, Beetz, J. wrote:
> > > > Dear community,
> > > >
> > > > I have set up a Pubby http://wifo5-03.informatik.
> > uni-mannheim.de/pubby/
> > > frontend to allow dereferencing/content-negotiation/browser-navigation
> > of a
> > > vocabulary served by Fuseki 2.4.1 .
> > > > As per the SPARQL standard, the default behavior of DESCRIBE queries
> > that are
> > > sent by the frontend to Fuseki is left to the implementation. Fusekis
> > default
> > > behavior is to send back the graph containing all triples where  > > resource> is the subject ( ?p ?o). I would also like
> > to
> > > include (?s ?p  and probably (?s 
> > ?o).
> > > >
> > > > From the list archive I have seen that I can probably implement my own
> > > execDescribe() similar to this thread from some time ago:
> > > >
> > > http://jena.markmail.org/message/5thzze4xhqhak34g?q=
> > describe+query+%3Fs