Re: Git friendly RDF output?

2023-01-25 Thread François-Paul Servant
Elie, thanks, good to know. It looks like what I’d need. I’ll have a look at it Best Regards, fps > Le 25 janv. 2023 à 18:49, Élie Roux a écrit : > > Dear François-Paul, > > I have developed the following library for that purpose and I'm using > it in production: > > https://github.com/buda-ba

Git friendly RDF output?

2023-01-25 Thread François-Paul Servant
Dear Jena list, long time no see. I used jena during a long time, but I must confess that I didn’t keep up to date during the last years. Here is my question: is it possible with jena to write a model to a file, in a way that works nicely with git? By that, I mean the following: say I have a RDF

Re: Jena : 20 years of code.

2020-08-28 Thread François-Paul Servant
Dear Andy, dear Jena team, thank you for your long dedication to jena. 20 years! About one year later, I asked my first question on the list, about the serialization of those memory models mentioned by Brian McBride. Jena has allowed me to build the thing I have been interested with, http://www

Re: Writing Embedding JSON-LD from Jena

2018-08-27 Thread François-Paul Servant
Hi, quite some time I have not been using json-ld + jena (I wasn’t even aware of the “@embed”). Anyway, here are some observations. Hope they can help. (I may be wrong, but it seems that “@embed” is related to framings, so I only tried to use frames.) Using an example model: private Model exa

Re: Attaching JSON-LD to web page for Google SEO

2018-08-17 Thread François-Paul Servant
uot;http://schema.org/Organization";, > "name" : "Lingsoft, Inc.", > "@context" : { > "name" : { > "@id" : "http://schema.org/name"; > } > } > } > > I wonder if there is an automatic way to ma

Re: Attaching JSON-LD to web page for Google SEO

2018-08-17 Thread François-Paul Servant
Hi, it looks like schema.org defines the value of the “name” property to be of type “Text”, and “Text” seems to only allow a simple string as content. As you may have noticed, if you replace > "name" : { > "@language" : "en", > "@value" : "Lingsoft, Inc." > }, by “name” : "Lingsoft

Re: RDF to HTML

