You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Joël Kuiper <me...@joelkuiper.eu> on 2015/08/26 13:45:21 UTC

Word on CommonsRDF

Hey all,

I just got wind of CommonsRDF https://commonsrdf.incubator.apache.org/, and it looks great!
It’d be exciting to use this for some of the libraries I’m working on.
Unfortunately I couldn’t find any reference to it in Jena (except for a note on CommonsRDF that it might come to Jena 3.0)

Can somebody fill me in on the progress of this project?

Thanks in advance!


---
Joël Kuiper
www.joelkuiper.eu


Re: Word on CommonsRDF

Posted by Andy Seaborne <an...@apache.org>.
Hi Joël,

Personally, adding SPARQL result set is probably the next important this 
to add to CommonsRDF; that would help you.

But there another issue to be addressed which is handling existing data 
which also means reusing components like parsers, writers and result set 
readers.

The current CommonsRDF interface abstract making data but don't address 
the use of existing objects. The original belief was that the interfaces 
could be just added to existing tool kits and it "just works".  Turns 
out it isn't as simple as that and it does nto address the parser 
interface issues.

A/ Jena works as generalized RDF (triples can have literals as subject 
etc etc)

so you can't add the interfaces to Node and preserver the type 
hierarchy.  Maybe to Resource/Literal but then ...

B/ There would be multiple names for the same operation which is confusing.

All that will happen is people asking what's the difference between 
Resource.getURI() and IRI.getIRIString().  And what about these two IRI 
classes in the classpath that are radically different.

I can see CommonsRDF as another API to Jena machinery to set alongside 
Model/Statement/Resource.  Theer is no reason why there can't be 
multiple, different APIs over the core code.

	Andy

