JSON-LD questions

2017-01-09 Thread Grahame Grieve
hi I'm trying to use jena with some json-ld content. There's a couple of things that aren't clear to me, when I'm working with the set of triples that come from reading the json-ld - how do I know which node is the root node in the json-ld? - how do I figure out what the original order of a json

Re: Jena TDB indexing and stats building

2017-01-09 Thread Andy Seaborne
On 09/01/17 19:40, A. Soroka wrote: The layout of the statistics file is documented here: https://jena.apache.org/documentation/tdb/optimizer.html#statistics-rule-file tdbloader and tdbloader2 are the CLI utilities for building TDB databases, but they are written in Java and can be used in

Re: Literal Required Exception in SPARQL

2017-01-09 Thread Andy Seaborne
On 09/01/17 20:17, javed khan wrote: This is my query and code. Same error. I have to find just one tripe: Subject highscore by a student Like subject English highscore is 60 by Smith. When I run query inside Protege, it gives me the result Smith 60 and it is fine. This result (Smith

Property stored in Annotaion Section

2017-01-09 Thread neha gupta
Hi I have a rule like this If a team Goal>30 in a League (PremLeague, ChampLeague etc) then it is the team FavioriteLeague. FavioriteLeague is a data property to which teams will be assigned through rules. But the problem here in my case is when I run the program, the FavioriteLeague property is

Re: Literal Required Exception in SPARQL

2017-01-09 Thread javed khan
This is my query and code. I have to find just one tripe: Subject highscore by a student Like subject English highscore is 60 by Smith. When I run query inside Protege, it gives me the result Smith 60 and it is fine. This result (Smith 60), I cant get inside Jena code and get exception. Code

Re: Jena TDB indexing and stats building

2017-01-09 Thread A. Soroka
The layout of the statistics file is documented here: https://jena.apache.org/documentation/tdb/optimizer.html#statistics-rule-file tdbloader and tdbloader2 are the CLI utilities for building TDB databases, but they are written in Java and can be used in Java.

Jena TDB indexing and stats building

2017-01-09 Thread Ganesh Selvaraj
Hi All, I am using Jena TDB for my work. So far I could not find much documentation on data indexing and statistics building for Jena TDB. I would prefer doing it via a Java API. Any help/documentation is appreciated. Thanks Ganesh

Re: Literal Required Exception in SPARQL

2017-01-09 Thread Andy Seaborne
Once again you do not provide a complete, minimal example. And this is different code to what you showed earlier. std:Englishscore std:Englishsscore <-- if this is wrong there is no match and next() is NoSuchElementException Andy On 09/01/17 17:51, javed khan wrote: I am sorry

Re: Literal Required Exception in SPARQL

2017-01-09 Thread javed khan
I am sorry Andy I did not understand what you mentioned. The problem still there, though I have made several changes: and the problem points here Literal r= results2.next().get("highScore").asLiteral(); or RDFNode r2= results2.next().get("student").asResource(); The error message is

Re: Literal Required Exception in SPARQL

2017-01-09 Thread Andy Seaborne
That is not the error in the query I pointed out. It makes a difference in the query. On 09/01/17 15:45, javed khan wrote: I used std:Englishscore in my query and is also in my ontology. If I wrote somewhere EnglishScore, it will be a typo error. On Mon, Jan 9, 2017 at 6:41 PM, Andy

Re: Literal Required Exception in SPARQL

2017-01-09 Thread Andy Seaborne
On 09/01/17 15:05, javed khan wrote: Hello Lorenz, I think the problem is in the query itself inside Jena code(probably the syntax of the query). Because a very simple query like *?student std:EnglishScore ?score* works. The querystring is: prefix

Re: Literal Required Exception in SPARQL

2017-01-09 Thread javed khan
Hello Lorenz, I think the problem is in the query itself inside Jena code(probably the syntax of the query). Because a very simple query like *?student std:EnglishScore ?score* works. The querystring is: prefix std:PREFIX rdfs:<

Re: Literal Required Exception in SPARQL

2017-01-09 Thread Lorenz Buehmann
Inline images are not allowed here, thus we can't see anything. And a screenshot of Protege is not really helpful. Prefixes might be wrong. We neither know the final query, nor your code. Please show a sample of the data in best case in Turtle format. And the final query - please not again as

Re: Literal Required Exception in SPARQL

2017-01-09 Thread javed khan
[image: Inline image 1] It shows the result in Protege: Mac is student name and 6 is highscore of English category scored by him. On Mon, Jan 9, 2017 at 4:34 PM, Andy Seaborne wrote: > Maybe there are no results. > > This is not a complete, minimal example. Unseen details

Re: Literal Required Exception in SPARQL

2017-01-09 Thread Andy Seaborne
Maybe there are no results. This is not a complete, minimal example. Unseen details probably matter. Andy On 09/01/17 13:28, javed khan wrote: Hello Lorenz, yes I need student and highscore. I just tried this , no exception but it does not display the message in

Re: Literal Required Exception in SPARQL

2017-01-09 Thread javed khan
Hello Lorenz, yes I need student and highscore. I just tried this , no exception but it does not display the message in JOptionPane.showMessageDialog() Query query2 = QueryFactory.create(queryString2); QueryExecution qexec = QueryExecutionFactory.create(query2, model) ; ResultSet results2 =

Re: Literal Required Exception in SPARQL

2017-01-09 Thread Lorenz Buehmann
@ As per the previous discussion, I guess he also wants to have the student - and of course the highest score, As Chris said, you have to distinguish between literals and URIs/blank nodes. Which finally leads me to the suggestion to read an RDF tutorial + SPARQL tutorial first. Most questions

Re: A few initial questions

2017-01-09 Thread Dave Reynolds
Hi, On 08/01/17 23:25, Ling wrote: Hi, very happy to join the Jena community. To start with, I have a few basic questions: 1) Is Jena still active in development, and with a good user community? Yes. 2) Anyone know of any commercial use of it? Yes, lots. If you look back through the mail

