You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Andy Seaborne <an...@apache.org> on 2015/04/22 19:05:42 UTC

Implementing CSV on the Web | Gregg Kellogg

FYI

Gregg Kellogg has written up his experience in implementing the W3C "CSV 
on the web" (inc conversion to RDF) working group design.  His 
implementation is in Ruby but the experience is valid for any language.

http://greggkellogg.net/2015/04/implementing-csv-on-the-web/

	Andy

Re: Implementing CSV on the Web | Gregg Kellogg

Posted by "Bruno P. Kinoshita" <ki...@apache.org>.
Oh, now that you mention I recall using that parser in JENA-632. Not so hard to understand, had to look at one example to grok how to use that module for producing JSON too. Kudos!

For the Jenkins plug-in, I'll already include Jena as dependency. Hence using json-ld and other code provided by Jena for handling several metadata-related formats is definitely better than adding other dependencies just for that.

Going to wait for the cold and rainy winter here to start coding this Jenkins plug-in with Jena. Before that, will try to help on JENA-380 and update JENA-632, both after Jena 3 branch is ready :)
ThanksBruno

 
      From: Andy Seaborne <an...@apache.org>
 To: dev@jena.apache.org 
 Sent: Monday, April 27, 2015 9:35 PM
 Subject: Re: Implementing CSV on the Web | Gregg Kellogg
   
There is a parser for JSON in Jena - key features are that it is 
streaming and all you get is a JSON abstract syntax, not some mapping to 
the Java object model.  Finding something that only parses JSON, and 
does not come with some kind of ORM-like thing on top was the reason to 
write it.  I spent more time looking at other systems to find one that 
was just a parser and AL2 compatible than actually writing the code! 
That may or not be a good feature for you.

    Andy



On 27/04/15 10:25, Bruno P. Kinoshita wrote:
> Hi Claude
> I've used Jackson and google-gson for parsing JSON in Java in the past. Now I'd probably use Jackson. I **think** at least some of its components are licensed under the Apache License too - https://github.com/FasterXML/jackson-core.
> But indeed, I never notice that there is no clear LICENSE or LICENSE.txt file, or even a NOTICE file detailing IP, licenses, etc, in the Jackson project. Just pinged the author to check if there's a list of licenses used in the project somewhere - https://twitter.com/kinow/status/592618743311663104
>
> ThanksBruno
>
>
>        From: Claude Warren <cl...@xenei.com>
>  To: dev@jena.apache.org; Bruno P. Kinoshita <ki...@apache.org>
>  Sent: Monday, April 27, 2015 6:41 PM
>  Subject: Re: Implementing CSV on the Web | Gregg Kellogg
>
> Bruno,
>
> If you use Jackson to produce/consume json you can also produce/consume csv
> and do it in a streaming manner.  The only problem that I can see is that
> the Jackson license is not easy to find so I don;t know if it is an Apache
> license and can be used in Jena.
>
> Claude
>
>
>
> On Sun, Apr 26, 2015 at 10:28 PM, Bruno P. Kinoshita <ki...@apache.org>
> wrote:
>
>> I never had the chance to actually use JSON-LD in a project, so I will
>> have to toy around with it first, but considering that lots of people are
>> familiar to the JSON syntax I think that definitely makes sense!
>> Added to the list of output formats to support in the Jenkins plug-in.
>>
>> Thanks Andy!
>> Bruno
>>
>>
>>        From: Andy Seaborne <an...@apache.org>
>>    To: dev@jena.apache.org
>>    Sent: Monday, April 27, 2015 1:55 AM
>>    Subject: Re: Implementing CSV on the Web | Gregg Kellogg
>>
>> Bruno,
>>
>> Maybe JSON-LD would be a good choice for output - can be handled as JSON
>> syntax or used as RDF.
>>
>>      Andy
>>
>>
>>
>> On 22/04/15 23:48, Bruno P. Kinoshita wrote:
>>> Thanks for sharing Andy!
>>> I'm collecting posts like this to work on enhancing the existing
>> Metadata plugin for Jenkins [1].
>>> My goal is to use Jena within Jenkins, to store metadata and transform
>> Jenkins into a SPARQL Endpoint. Also letting users retrieve metadata from
>> Jenkins builds using format as RDF, JSON, XML, etc. I hadn't thought about
>> CSV to RDF yet.
>>> Bruno
>>>
>>> [1] https://wiki.jenkins-ci.org/display/JENKINS/Metadata+plugin
>>>
>>>          From: Andy Seaborne <an...@apache.org>
>>>    To: dev@jena.apache.org
>>>    Sent: Thursday, April 23, 2015 5:05 AM
>>>    Subject: Implementing CSV on the Web | Gregg Kellogg
>>>
>>> FYI
>>>
>>> Gregg Kellogg has written up his experience in implementing the W3C "CSV
>>> on the web" (inc conversion to RDF) working group design.  His
>>> implementation is in Ruby but the experience is valid for any language.
>>>
>>> http://greggkellogg.net/2015/04/implementing-csv-on-the-web/
>>>
>>>        Andy
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>
>



   

