You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Baptiste Lafontaine <ba...@gmail.com> on 2011/12/05 13:59:17 UTC

Jena.rdfcat only jar

Hi,

I need to convert RDF/XML files to N3 in a node.js application.

Since I want my application needs to be portable (and because I have a few
skills un java), I though that jena.rdfcat would do this.

Is it possible to have a "minimal" jar that only contains rdfcat (and
dependencies) that could be embedded in my project ?

Thanks a lot
--
Baptiste Lafontaine
Etudiant Télécom SudParis
CV : http://magnetik.org/fr/curriculum-vitae/
Mobile : +33 (0) 6 75 30 15 33

Re: Jena.rdfcat only jar

Posted by Andy Seaborne <an...@apache.org>.
Either
1/ put all the jars in lib/ on the class path

e.g.

java -cp DIR/lib/* jena.rdfcat

or on windows

java -cp "DIR/lib/*;" jena.rdfcat

where DIR is the Jena installation directory.

2/ You can make a jar by unpacking all the jars and repacking into a 
single jar.

We are going to be producing a jar-of-everthing; it may not make this 
release round though/

There are already scripts to make it all work.

https://svn.apache.org/repos/asf/incubator/jena/Jena2/JenaZip/trunk
in bin/ and bat/

	Andy

	

On 05/12/11 15:23, Olivier Rossel wrote:
> Isn't there a web services that does such a job?
> Something like http://www.rdfabout.com/demo/validator/ ?
>
> On Mon, Dec 5, 2011 at 1:59 PM, Baptiste Lafontaine
> <ba...@gmail.com>  wrote:
>> Hi,
>>
>> I need to convert RDF/XML files to N3 in a node.js application.
>>
>> Since I want my application needs to be portable (and because I have a few
>> skills un java), I though that jena.rdfcat would do this.
>>
>> Is it possible to have a "minimal" jar that only contains rdfcat (and
>> dependencies) that could be embedded in my project ?
>>
>> Thanks a lot
>> --
>> Baptiste Lafontaine
>> Etudiant Télécom SudParis
>> CV : http://magnetik.org/fr/curriculum-vitae/
>> Mobile : +33 (0) 6 75 30 15 33


Re: Jena.rdfcat only jar

Posted by Olivier Rossel <ol...@gmail.com>.
Isn't there a web services that does such a job?
Something like http://www.rdfabout.com/demo/validator/ ?

On Mon, Dec 5, 2011 at 1:59 PM, Baptiste Lafontaine
<ba...@gmail.com> wrote:
> Hi,
>
> I need to convert RDF/XML files to N3 in a node.js application.
>
> Since I want my application needs to be portable (and because I have a few
> skills un java), I though that jena.rdfcat would do this.
>
> Is it possible to have a "minimal" jar that only contains rdfcat (and
> dependencies) that could be embedded in my project ?
>
> Thanks a lot
> --
> Baptiste Lafontaine
> Etudiant Télécom SudParis
> CV : http://magnetik.org/fr/curriculum-vitae/
> Mobile : +33 (0) 6 75 30 15 33

Re: Jena.rdfcat only jar

Posted by Paolo Castagna <ca...@googlemail.com>.
Hi Baptiste

Baptiste Lafontaine wrote:
> 2011/12/6 Paolo Castagna <ca...@googlemail.com>
>>> As small as possible. For testing purpose I may use the full version although.
>> "small" is the size in bytes or the number of classes you have in a jar or
>> the numbers of lines of code?
> 
> I ment in size in bytes. But finally this solution was not good
> enough, so I'll use something else.

Can I ask you why the size in bytes matter to you?

Re: "this solution was not good enough": I imagine. If you need to start the
JVM for each transformation|request, it is not going to work well.

A better approach would be to write a small server which than you can use from
node.js via HTTP. This way you do not need to pay the JVM startup cost (but it
is a slightly more complicate setup).

If you find an interesting solution to parse RDF/XML in JavaScript let us/me
know. I am not aware of any (but I use Turtle and N-Triples|N-Quads).

> Thanks for your help anyway

No problem.

Paolo

> 
> 
>> Paolo
>>
>>>> Paolo
>>>>
>>>>> Thanks a lot
>>>>> --
>>>>> Baptiste Lafontaine
>>>>> Etudiant Télécom SudParis
>>>>> CV : http://magnetik.org/fr/curriculum-vitae/
>>>>> Mobile : +33 (0) 6 75 30 15 33
>>>>>

Re: Jena.rdfcat only jar

Posted by Baptiste Lafontaine <ba...@gmail.com>.
2011/12/6 Paolo Castagna <ca...@googlemail.com>
>
> >
> > As small as possible. For testing purpose I may use the full version although.
>
> "small" is the size in bytes or the number of classes you have in a jar or
> the numbers of lines of code?

I ment in size in bytes. But finally this solution was not good
enough, so I'll use something else.

Thanks for your help anyway


> Paolo
>
> >
> >> Paolo
> >>
> >>> Thanks a lot
> >>> --
> >>> Baptiste Lafontaine
> >>> Etudiant Télécom SudParis
> >>> CV : http://magnetik.org/fr/curriculum-vitae/
> >>> Mobile : +33 (0) 6 75 30 15 33
> >>>
>

Re: Jena.rdfcat only jar

Posted by Paolo Castagna <ca...@googlemail.com>.
Hi Baptiste

Baptiste Lafontaine wrote:
> 2011/12/5 Paolo Castagna <ca...@googlemail.com>
>>
>> Hi Baptiste,
>> how are you planning to use a Java app/library (such as jena.rdfcat) from
>> node.js? Will that call/execute the JVM everytime you invoke it? (I assume
>> so).
> 
> I plan to use the child processes
> (http://nodejs.org/docs/v0.6.5/api/child_processes.html).
> It may be not perfect but I haven't found any javascript libraries
> that could parse XML/RDF.

Ack.

>>> Is it possible to have a "minimal" jar that only contains rdfcat (and
>>> dependencies) that could be embedded in my project ?
>> What do you mean with "minimal"?
> 
> As small as possible. For testing purpose I may use the full version although.

"small" is the size in bytes or the number of classes you have in a jar or
the numbers of lines of code?

Paolo

> 
>> Paolo
>>
>>> Thanks a lot
>>> --
>>> Baptiste Lafontaine
>>> Etudiant Télécom SudParis
>>> CV : http://magnetik.org/fr/curriculum-vitae/
>>> Mobile : +33 (0) 6 75 30 15 33
>>>


Re: Jena.rdfcat only jar

Posted by Baptiste Lafontaine <ba...@gmail.com>.
2011/12/5 Paolo Castagna <ca...@googlemail.com>
>
>
> Hi Baptiste,
> how are you planning to use a Java app/library (such as jena.rdfcat) from
> node.js? Will that call/execute the JVM everytime you invoke it? (I assume
> so).

I plan to use the child processes
(http://nodejs.org/docs/v0.6.5/api/child_processes.html).
It may be not perfect but I haven't found any javascript libraries
that could parse XML/RDF.


> > Is it possible to have a "minimal" jar that only contains rdfcat (and
> > dependencies) that could be embedded in my project ?
>
> What do you mean with "minimal"?

As small as possible. For testing purpose I may use the full version although.

> Paolo
>
> >
> > Thanks a lot
> > --
> > Baptiste Lafontaine
> > Etudiant Télécom SudParis
> > CV : http://magnetik.org/fr/curriculum-vitae/
> > Mobile : +33 (0) 6 75 30 15 33
> >
>

Re: Jena.rdfcat only jar

Posted by Paolo Castagna <ca...@googlemail.com>.
Baptiste Lafontaine wrote:
> Hi,
> 
> I need to convert RDF/XML files to N3 in a node.js application.
> 
> Since I want my application needs to be portable (and because I have a few
> skills un java), I though that jena.rdfcat would do this.

Hi Baptiste,
how are you planning to use a Java app/library (such as jena.rdfcat) from
node.js? Will that call/execute the JVM everytime you invoke it? (I assume
so).

> Is it possible to have a "minimal" jar that only contains rdfcat (and
> dependencies) that could be embedded in my project ?

What do you mean with "minimal"?

Paolo

> 
> Thanks a lot
> --
> Baptiste Lafontaine
> Etudiant Télécom SudParis
> CV : http://magnetik.org/fr/curriculum-vitae/
> Mobile : +33 (0) 6 75 30 15 33
>