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 <a...@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 <m...@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