2017-05-11 Thread François-Paul Servant
Hi, neither a completely out of the box nor a perfect solution, but you can export your RDF to JSON-LD, and use firefox jsonview plugin to look at the result. One problem is that you cannot use the default compact JSON-LD format, in order to have long URIs in the JSON-LD (this, if you want to b

Re: JSON-LD questions

2017-01-10 Thread François-Paul Servant
Hi, don’t expect to have in rdf a representation of the json tree > - how do I know which node is the root node in the json-ld? what you get is a (RDF) graph, and in the general case, several resources are described (cf. for instance the “@graph” in the jsonld). If you’re in the case where you

Re: Overriding @context when loading JSON-LD

2017-01-08 Thread François-Paul Servant
oops, there’s a typo in the code that I sent. Here is it again: import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.StringReader; import java.util.Map; import org.apache.jena.rdf.model.Model; import org.apache.jena.rdf.model.ModelFactory; import org.jun

Re: Overriding @context when loading JSON-LD

2017-01-08 Thread François-Paul Servant
Hi, here is a Test class using jsonld-java that should do what you want (override the @context). It reads the jsonld file (that includes an @context defined as a URI) and the file defining the @context from files on my disk. Just replace with your own files. import java.io.File; import java.io

Re: Transaction in Fuseki over HTTP

2016-11-22 Thread François-Paul Servant
Hi Andy, not sure to understand your answer: > Le 17 nov. 2016 à 12:22, Andy Seaborne a écrit : > > Each operation is executed in a transaction but there is no HTTP operations > to start and end a transaction of several HTTP requests. > > You can combine multiple SPARQL Update operations into

Re: Trying to use in a query

2016-07-09 Thread François-Paul Servant
s consistently. > > It works for TDB and for TxnMem (also known as TIM) - in the latter case the > warning from the OpExecutor comes out but it's wrong. > > Andy > > On 05/07/16 17:15, François-Paul Servant wrote: >> Hi, >> >> I'm tryin

Trying to use in a query

2016-07-05 Thread François-Paul Servant
Hi, I'm trying to query the named graphs of a TDB dataset using , but I must be missing something. Is there something special to do in order to use as a graph name in a query? Here is what I'm trying (this test uses a memory dataset: only works with 3.1.1-SNAPSHOT. Normally, I use TDB) TIA,

Re: small problem in the way jena generates the context for jsonld-java

2016-04-14 Thread François-Paul Servant
me cases, and this is not possible right now. fps 2016-04-14 12:56 GMT+02:00 Andy Seaborne : > On 14/04/16 10:55, François-Paul Servant wrote: > >> Andy, >> >> jsonld-java should probably deal with it although Jena can. >>> >> >> I'm not sure json

Re: small problem in the way jena generates the context for jsonld-java

2016-04-14 Thread François-Paul Servant
4-14 10:27 GMT+02:00 Andy Seaborne : > jsonld-java should probably deal with it although Jena can. > > What about xsd:string? > > Should that be skipped as well? > > Andy > > > On 13/04/16 23:44, François-Paul Servant wrote: > >> However, this change would impa

Re: small problem in the way jena generates the context for jsonld-java

2016-04-13 Thread François-Paul Servant
However, this change would impact the output of existing applications, and could break clients relying on the keys as they are produced today. So I don’t know what Jena team will want to do. fps > Le 14 avr. 2016 à 00:30, François-Paul Servant > a écrit : > > Hi, > > I h

small problem in the way jena generates the context for jsonld-java

2016-04-13 Thread François-Paul Servant
Hi, I had opened an issue on jsonld-java: https://github.com/jsonld-java/jsonld-java/issues/170 but I closed it, because it turns out that the problem is within jena (see comments about the issue for an explanation), class JsonLDWriter, around line 150: } else if ( o.isLiteral

Re: Controlling JSON-LD output

2016-04-12 Thread François-Paul Servant
to output compact output > > > > On 12/04/2016 09:36, "François-Paul Servant" > wrote: > >> Hi, >> >>> There isn't a way to style the output in Jena. It would nice to have >>> something that is general, robust and pretty. (anyone

Re: Controlling JSON-LD output

2016-04-12 Thread François-Paul Servant
crit : > > On 10/04/16 15:43, François-Paul Servant wrote: >> Hi, >> >> beside setting the NSPrefixes, are there ways to control the JSON-LD output >> from Jena? For instance, to choose the format (compact, expanded,…), or to >> set the context. >> >>

Controlling JSON-LD output

2016-04-10 Thread François-Paul Servant
Hi, beside setting the NSPrefixes, are there ways to control the JSON-LD output from Jena? For instance, to choose the format (compact, expanded,…), or to set the context. If not, any pointer into the code to get me started quickly? I’ve read this old thread on this subject: http://users.jena

Re: ResultSet and pagination

2015-11-23 Thread François-Paul Servant
the 1000 solutions. And practical evidences - time measurements - that things are much faster when I don’t read the 1000-n solutions) fps > Le 23 nov. 2015 à 09:55, james anderson a écrit : > > good morning; > >> On 2015-11-23, at 09:31, François-Paul Servant >> w

Re: JSON-LD serialization: performances?

2015-11-23 Thread François-Paul Servant
Hi Andy, again, you make very interesting remarks. > Le 23 nov. 2015 à 11:00, Andy Seaborne a écrit : > > On 22/11/15 14:17, François-Paul Servant wrote: >> Andy, >> >> I improved my test (running on the same file): several runs, RDFFormats >> variations…

Re: ResultSet and pagination

2015-11-23 Thread François-Paul Servant
>> Le 21 nov. 2015 à 17:56, Andy Seaborne a écrit : >> >> Hi, >> >> In the current implementation, then results will be in the same order. Well, >> as far as I know. I can't think of anything that will disturb it. I think >> you realise the responsibility is yours; it is not guaranteed for a

Re: ResultSet and pagination

2015-11-22 Thread François-Paul Servant
T N" is optimized to avoid a n log n sort. It is > still a traversal of the result set and isn't streaming. > > Andy > > On 21/11/15 00:52, François-Paul Servant wrote: >> Hi, >> >> I’m using TDB. No update. >> >> and so