Re: Implementing CSV on the Web | Gregg Kellogg

Posted by Andy Seaborne <an...@apache.org>.
There is a parser for JSON in Jena - key features are that it is 
streaming and all you get is a JSON abstract syntax, not some mapping to 
the Java object model.  Finding something that only parses JSON, and 
does not come with some kind of ORM-like thing on top was the reason to 
write it.  I spent more time looking at other systems to find one that 
was just a parser and AL2 compatible than actually writing the code! 
That may or not be a good feature for you.

	Andy

On 27/04/15 10:25, Bruno P. Kinoshita wrote:
> Hi Claude
> I've used Jackson and google-gson for parsing JSON in Java in the past. Now I'd probably use Jackson. I **think** at least some of its components are licensed under the Apache License too - https://github.com/FasterXML/jackson-core.
> But indeed, I never notice that there is no clear LICENSE or LICENSE.txt file, or even a NOTICE file detailing IP, licenses, etc, in the Jackson project. Just pinged the author to check if there's a list of licenses used in the project somewhere - https://twitter.com/kinow/status/592618743311663104
>
> ThanksBruno
>
>
>        From: Claude Warren <cl...@xenei.com>
>   To: dev@jena.apache.org; Bruno P. Kinoshita <ki...@apache.org>
>   Sent: Monday, April 27, 2015 6:41 PM
>   Subject: Re: Implementing CSV on the Web | Gregg Kellogg
>
> Bruno,
>
> If you use Jackson to produce/consume json you can also produce/consume csv
> and do it in a streaming manner.  The only problem that I can see is that
> the Jackson license is not easy to find so I don;t know if it is an Apache
> license and can be used in Jena.
>
> Claude
>
>
>
> On Sun, Apr 26, 2015 at 10:28 PM, Bruno P. Kinoshita <ki...@apache.org>
> wrote:
>
>> I never had the chance to actually use JSON-LD in a project, so I will
>> have to toy around with it first, but considering that lots of people are
>> familiar to the JSON syntax I think that definitely makes sense!
>> Added to the list of output formats to support in the Jenkins plug-in.
>>
>> Thanks Andy!
>> Bruno
>>
>>
>>        From: Andy Seaborne <an...@apache.org>
>>    To: dev@jena.apache.org
>>    Sent: Monday, April 27, 2015 1:55 AM
>>    Subject: Re: Implementing CSV on the Web | Gregg Kellogg
>>
>> Bruno,
>>
>> Maybe JSON-LD would be a good choice for output - can be handled as JSON
>> syntax or used as RDF.
>>
>>      Andy
>>
>>
>>
>> On 22/04/15 23:48, Bruno P. Kinoshita wrote:
>>> Thanks for sharing Andy!
>>> I'm collecting posts like this to work on enhancing the existing
>> Metadata plugin for Jenkins [1].
>>> My goal is to use Jena within Jenkins, to store metadata and transform
>> Jenkins into a SPARQL Endpoint. Also letting users retrieve metadata from
>> Jenkins builds using format as RDF, JSON, XML, etc. I hadn't thought about
>> CSV to RDF yet.
>>> Bruno
>>>
>>> [1] https://wiki.jenkins-ci.org/display/JENKINS/Metadata+plugin
>>>
>>>          From: Andy Seaborne <an...@apache.org>
>>>    To: dev@jena.apache.org
>>>    Sent: Thursday, April 23, 2015 5:05 AM
>>>    Subject: Implementing CSV on the Web | Gregg Kellogg
>>>
>>> FYI
>>>
>>> Gregg Kellogg has written up his experience in implementing the W3C "CSV
>>> on the web" (inc conversion to RDF) working group design.  His
>>> implementation is in Ruby but the experience is valid for any language.
>>>
>>> http://greggkellogg.net/2015/04/implementing-csv-on-the-web/
>>>
>>>        Andy
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>
>


