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
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
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
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
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
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
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
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
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
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
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
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
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,
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
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
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
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
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
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.
>>
>>
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
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
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…
>> 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
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
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());
}
}
>
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
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
//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
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
>>>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
45 matches
Mail list logo