On 27/08/15 17:56, Joël Kuiper wrote:
> Hey Andy,
>
> So I’m working on a SPARQL library for Clojure (YeSPARQL,
> https://github.com/joelkuiper/yesparql) and I’m at the point where I
> want to convert Jena native Node, RDFNode, Literal, Triple… objects to
> formats more convenient to work with in Clojure itself (maps, records).
>
> Now it would be nice if I can use some common format, abstracting
> away
> from that implementation detail and potentially opening up the door for
> inter-op with other RDF libraries.
>
> Now it could very well be that this is a case of “we’ll solve it
> with
> one more layer of abstraction” ad infinitum, but at first glance it
> seems like it might be a nice fit for writing inter-op with other
> non-Java JVM libraries.
>
> Joël
>
>
>> On 26 Aug 2015, at 17:18, Andy Seaborne <an...@apache.org> wrote:
>>
>> My first pass at this is:
>> https://github.com/afs/commonsrdf-jena
>>
>> All packaging and class names temporary.
>>
>> What might be more useful is:
>>
>> https://github.com/afs/commonsrdf-jena/blob/master/src/main/java/org/apache/jena/commons/Example1.java
>>
>> which shows Jena parsing to any commons-rdf Graph.
>> The ToGraph class is factory implementation neutral.
>>
>> Joël - I'm interested in how you would use CommonsRDF. What use cases do you have in mind?  And where does the data come from or is it created by your code?
>>
>> https://github.com/afs/commonsrdf-container
>> is a minimal implementation of CommonsRDF - even less than the "simple" one as a test of the designs.
>>
>> 	Andy
>>
>>> On Aug 26, 2015, at 7:45 AM, Joël Kuiper <me...@joelkuiper.eu> wrote:
>>>
>>>> Hey all,
>>>>
>>>> I just got wind of CommonsRDF https://commonsrdf.incubator.apache.org/, and it looks great!
>>>> It’d be exciting to use this for some of the libraries I’m working on.
>>>> Unfortunately I couldn’t find any reference to it in Jena (except for a note on CommonsRDF that it might come to Jena 3.0)
>>>>
>>>> Can somebody fill me in on the progress of this project?
>>>>
>>>> Thanks in advance!
>>>>
>>>>
>>>> ---
>>>> Joël Kuiper
>>>> www.joelkuiper.eu
>>>>
>>>
>>
>
>


Re: Word on CommonsRDF

Posted by Stian Soiland-Reyes <st...@apache.org>.
   I've been having a go at a Clojure binding for Commons RDF here:

https://github.com/stain/commons-rdf-clj

I was not quite sure which direction to take it, as I was not sure
what an RDF library should look like in Clojure, and still be
interoperable with the Commons RDF types.


https://github.com/stain/commons-rdf-clj/blob/master/src/commons_rdf_clj/core.clj
is a straight forward binding that would just make accessor functions,
and still pass around the Commons RDF objects.  So you couldn't do any
other Clojure-things on them directly, and there would be lots of such
functions (that code is incomplete).


I then made https://github.com/stain/commons-rdf-clj/blob/master/src/commons_rdf_clj/graph.clj
as a rough draft of what Commons RDF done natively in Clojure would
feel like - e.g. (:subject triple) and just keeping triples in a list,
where you can use (filter) etc.


https://github.com/stain/commons-rdf-clj/blob/master/src/commons_rdf_clj/types.clj
is an attempt to make a couple of protocols for RDF stuff, which can
be used with Commons RDF and also native Clojure types like lists and
dicts.  -- this has the disadvantage that you can't so easily move
between the implementations, however in the RDFTermFactory extension
you see it supports both Commons RDF parameters and coerces the
regular Clojure types following the protocol.

A bigger job here would be to extend the PGraph protocol beyond
(add-triple), and to provide implementation the other way, e.g. let
common Clojure structure directly appear as an Commons RDF
implementations.  Which way to go here depends a bit on how this would
be used..  I didn't do this as I thought it would be better to have
something like:

Jena -> Commons RDF -> commons-rdf-clj

so that commons-rdf-clj exposes Jena objects (via Commons RDF), but as
something that is usable in a more native Clojure way, and pluggable
to other backends.



On 27 August 2015 at 17:56, Joël Kuiper <me...@joelkuiper.eu> wrote:
> Hey Andy,
>
> So I’m working on a SPARQL library for Clojure (YeSPARQL, https://github.com/joelkuiper/yesparql) and I’m at the point where I want to convert Jena native Node, RDFNode, Literal, Triple… objects to formats more convenient to work with in Clojure itself (maps, records).
>
> Now it would be nice if I can use some common format, abstracting away from that implementation detail and potentially opening up the door for inter-op with other RDF libraries.
>
> Now it could very well be that this is a case of “we’ll solve it with one more layer of abstraction” ad infinitum, but at first glance it seems like it might be a nice fit for writing inter-op with other non-Java JVM libraries.
>
> Joël
>
>
>> On 26 Aug 2015, at 17:18, Andy Seaborne <an...@apache.org> wrote:
>>
>> My first pass at this is:
>> https://github.com/afs/commonsrdf-jena
>>
>> All packaging and class names temporary.
>>
>> What might be more useful is:
>>
>> https://github.com/afs/commonsrdf-jena/blob/master/src/main/java/org/apache/jena/commons/Example1.java
>>
>> which shows Jena parsing to any commons-rdf Graph.
>> The ToGraph class is factory implementation neutral.
>>
>> Joël - I'm interested in how you would use CommonsRDF. What use cases do you have in mind?  And where does the data come from or is it created by your code?
>>
>> https://github.com/afs/commonsrdf-container
>> is a minimal implementation of CommonsRDF - even less than the "simple" one as a test of the designs.
>>
>>       Andy
>>
>>> On Aug 26, 2015, at 7:45 AM, Joël Kuiper <me...@joelkuiper.eu> wrote:
>>>
>>>> Hey all,
>>>>
>>>> I just got wind of CommonsRDF https://commonsrdf.incubator.apache.org/, and it looks great!
>>>> It’d be exciting to use this for some of the libraries I’m working on.
>>>> Unfortunately I couldn’t find any reference to it in Jena (except for a note on CommonsRDF that it might come to Jena 3.0)
>>>>
>>>> Can somebody fill me in on the progress of this project?
>>>>
>>>> Thanks in advance!
>>>>
>>>>
>>>> ---
>>>> Joël Kuiper
>>>> www.joelkuiper.eu
>>>>
>>>
>>
>



-- 
Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons RDF (incubating)
http://orcid.org/0000-0001-9842-9718

Re: Word on CommonsRDF

Posted by Joël Kuiper <me...@joelkuiper.eu>.
Hey Andy, 

So I’m working on a SPARQL library for Clojure (YeSPARQL, https://github.com/joelkuiper/yesparql) and I’m at the point where I want to convert Jena native Node, RDFNode, Literal, Triple… objects to formats more convenient to work with in Clojure itself (maps, records). 

Now it would be nice if I can use some common format, abstracting away from that implementation detail and potentially opening up the door for inter-op with other RDF libraries. 

Now it could very well be that this is a case of “we’ll solve it with one more layer of abstraction” ad infinitum, but at first glance it seems like it might be a nice fit for writing inter-op with other non-Java JVM libraries. 

Joël


> On 26 Aug 2015, at 17:18, Andy Seaborne <an...@apache.org> wrote:
> 
> My first pass at this is:
> https://github.com/afs/commonsrdf-jena
> 
> All packaging and class names temporary.
> 
> What might be more useful is:
> 
> https://github.com/afs/commonsrdf-jena/blob/master/src/main/java/org/apache/jena/commons/Example1.java
> 
> which shows Jena parsing to any commons-rdf Graph.
> The ToGraph class is factory implementation neutral.
> 
> Joël - I'm interested in how you would use CommonsRDF. What use cases do you have in mind?  And where does the data come from or is it created by your code?
> 
> https://github.com/afs/commonsrdf-container
> is a minimal implementation of CommonsRDF - even less than the "simple" one as a test of the designs.
> 
> 	Andy
> 
>> On Aug 26, 2015, at 7:45 AM, Joël Kuiper <me...@joelkuiper.eu> wrote:
>> 
>>> Hey all,
>>> 
>>> I just got wind of CommonsRDF https://commonsrdf.incubator.apache.org/, and it looks great!
>>> It’d be exciting to use this for some of the libraries I’m working on.
>>> Unfortunately I couldn’t find any reference to it in Jena (except for a note on CommonsRDF that it might come to Jena 3.0)
>>> 
>>> Can somebody fill me in on the progress of this project?
>>> 
>>> Thanks in advance!
>>> 
>>> 
>>> ---
>>> Joël Kuiper
>>> www.joelkuiper.eu
>>> 
>> 
> 


Re: Word on CommonsRDF

Posted by Andy Seaborne <an...@apache.org>.
My first pass at this is:
https://github.com/afs/commonsrdf-jena

All packaging and class names temporary.

What might be more useful is:

https://github.com/afs/commonsrdf-jena/blob/master/src/main/java/org/apache/jena/commons/Example1.java

which shows Jena parsing to any commons-rdf Graph.
The ToGraph class is factory implementation neutral.

Joël - I'm interested in how you would use CommonsRDF. What use cases do 
you have in mind?  And where does the data come from or is it created by 
your code?

https://github.com/afs/commonsrdf-container
is a minimal implementation of CommonsRDF - even less than the "simple" 
one as a test of the designs.

	Andy

> On Aug 26, 2015, at 7:45 AM, Joël Kuiper <me...@joelkuiper.eu> wrote:
>
>> Hey all,
>>
>> I just got wind of CommonsRDF https://commonsrdf.incubator.apache.org/, and it looks great!
>> It’d be exciting to use this for some of the libraries I’m working on.
>> Unfortunately I couldn’t find any reference to it in Jena (except for a note on CommonsRDF that it might come to Jena 3.0)
>>
>> Can somebody fill me in on the progress of this project?
>>
>> Thanks in advance!
>>
>>
>> ---
>> Joël Kuiper
>> www.joelkuiper.eu
>>
>


Re: Word on CommonsRDF

Posted by "ajs6f@virginia.edu" <aj...@virginia.edu>.
There was a little discussion about this on the dev- list:

http://markmail.org/search/?q=jena+commons+rdf#query:jena%20commons%20rdf%20list%3Aorg.apache.incubator.jena-dev+page:1+mid:jjljtijtw36f3jf3+state:results

but beyond some interest from a few people (Andy Seaborne and Stian Soiland-Reyes and myself) I don't think much of a plan resulted.

I have created an ticket for such a project:

https://issues.apache.org/jira/browse/JENA-1015

---
A. Soroka
The University of Virginia Library

On Aug 26, 2015, at 7:45 AM, Joël Kuiper <me...@joelkuiper.eu> wrote:

> Hey all,
> 
> I just got wind of CommonsRDF https://commonsrdf.incubator.apache.org/, and it looks great!
> It’d be exciting to use this for some of the libraries I’m working on.
> Unfortunately I couldn’t find any reference to it in Jena (except for a note on CommonsRDF that it might come to Jena 3.0)
> 
> Can somebody fill me in on the progress of this project?
> 
> Thanks in advance!
> 
> 
> ---
> Joël Kuiper
> www.joelkuiper.eu
>