Re: Implementing CSV on the Web | Gregg Kellogg

Posted by "Bruno P. Kinoshita" <ki...@apache.org>.
Hi Claude
I've used Jackson and google-gson for parsing JSON in Java in the past. Now I'd probably use Jackson. I **think** at least some of its components are licensed under the Apache License too - https://github.com/FasterXML/jackson-core.
But indeed, I never notice that there is no clear LICENSE or LICENSE.txt file, or even a NOTICE file detailing IP, licenses, etc, in the Jackson project. Just pinged the author to check if there's a list of licenses used in the project somewhere - https://twitter.com/kinow/status/592618743311663104

ThanksBruno

 
      From: Claude Warren <cl...@xenei.com>
 To: dev@jena.apache.org; Bruno P. Kinoshita <ki...@apache.org> 
 Sent: Monday, April 27, 2015 6:41 PM
 Subject: Re: Implementing CSV on the Web | Gregg Kellogg
   
Bruno,

If you use Jackson to produce/consume json you can also produce/consume csv
and do it in a streaming manner.  The only problem that I can see is that
the Jackson license is not easy to find so I don;t know if it is an Apache
license and can be used in Jena.

Claude



On Sun, Apr 26, 2015 at 10:28 PM, Bruno P. Kinoshita <ki...@apache.org>
wrote:

> I never had the chance to actually use JSON-LD in a project, so I will
> have to toy around with it first, but considering that lots of people are
> familiar to the JSON syntax I think that definitely makes sense!
> Added to the list of output formats to support in the Jenkins plug-in.
>
> Thanks Andy!
> Bruno
>
>
>      From: Andy Seaborne <an...@apache.org>
>  To: dev@jena.apache.org
>  Sent: Monday, April 27, 2015 1:55 AM
>  Subject: Re: Implementing CSV on the Web | Gregg Kellogg
>
> Bruno,
>
> Maybe JSON-LD would be a good choice for output - can be handled as JSON
> syntax or used as RDF.
>
>    Andy
>
>
>
> On 22/04/15 23:48, Bruno P. Kinoshita wrote:
> > Thanks for sharing Andy!
> > I'm collecting posts like this to work on enhancing the existing
> Metadata plugin for Jenkins [1].
> > My goal is to use Jena within Jenkins, to store metadata and transform
> Jenkins into a SPARQL Endpoint. Also letting users retrieve metadata from
> Jenkins builds using format as RDF, JSON, XML, etc. I hadn't thought about
> CSV to RDF yet.
> > Bruno
> >
> > [1] https://wiki.jenkins-ci.org/display/JENKINS/Metadata+plugin
> >
> >        From: Andy Seaborne <an...@apache.org>
> >  To: dev@jena.apache.org
> >  Sent: Thursday, April 23, 2015 5:05 AM
> >  Subject: Implementing CSV on the Web | Gregg Kellogg
> >
> > FYI
> >
> > Gregg Kellogg has written up his experience in implementing the W3C "CSV
> > on the web" (inc conversion to RDF) working group design.  His
> > implementation is in Ruby but the experience is valid for any language.
> >
> > http://greggkellogg.net/2015/04/implementing-csv-on-the-web/
> >
> >      Andy
> >
> >
> >
> >
>
>
>
>
>