Re: JSON-LD serialization: performances?

2015-11-22 Thread François-Paul Servant
uot;); in.close(); return m; } private File getTestFile() { return getFile("/testperfs/docs.jsonld"); } private File getFile(String name) { URL resourceUrl = getClass().getResource(name); return new File(resourceUrl.getFile()); } } >

JSON-LD serialization: performances?

2015-11-20 Thread François-Paul Servant
Hi, it seems to me that JSON-LD serialization is slow. Do you have the same feeling? Here are the results of a comparative test that I run on my machine (outputing one model to a file, using Jena 3.0.1-SNAPSHOT) model.size() 7559 JSON-LD TIME: 649 ms TURTLE TIME: 136 ms RDF/XML TIME: 548 ms N-TR

ResultSet and pagination

2015-11-20 Thread François-Paul Servant
Hi, I’m using TDB. No update. and something like: ResultSet getResultSet(String queryString) { Query query = QueryFactory.create(queryString) ; QueryExecution qexec = QueryExecutionFactory.create(query, model)) return qexec.execSelect() ; } Is there a way to be guaranteed

Andy, you got it! Re: Fuseki: strange (and disappointing) performance when compared to a simple servlet that calls ARQ

2015-09-07 Thread François-Paul Servant
//127.0.0.1:8080/fuseki/ds/> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> DESCRIBE ?tag WHERE { ?tag a <http://www.semanlink.net/2001/00/semanlink-schema#Tag>. } LIMIT 1000 MODEL SIZE: 4746 SIMPLE FIRST CALL: 0.082 FUSEKI FIRST CALL: 0.156 SIMPLE MEAN: 0.0801 FUSEKI MEA

Re: Fuseki: strange (and disappointing) performance when compared to a simple servlet that calls ARQ

2015-09-07 Thread François-Paul Servant
Andy, > Le 5 sept. 2015 à 18:18, Andy Seaborne a écrit : > > On 05/09/15 16:19, François-Paul Servant wrote: >>> Le 4 sept. 2015 à 10:21, Rob Vesse a écrit : >>> >>> You haven't shown your code so I can only guess at what may/may not be >>>

Re: Concurrency in a sparql servlet

2015-09-07 Thread François-Paul Servant
Andy, thank you very much, it’s ver kind of you. Things are a lot clearer now fps > Le 5 sept. 2015 à 18:21, Andy Seaborne a écrit : > > On 05/09/15 16:20, François-Paul Servant wrote: >> trying to understand how to write a sparql servlet that handles read-write >> oper

Concurrency in a sparql servlet

2015-09-05 Thread François-Paul Servant
trying to understand how to write a sparql servlet that handles read-write operations… I read - https://jena.apache.org/documentation/notes/concurrency-howto.html - http://jena.apache.org/documentation/tdb/tdb_transactions.html (though not working specifically with TDB) - and http://stackoverflo

Re: Fuseki: strange (and disappointing) performance when compared to a simple servlet that calls ARQ

2015-09-05 Thread François-Paul Servant
t; If your servlet is only calling execSelect() for those queries then it is > only timing the first pass of the WHERE clause (and possibly subject to > timing only the first result as noted above) rather than timing the full > query evaluation which Fuseki will be doing. > > R

Re: Fuseki: strange (and disappointing) performance when compared to a simple servlet that calls ARQ

