W3C home > Mailing lists > Public > public-ldp@w3.org > August 2012

Re: LDP interfaces in Java (based on Jena and JAX-RS)

From: Martynas Jusevičius <martynas@graphity.org>
Date: Mon, 6 Aug 2012 23:34:41 +0300
Message-ID: <CAE35VmyiNVCLOGCxpPX_yunc6rN=LNiYw+UnLkY_X5FB4bN82w@mail.gmail.com>
To: j.jakobitsch@semantic-web.at
Cc: public-ldp@w3.org, public-ldp-wg@w3.org
Jürgen,

my interfaces and application are meant for server-side Java, and
your's is more of an AJAX application, as far as I understand?
Graphity can manage RDF and also serve Linked Data, either as a
platform or via user interface. Here's the default one:
http://semanticreports.com/?uri=http%3A%2F%2Fwww.turnguard.com%2Fturnguard.rdf

In regard to this discussion my thread started (I can't get mail from
public-ldp-wg) I think the most important one is the one Andy is
making (I think): only RDF-based LDP would allow generic web
applications, because there would be no data model conversions in the
entire dataflow between the client and the server (vocabulary
conversions might be still needed, but XML or JSON has that problem
too).
This seems to me as an important goal. Not underlining RDF would keep
us attached to the Web 2.0 approach.

Martynas
graphity.org

On Mon, Aug 6, 2012 at 11:03 PM, Jürgen Jakobitsch
<j.jakobitsch@semantic-web.at> wrote:
> hi,
>
> that is interesting, because it looks somehow complicated..
>
> i'm working on a a single servlet, that does all the ldp stuff.
> you can see it in action here [1].
>
> i more or less have only one interface, one that has a method
> to return a openrdf sesame repository connection. every request
> is supplied with that connection via request.setAttribute.
>
> now with that connection it is just a matter of doing content
> negotiation (which is real easy with sesame, i get an appropriate writer
> for every serialization format) and running queries.
> with my openrdf-jsp-writer i have a whole template engine.
>
> with this technique i am currently writing a skos:thesaurus management
> tool with ease. one very simple webapp can be seen here [2]. if you
> trace through the sourcecode of the page, you'll realize that i'm went
> away from programming huge apis with controllers, services, spring,
> struts and all that.
> the page is simply based on events that trigger sparql queries, the
> results of which are displayed using jsp templates.
> do i need more, eh .. nope...
>
> please note that i'm especially writing such apps that organize data
> into projects (like a skos thesaurus or sioc spaces) because i think
> such things are a little underrepresented (contrary to huge datasets).
>
> wkr turnguard
>
> [1] http://www.turnguard.com/turnguard
> [2] http://business.turnguard.com/html/
>
> On Sun, 2012-08-05 at 18:05 +0300, Martynas Jusevičius wrote:
>> Hey all,
>>
>> I think it would be fair to say that Linked Data is a juxtaposition of
>> RDF and REST, and therefore a Linked Data platform has to implement
>> specifications from both worlds.
>>
>> I have been hacking a prototype LDP for a while now, and have
>> distilled generic interfaces that describe it. With this I mean not
>> some abstract specification, but concrete Java interfaces combining
>> and reusing interfaces from Jena and JAX-RS, which are main Java
>> frameworks for RDF and REST, respectively. Here's the base one:
>>
>> @Consumes({MediaType.APPLICATION_RDF_XML + "; charset=UTF-8",
>> MediaType.TEXT_TURTLE + "; charset=UTF-8"})
>> @Produces({MediaType.APPLICATION_RDF_XML + "; charset=UTF-8",
>> MediaType.TEXT_TURTLE + "; charset=UTF-8"})
>> public interface Resource extends LinkedDataResource
>> {
>>     @GET Response getResponse();
>>
>>     @POST Response post(Model model);
>>
>>     @PUT Response put(Model model);
>>
>>     @DELETE Response delete();
>>
>>     EntityTag getEntityTag();
>>
>> }
>>
>> Source: https://github.com/Graphity/graphity-browser/blob/master/src/main/java/org/graphity/ldp/model/Resource.java
>>
>> This might or might not be useful when defining an abstract
>> specification, but I already have multiple web applications
>> successfully implementing this.
>> Feedback is very welcome.
>>
>> Martynas
>> graphity.org
>>
>
> --
> | Jürgen Jakobitsch,
> | Software Developer
> | Semantic Web Company GmbH
> | Mariahilfer Straße 70 / Neubaugasse 1, Top 8
> | A - 1070 Wien, Austria
> | Mob +43 676 62 12 710 | Fax +43.1.402 12 35 - 22
>
> COMPANY INFORMATION
> | web       : http://www.semantic-web.at/
> | foaf      : http://company.semantic-web.at/person/juergen_jakobitsch
> PERSONAL INFORMATION
> | web       : http://www.turnguard.com
> | foaf      : http://www.turnguard.com/turnguard
> | g+        : https://plus.google.com/111233759991616358206/posts
> | skype     : jakobitsch-punkt
> | xmlns:tg  = "http://www.turnguard.com/turnguard#"
Received on Monday, 6 August 2012 20:35:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 6 August 2012 20:35:10 GMT