-- 
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren


   

Re: Implementing CSV on the Web | Gregg Kellogg

Posted by Andy Seaborne <an...@apache.org>.
Jena uses GH/jsonld-java/jsonld-java already and it depends on Jackson 
(which is AL2).

However, if you care about the appearance of the output, generalizing to 
"any output" Jackson may not be the way to go.  You can end up with 
correct data that looks horrible (c.f. RDF/XML !)

	Andy

On 27/04/15 07:41, Claude Warren wrote:
> Bruno,
>
> If you use Jackson to produce/consume json you can also produce/consume csv
> and do it in a streaming manner.  The only problem that I can see is that
> the Jackson license is not easy to find so I don;t know if it is an Apache
> license and can be used in Jena.
>
> Claude
>
> On Sun, Apr 26, 2015 at 10:28 PM, Bruno P. Kinoshita <ki...@apache.org>
> wrote:
>
>> I never had the chance to actually use JSON-LD in a project, so I will
>> have to toy around with it first, but considering that lots of people are
>> familiar to the JSON syntax I think that definitely makes sense!
>> Added to the list of output formats to support in the Jenkins plug-in.
>>
>> Thanks Andy!
>> Bruno
>>
>>
>>        From: Andy Seaborne <an...@apache.org>
>>   To: dev@jena.apache.org
>>   Sent: Monday, April 27, 2015 1:55 AM
>>   Subject: Re: Implementing CSV on the Web | Gregg Kellogg
>>
>> Bruno,
>>
>> Maybe JSON-LD would be a good choice for output - can be handled as JSON
>> syntax or used as RDF.
>>
>>      Andy
>>
>>
>>
>> On 22/04/15 23:48, Bruno P. Kinoshita wrote:
>>> Thanks for sharing Andy!
>>> I'm collecting posts like this to work on enhancing the existing
>> Metadata plugin for Jenkins [1].configuration
>>> My goal is to use Jena within Jenkins, to store metadata and transform
>> Jenkins into a SPARQL Endpoint. Also letting users retrieve metadata from
>> Jenkins builds using format as RDF, JSON, XML, etc. I hadn't thought about
>> CSV to RDF yet.
>>> Bruno
>>>
>>> [1] https://wiki.jenkins-ci.org/display/JENKINS/Metadata+plugin
>>>
>>>         From: Andy Seaborne <an...@apache.org>
>>>   To: dev@jena.apache.org
>>>   Sent: Thursday, April 23, 2015 5:05 AM
>>>   Subject: Implementing CSV on the Web | Gregg Kellogg
>>>
>>> FYI
>>>
>>> Gregg Kellogg has written up his experience in implementing the W3C "CSV
>>> on the web" (inc conversion to RDF) working group design.  His
>>> implementation is in Ruby but the experience is valid for any language.
>>>
>>> http://greggkellogg.net/2015/04/implementing-csv-on-the-web/
>>>
>>>       Andy
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>
>


Re: Implementing CSV on the Web | Gregg Kellogg

Posted by Claude Warren <cl...@xenei.com>.
Bruno,

If you use Jackson to produce/consume json you can also produce/consume csv
and do it in a streaming manner.  The only problem that I can see is that
the Jackson license is not easy to find so I don;t know if it is an Apache
license and can be used in Jena.

Claude

On Sun, Apr 26, 2015 at 10:28 PM, Bruno P. Kinoshita <ki...@apache.org>
wrote:

