Re: Concatenating language and locale in SPARQL 1.1

2016-01-28 Thread Andy Seaborne
On 27/01/16 20:35, Bardo Nelgen wrote: Hi all, most likely I am missing something here, but maybe I am simply doing it the wrong way: I need to match a language-locale value where both language and locale come from different branches in the data model. So what I came up with in my FILTER clau

Re: Changing TDB File Mode on an existing index, in 2.7.11?

2016-01-28 Thread Andy Seaborne
On 27/01/16 21:45, Matthew Holt wrote: Hi, Wanted to check if anyone can confirm if you can successfully change the TDB File Mode in 2.7.11 2.7.1? from direct to mapped (assuming a restart takes place) , or vice-versa, without any issues? You can do that. (though upgrading would be a good

Re: Concatenating language and locale in SPARQL 1.1

2016-01-28 Thread Bardo Nelgen
Hi Andy, thanks for the immediate reply. We actually use "en-gb" for UK English in our model – but anyway… My test-Scenario looks like ?lang = "de" ?locale = "de" which in langMatches(lang("wort"@de-de),(concat(str(?lang),"-",str(?locale))) ) unfortunately does not evaluate as true, althou

Re: Concatenating language and locale in SPARQL 1.1

2016-01-28 Thread Bardo Nelgen
The result I get from the langMatches(lang("wort"@de-de),(concat("de","-","de")) ) - approach in JSON. (attached) On 28.01.16 11.32 Uhr, Bardo Nelgen wrote: Hi Andy, thanks for the immediate reply. We actually use "en-gb" for UK English in our model – but anyway… My test-Scenario looks l

Fuseki 2: Security issue “Information Exposure”

2016-01-28 Thread Massimiliano Ricci
Dear All, for a customer we'd like to use Fuseki 2.3.1. on Linux RedHat as a standalone server. Unfortunatelly we've encountered an anomaly of "Information Exposure" (CWE-200 - http://cwe.mitre.org/data/definitions/200.html), in particular the Fuseki and JETTY versions are showed. For example, if

Re: Concatenating language and locale in SPARQL 1.1

2016-01-28 Thread Rob Vesse
I wonder if the problem is to do with the datatype of the string resulting from concat()? Can you try doing a BIND(concat(str(?lang),"-",str(?locale)) AS ?langMatch) in your query and selecting that variable out to see what value you get, in particular I'm wondering if you are getting a typed lite

Re: Concatenating language and locale in SPARQL 1.1

2016-01-28 Thread Andy Seaborne
Works for me: (jena 3.0.1) langMatches(lang("wort"@de-de),(concat(str("de"),"-",str("de"))) ) so it looks like ?lang or ?locale. Try adding ?lang and ?locale Just the results don't provide a complete minimal example though I note they do not have ?Headline If you have some short, sample da

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

2016-01-28 Thread Carlo . Allocca
Dear All, I am using Jena for my project and I would like to submit the following question: How to remove consistently a triple pattern given a SPARQL query? EXAMPLE: For example, considering the query “qString1” and the tp=“?boss ex:isBossOf ?ind .” I need to remove tp from qString1, obtainin

Re: Concatenating language and locale in SPARQL 1.1

2016-01-28 Thread Bardo Nelgen
Hi Rob, thanks for the hint – seems you hit something here: The binding you described works properly as BIND(concat(str(?lang),"-",str(?locale)) AS ?langMatch) . indeed returns "de-de" for the ?langMatch variable. However simple string-making via langMatches((lang(?mailHeaderSubject))

Re: Concatenating language and locale in SPARQL 1.1

2016-01-28 Thread Joshua TAYLOR
This just happened to catch my eye, and while I don't have a solution, it does look like there could be something going on with datatypes. If nothing else, here's some short code that might help in testing. Using just ?locale: prefix xsd: prefix rdf:

Re: Concatenating language and locale in SPARQL 1.1

2016-01-28 Thread Joshua TAYLOR
Here's a more complete case that tries all the combinations of rdf:plainLiteral and xsd:string. Note that str(concat(...)) works as well as concat(str(...),...). Bardo, what happens if you use str("-") instead of "-"? prefix xsd: prefix rdf:

Re: Concatenating language and locale in SPARQL 1.1

2016-01-28 Thread Andy Seaborne
In Brando's code, everything is str()'ed. Only unbound will defeat that. (It is on a Mac though and "-" may not be "-" somewhere :-) Substituting from the srj file: arq.qexpr 'langMatches((lang("Unsere Lieblings-Testmail"@de-de)) , (str(concat(str("de"),"-",str("de") ' ==> true. (

Re: Changing TDB File Mode on an existing index, in 2.7.11?

2016-01-28 Thread Matthew Holt
Hi Andy, Thanks for the reply. Responding in-line below... On Thu, Jan 28, 2016 at 4:26 AM, Andy Seaborne wrote: > On 27/01/16 21:45, Matthew Holt wrote: > >> Hi, >> Wanted to check if anyone can confirm if you can successfully change the >> TDB File Mode in 2.7.11 >> > > 2.7.1? That's correct

Re: Concatenating language and locale in SPARQL 1.1

2016-01-28 Thread Andy Seaborne
On 28/01/16 15:04, Joshua TAYLOR wrote: Here's a more complete case that tries all the combinations of rdf:plainLiteral and xsd:string. Note that str(concat(...)) works as well as concat(str(...),...). Bardo, what happens if you use str("-") instead of "-"? Joshua - Nice way to test all the

Re: Changing TDB File Mode on an existing index, in 2.7.11?

2016-01-28 Thread Andy Seaborne
On 28/01/16 16:52, Matthew Holt wrote: Hi Andy, Thanks for the reply. Responding in-line below... On Thu, Jan 28, 2016 at 4:26 AM, Andy Seaborne wrote: On 27/01/16 21:45, Matthew Holt wrote: Hi, Wanted to check if anyone can confirm if you can successfully change the TDB File Mode in 2.7.11

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

2016-01-28 Thread Andy Seaborne
The approach I would take is to do this is multiple passes: 1/ remove from ElementPathBlock 2/ Look for elements that are now "empty" e.g ElementFilter with empty but also as there one arm of a UNION. (2) is only one pass as the rewrite is done bottom up. I would do this as a transformation r

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

2016-01-28 Thread Carlo . Allocca
Dear Andy, Thank you very much for your promtly reply. I need a little bit of exploring and thinking to apply what you suggested. Indeed, I will look at each single info you pointed out. I will keep this thread updated. Many Thanks, Best Regards, Carlo > On 28 Jan 2016, at 18:29, Andy Se

Re: Concatenating language and locale in SPARQL 1.1

2016-01-28 Thread Bardo Nelgen
Hehe, may I offer you a REAL "-", Sir ? We got them fresh today from ANSI… ;-) Just double-checked the character: Nope, that wasn't it. On 28.01.16 17.40 Uhr, Andy Seaborne wrote: In Brando's code, everything is str()'ed. Only unbound will defeat that. (It is on a Mac though and "-" may

Re: Changing TDB File Mode on an existing index, in 2.7.11?

2016-01-28 Thread Matthew Holt
On Thu, Jan 28, 2016 at 1:10 PM, Andy Seaborne wrote: > On 28/01/16 16:52, Matthew Holt wrote: > >> Hi Andy, >> Thanks for the reply. Responding in-line below... >> >> On Thu, Jan 28, 2016 at 4:26 AM, Andy Seaborne wrote: >> >> On 27/01/16 21:45, Matthew Holt wrote: >>> >>> Hi, Wanted to ch

Re: Fuseki 2: Security issue “Information Exposure”

2016-01-28 Thread Andy Seaborne
If you want to lock down a java-based webapp server, jetty, tomcat, fuseki whatever, then another starting point is to put it behind a reverse proxy (httpd, nginx etc), slave the java server to only receive request from localhost i.e. the reverse proxy. httpd, nginx have a much greater range o

Re: Concatenating language and locale in SPARQL 1.1

2016-01-28 Thread Bardo Nelgen
Alright: For further testing I prepared us a Fuseki on one of our test servers (as extracting a meaningful part of the datamodel may end up quite cumbersome…). This is a TEST environment filled only with sample data. The model resets itself completely from time to time, so don't be afraid to

Re: Concatenating language and locale in SPARQL 1.1

2016-01-28 Thread Bardo Nelgen
Damn, you’re right – I missed the 2 brackets in the middle of the query !!! Shame on me. Thanks a lot, James !! And the rest of you as well, of course – might never have learned that much about string datatypes in SPARQL 1.1 otherwise… ;-) My very best, Bardo P.S. As it‘s solved now: Will

Re: Concatenating language and locale in SPARQL 1.1 – SOLVED

2016-01-28 Thread Bardo Nelgen
Though, seems, the solution was held for moderation… ;-) On 28.01.16 22.41 Uhr, Bardo Nelgen wrote: Alright: For further testing I prepared us a Fuseki on one of our test servers (as extracting a meaningful part of the datamodel may end up quite cumbersome…). This is a TEST environment fil

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

2016-01-28 Thread Martynas Jusevičius
You could do it using SPIN API as well: http://spinrdf.org/sp.html On Thu, Jan 28, 2016 at 7:39 PM, Carlo.Allocca wrote: > Dear Andy, > > Thank you very much for your promtly reply. > > I need a little bit of exploring and thinking to apply what you suggested. > Indeed, I will look at each single

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

2016-01-28 Thread Carlo . Allocca
Dear Martynas, Thank you very much for your help. At the moment, I am trying what Andy suggested. I hope to make it. Otherwise, I will look at SPIN API. Many Thanks, Best Regards, Carlo > On 28 Jan 2016, at 23:48, Martynas Jusevičius wrote: > > You could do it using SPIN API as well: http