Re: Literal Required Exception in SPARQL

2017-01-09 Thread Chris Dollin
On 08/01/17 18:32, javed khan wrote: This query gives me exception: Exception in thread "AWT-EventQueue-0" com.hp.hpl.jena.rdf.model.LiteralRequiredException: http://www.semanticweb.org/t/ontologies#Smith "SELECT * " + " WHERE {" + " {"+ "select (max(?score) as

Re: Spatial Jena

2017-01-09 Thread Osma Suominen
Hi Samur, Can you report this to JIRA with a reproducible full description? I.e. link to the data set you used, your jena-spatial index configuration, Jena/Fuseki versions you used, and of course the query and results. -Osma 09.01.2017, 10:16, Samur Araujo kirjoitti: I test them all and

Re: Spatial Jena

2017-01-09 Thread Samur Araujo
I test them all and all have the same issue. I think there are some merging happening after accessing the index that make it slow. I did not look into the code to see where is the issue. Best, On 9 January 2017 at 09:12, Osma Suominen wrote: > Hi Samur, > > I

Re: Spatial Jena

2017-01-09 Thread Osma Suominen
Hi Samur, I agree, that's really slow. I wonder if that's some kind of regression. jena-spatial hasn't been actively worked on for a while. Can you test with some or all of these: - current (3.1.1) and perhaps a few previous Jena releases - current master - jmvanel's fork which uses Lucene

Re: Spatial Jena

2017-01-09 Thread Samur Araujo
Hi Osma, as you can see below, it makes no difference: [2017-01-09 09:07:12] Fuseki INFO [4] POST /spatial :: 'query' :: [application/x-www-form-urlencoded charset=utf-8] ? [2017-01-09 09:07:12] Fuseki INFO [4] Query = PREFIX spatial: < http://jena.apache.org/spatial#> PREFIX rdfs: <