> I never had the chance to actually use JSON-LD in a project, so I will
> have to toy around with it first, but considering that lots of people are
> familiar to the JSON syntax I think that definitely makes sense!
> Added to the list of output formats to support in the Jenkins plug-in.
>
> Thanks Andy!
> Bruno
>
>
>       From: Andy Seaborne <an...@apache.org>
>  To: dev@jena.apache.org
>  Sent: Monday, April 27, 2015 1:55 AM
>  Subject: Re: Implementing CSV on the Web | Gregg Kellogg
>
> Bruno,
>
> Maybe JSON-LD would be a good choice for output - can be handled as JSON
> syntax or used as RDF.
>
>     Andy
>
>
>
> On 22/04/15 23:48, Bruno P. Kinoshita wrote:
> > Thanks for sharing Andy!
> > I'm collecting posts like this to work on enhancing the existing
> Metadata plugin for Jenkins [1].
> > My goal is to use Jena within Jenkins, to store metadata and transform
> Jenkins into a SPARQL Endpoint. Also letting users retrieve metadata from
> Jenkins builds using format as RDF, JSON, XML, etc. I hadn't thought about
> CSV to RDF yet.
> > Bruno
> >
> > [1] https://wiki.jenkins-ci.org/display/JENKINS/Metadata+plugin
> >
> >        From: Andy Seaborne <an...@apache.org>
> >  To: dev@jena.apache.org
> >  Sent: Thursday, April 23, 2015 5:05 AM
> >  Subject: Implementing CSV on the Web | Gregg Kellogg
> >
> > FYI
> >
> > Gregg Kellogg has written up his experience in implementing the W3C "CSV
> > on the web" (inc conversion to RDF) working group design.  His
> > implementation is in Ruby but the experience is valid for any language.
> >
> > http://greggkellogg.net/2015/04/implementing-csv-on-the-web/
> >
> >      Andy
> >
> >
> >
> >
>
>
>
>
>


-- 
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren

Re: Implementing CSV on the Web | Gregg Kellogg

Posted by "Bruno P. Kinoshita" <ki...@apache.org>.
I never had the chance to actually use JSON-LD in a project, so I will have to toy around with it first, but considering that lots of people are familiar to the JSON syntax I think that definitely makes sense!
Added to the list of output formats to support in the Jenkins plug-in.

Thanks Andy! 
Bruno


      From: Andy Seaborne <an...@apache.org>
 To: dev@jena.apache.org 
 Sent: Monday, April 27, 2015 1:55 AM
 Subject: Re: Implementing CSV on the Web | Gregg Kellogg
   
Bruno,

Maybe JSON-LD would be a good choice for output - can be handled as JSON 
syntax or used as RDF.

    Andy



On 22/04/15 23:48, Bruno P. Kinoshita wrote:
> Thanks for sharing Andy!
> I'm collecting posts like this to work on enhancing the existing Metadata plugin for Jenkins [1].
> My goal is to use Jena within Jenkins, to store metadata and transform Jenkins into a SPARQL Endpoint. Also letting users retrieve metadata from Jenkins builds using format as RDF, JSON, XML, etc. I hadn't thought about CSV to RDF yet.
> Bruno
>
> [1] https://wiki.jenkins-ci.org/display/JENKINS/Metadata+plugin
>
>        From: Andy Seaborne <an...@apache.org>
>  To: dev@jena.apache.org
>  Sent: Thursday, April 23, 2015 5:05 AM
>  Subject: Implementing CSV on the Web | Gregg Kellogg
>
> FYI
>
> Gregg Kellogg has written up his experience in implementing the W3C "CSV
> on the web" (inc conversion to RDF) working group design.  His
> implementation is in Ruby but the experience is valid for any language.
>
> http://greggkellogg.net/2015/04/implementing-csv-on-the-web/
>
>      Andy
>
>
>
>



   

Re: Implementing CSV on the Web | Gregg Kellogg

Posted by Andy Seaborne <an...@apache.org>.
Bruno,

