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

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

From: (wrong string) čius <martynas@graphity.org>
Date: Sun, 5 Aug 2012 18:05:54 +0300
Message-ID: <CAE35Vmx1YxPK1em5bk0XCXKdtJS6nRqRrvtxogiEQYvHLtdioQ@mail.gmail.com>
To: public-ldp@w3.org
Cc: public-ldp-wg@w3.org
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.

Received on Sunday, 5 August 2012 15:06:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:16:33 UTC