Re: Fuseki 2: Security issue “Information Exposure”

2016-02-01 Thread Andy Seaborne
On 31/01/16 17:05, A. Soroka wrote: Just for the record, Andy, do we now have a standard way of determining a running version for when it is necessary to answer a question? I’m thinking here of folks who may have “inherited” a deployed Fuseki install and who then run into questions or troubles

Re: Fuseki 2: Security issue “Information Exposure”

2016-02-01 Thread Rob Vesse
They can still run the Fuseki command at their terminal with the --version flag e.g. $ fuseki-server --version Jena: VERSION: 3.0.1 Jena: BUILD_DATE: 2015-12-08T09:24:07+ ARQ:VERSION: 3.0.1 ARQ:BUILD_DATE: 2015-12-08T09:24:07+ RIOT: VERSION: 3.0.1 RIOT:

Optimising path to root concept SPARQL query

2016-02-01 Thread Joël Kuiper
Hey all, I’m trying to run a query to find the path to the root concept of a graph. The entries are defined as rdfs:subClassOf Currently I’m using PREFIX skos: > PREFIX rdfs:

Re: Fuseki 2: Security issue “Information Exposure”

2016-02-01 Thread A. Soroka
Good answers from Rob and Andy, thanks! --- A. Soroka The University of Virginia Library > On Feb 1, 2016, at 6:08 AM, Rob Vesse wrote: > > They can still run the Fuseki command at their terminal with the --version > flag e.g. > > $ fuseki-server --version > Jena: VERSION: 3.0.1 > Jena:

Re: Optimising path to root concept SPARQL query

2016-02-01 Thread Andy Seaborne
On 01/02/16 12:11, Joël Kuiper wrote: Hey all, I’m trying to run a query to find the path to the root concept of a graph. The entries are defined as rdfs:subClassOf Currently I’m using PREFIX skos: > PREFIX rdfs:

Re: Optimising path to root concept SPARQL query

2016-02-01 Thread Joël Kuiper
> On 01 Feb 2016, at 13:49, Andy Seaborne wrote: > > On 01/02/16 12:11, Joël Kuiper wrote: >> Hey all, >> >> I’m trying to run a query to find the path to the root concept of a graph. >> The entries are defined as rdfs:subClassOf >> >> Currently I’m using >> >> PREFIX skos:

Re: Optimising path to root concept SPARQL query

2016-02-01 Thread Joël Kuiper
Concretely I’m using this to get the path to root for a specific concept, e.g. PREFIX rdfs: SELECT DISTINCT ?parent WHERE { GRAPH ?g { rdfs:subClassOf+ ?parent . }} Would return all the (distinct) intermediates >

Re: Optimising path to root concept SPARQL query

2016-02-01 Thread Paul Tyson
I don't know that you can get such results from sparql directly. I would get flat list of subclass relations in xml (.srx) or Json and then process with xslt or JavaScript to write out class hierarchy. Regards, --Paul > On Feb 1, 2016, at 07:05, Joël Kuiper wrote: > > This message has no cont

Re: Optimising path to root concept SPARQL query

2016-02-01 Thread Joël Kuiper
Well the query does what it needs to do, for a given concept find the path to a root, for example: query: SELECT DISTINCT ?parent WHERE { GRAPH ?g { > rdfs:subClassOf+ ?parent . }}

Re: Optimising path to root concept SPARQL query

2016-02-01 Thread buehmann
There is no guarantee with this query to get a path, but instead all ancestor classes for the given class. In your example it might have been worked, but this is more by chance. On 01.02.2016 16:13, Joël Kuiper wrote: Well the query does what it needs to do, for a given concept find the path t

Re: Optimising path to root concept SPARQL query

2016-02-01 Thread Joël Kuiper
True, fair enough. But that works too for our use case :-) (it’s a machine learning classification task, where we use the ancestors as features, rather than just the “leafs”). What would be the fastest way of constructing such a list for all concepts in the graph? Maybe just flush out all the r

Re: Optimising path to root concept SPARQL query

2016-02-01 Thread Andy Seaborne
On 01/02/16 13:05, Joël Kuiper wrote: Concretely I’m using this to get the path to root for a specific concept, e.g. PREFIX rdfs: SELECT DISTINCT ?parent WHERE { GRAPH ?g { rdfs:subClassOf+ ?parent . }} Would retur

Re: Optimising path to root concept SPARQL query

2016-02-01 Thread buehmann
Something like could work, if there are no cycles: select ?class where { rdfs:subClassOf* ?mid . ?mid rdfs:subClassOf* ?class . } group by ?class order by count(?mid) On 01.02.2016 16:29, Andy Seaborne wrote: On 01/02/16 13:05, Joël Kuiper wrote: Concretely I’m

Re: How to remove consistently a triple pattern given a SPARQL query?

2016-02-01 Thread Carlo . Allocca
Dear Andy, Lorenz and All, Thank you very much for your help and support. I would like to share the first achievement based on your suggestions. I have implemented 1) public Element transform(ElementPathBlock eltPB) 2) public Element transform(ElementGroup arg0, List arg1) running it over

Re: How to remove consistently a triple pattern given a SPARQL query?

2016-02-01 Thread Martynas Jusevičius
This thread got me thinking -- couldn't we have reusable, dereferenceable SPARQL optimizations/rewrites as SPARQL CONSTRUCTs over SPIN RDF? Which would be mappings between the original syntax tree and the optimized syntax tree. On Mon, Feb 1, 2016 at 8:55 PM, Carlo.Allocca wrote: > Dear Andy, Lor

Re: How to remove consistently a triple pattern given a SPARQL query?

2016-02-01 Thread Carlo . Allocca
Just to report that the previous code is not correct. I tried on String qString6 = "prefix rdfs: " + "prefix ex: " + "prefix rdf: "

Re: How to remove consistently a triple pattern given a SPARQL query?

2016-02-01 Thread Carlo . Allocca
Hi Martynas, Thank you for your input. I don’t know much about SPIN RDF. Just to clarify: my task is not to optimise an original query. I am working on it using Jena. As soon as I complete the entire algorithm I will publish somewhere and share with all of you (as I am sure it can be optimi