Maybe JSON-LD would be a good choice for output - can be handled as JSON 
syntax or used as RDF.

	Andy

On 22/04/15 23:48, Bruno P. Kinoshita wrote:
> Thanks for sharing Andy!
> I'm collecting posts like this to work on enhancing the existing Metadata plugin for Jenkins [1].
> My goal is to use Jena within Jenkins, to store metadata and transform Jenkins into a SPARQL Endpoint. Also letting users retrieve metadata from Jenkins builds using format as RDF, JSON, XML, etc. I hadn't thought about CSV to RDF yet.
> Bruno
>
> [1] https://wiki.jenkins-ci.org/display/JENKINS/Metadata+plugin
>
>        From: Andy Seaborne <an...@apache.org>
>   To: dev@jena.apache.org
>   Sent: Thursday, April 23, 2015 5:05 AM
>   Subject: Implementing CSV on the Web | Gregg Kellogg
>
> FYI
>
> Gregg Kellogg has written up his experience in implementing the W3C "CSV
> on the web" (inc conversion to RDF) working group design.  His
> implementation is in Ruby but the experience is valid for any language.
>
> http://greggkellogg.net/2015/04/implementing-csv-on-the-web/
>
>      Andy
>
>
>
>


Re: Implementing CSV on the Web | Gregg Kellogg

Posted by Claude Warren <cl...@xenei.com>.
I wrote/extended a CSV to RDF processor when I was at DERI working on the
Granatum project.  That code was to be open source.  If anyone is
interested I could probably get a copy released.  It handled things like a
change in the format mid stream and was very configurable.

On Wed, Apr 22, 2015 at 11:48 PM, Bruno P. Kinoshita <ki...@apache.org>
wrote:

> Thanks for sharing Andy!
> I'm collecting posts like this to work on enhancing the existing Metadata
> plugin for Jenkins [1].
> My goal is to use Jena within Jenkins, to store metadata and transform
> Jenkins into a SPARQL Endpoint. Also letting users retrieve metadata from
> Jenkins builds using format as RDF, JSON, XML, etc. I hadn't thought about
> CSV to RDF yet.
> Bruno
>
> [1] https://wiki.jenkins-ci.org/display/JENKINS/Metadata+plugin
>
>       From: Andy Seaborne <an...@apache.org>
>  To: dev@jena.apache.org
>  Sent: Thursday, April 23, 2015 5:05 AM
>  Subject: Implementing CSV on the Web | Gregg Kellogg
>
> FYI
>
> Gregg Kellogg has written up his experience in implementing the W3C "CSV
> on the web" (inc conversion to RDF) working group design.  His
> implementation is in Ruby but the experience is valid for any language.
>
> http://greggkellogg.net/2015/04/implementing-csv-on-the-web/
>
>     Andy
>
>
>
>


-- 
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren

Re: Implementing CSV on the Web | Gregg Kellogg

Posted by "Bruno P. Kinoshita" <ki...@apache.org>.
Thanks for sharing Andy!
I'm collecting posts like this to work on enhancing the existing Metadata plugin for Jenkins [1].
My goal is to use Jena within Jenkins, to store metadata and transform Jenkins into a SPARQL Endpoint. Also letting users retrieve metadata from Jenkins builds using format as RDF, JSON, XML, etc. I hadn't thought about CSV to RDF yet.
Bruno

[1] https://wiki.jenkins-ci.org/display/JENKINS/Metadata+plugin
 
      From: Andy Seaborne <an...@apache.org>
 To: dev@jena.apache.org 
 Sent: Thursday, April 23, 2015 5:05 AM
 Subject: Implementing CSV on the Web | Gregg Kellogg
   
FYI

Gregg Kellogg has written up his experience in implementing the W3C "CSV 
on the web" (inc conversion to RDF) working group design.  His 
implementation is in Ruby but the experience is valid for any language.

http://greggkellogg.net/2015/04/implementing-csv-on-the-web/

    Andy