2015-09-05 Thread François-Paul Servant
Hi, still wondering why I see such differences in performances, I asked myself whether this is not related to the fact that my servlet doesn’t take care of concurrency: all my test queries are read-only, but real code should take care of it (and actually, this is one of the reasons why I was lo

Re: Fuseki: strange (and disappointing) performance when compared to a simple servlet that calls ARQ

2015-09-04 Thread François-Paul Servant
Hi Andy, > Le 4 sept. 2015 à 10:57, Andy Seaborne a écrit : > (snip) > A good test to add is the null test to get the basic overheads. For short > queries, more cost goes in HTTP than in the query execution and result > processing. DESCRIBE{} and SELECT{}. the first “test” I made was simp

Re: Fuseki: strange (and disappointing) performance when compared to a simple servlet that calls ARQ

2015-09-04 Thread François-Paul Servant
lative to the actual query execution and Fuseki is > always going to do this. > > Finally most of the queries exhibiting large differences are DESCRIBE > queries which are two pass evaluation, firstly the WHERE clause is > evaluated (via execSelect() internally) and then the descript

Fuseki: strange (and disappointing) performance when compared to a simple servlet that calls ARQ

2015-09-03 Thread François-Paul Servant
Hi, shouldn’t we have the same level of performance with Fuseki and with a simple servlet that calls ARQ? I hadn’t try fuseki until now. Yesterday, I downloaded the 2.3.0 release, started the server in a terminal window of my mac (osx 10.10.5) with: ./fuseki-server --mem /ds I uploaded a rdf fi

Re: How to change a lot of URIs in a TDB triple store

2015-05-16 Thread François-Paul Servant
Thank you Dave I was expecting something like that. I'll do it with the brute force method then. Best Regards, fps > Le 16 mai 2015 à 16:35, Dave Reynolds a écrit : > > On 16/05/15 15:02, François-Paul Servant wrote: >> Hi, >> >> is there an easy and/or

How to change a lot of URIs in a TDB triple store

2015-05-16 Thread François-Paul Servant
Hi, is there an easy and/or fast way to change all the URIs beginning with, say, http://www.ex.com/foo/ to http://www.example.net/bar/ in a TDB triple store? Thanks, fps

Re: JSON-LD output

2015-05-05 Thread François-Paul Servant
Andy, I submitted issues on https://github.com/jsonld-java/jsonld-java/ Regarding test1, I’ve been able to find in the code where the problem occurs, but I don’t know if it can be easily changed. Thanks, fps

JSON-LD output

2015-05-05 Thread François-Paul Servant
Hi, I find this very cool: when outputing to JSON-LD, setNSPrefix can be used to benefit from JSON-LD's unorthodox but very nice use of “namespaces”. I have some minor related remarks, summarized in the following tests. test1() is the most annoying one, in my point of view. (Tested with latest

JSON-LD, problem with numbers on a non-US system

2014-12-16 Thread François-Paul Servant
Hi, there is a problem when reading JSON-LD containing numbers on a non-US system. See a test program below. I found that this is caused by a bug in com.github.jsonldjava.core.RDFDataset and I submitted an issue: https://github.com/jsonld-java/jsonld-java/issues/131 Best, fps import java.io.By

Re: model.listStatements(s,p,null,lang)

2012-12-07 Thread François-Paul Servant
Le 4 déc. 2012 à 12:20, Andy Seaborne a écrit : > On 04/12/12 07:18, François-Paul Servant wrote: >> Andy, >> >>> Could you raise a JIRA for this? And if you have a patch, submit that as >>> well? There's another problem, with model.listSt

Re: model.listStatements(s,p,null,lang)

2012-12-03 Thread François-Paul Servant
Andy, > Could you raise a JIRA for this? And if you have a patch, submit that as > well? I'll do - but I have no time before Friday. Best, fps Le 3 déc. 2012 à 22:58, Andy Seaborne a écrit : > On 28/11/12 23:23, François-Paul Servant wrote: >> import org.j

model.listStatements(s,p,null,lang)

2012-11-28 Thread François-Paul Servant
Hi, lisStatements(Resource, Property, String, String) doesn't take the forth arg into account when the third one is null (in other words: it can't be used to select statements with a given subject, property and literal's language) import org.junit.Test; import com.hp.hpl.jena.rdf.model.*; publ

Exception when creating/closing/creating a dataset (jena 2.7.4, was OK with TDB-0.8.10)

2012-11-24 Thread François-Paul Servant
Dear Jena users, here is a test case that worked with TDB-0.8.10 but throws an exception with jena 2.7.4. In short, you cannot anymore create a TDB dataset from a dir, close it, and then create it again. package ex; import java.io.File; import org.junit.Before; import org.junit.Test; import com