Hi Fabian,

2014-10-07 8:42 GMT+02:00 Fabian Cretton <fabian.cret...@hevs.ch>:

>  Hi,
>
> How can Marmotta be used for linked data publishing (à la Pubby), thus
> handling content negociation when querying (dereferencing) a resource
> hosted by Marmotta.
>

Marmotta does content negotiation automatically if you access
http://<server>/<marmotta>/resource/<resource-id>.
However, unlike Pubby, Marmotta is not a wrapper around existing RDF data
but a native Linked Data server, i.e. it does no URI rewriting. So you
would need to make sure your resources already have resolvable URIs that
point to the Marmotta server (i.e. starting with the
http://<server>/<marmotta>/resource/
prefix). In that case, Marmotta not only supports content negotiation for
GET requests, but also for POST (create resource) and PUT (upload RDF data
to resource).

If you use URIs that do not resolve to the Marmotta server, you can still
use http://<server>/<marmotta>/resource?uri=<uri>, but this is just for
convenience, not really Linked Data.

Would a feature that allows automatically rewriting certain URI prefixes be
useful to you? We were discussing this some time ago, but for the moment
put it on hold.



>
>  This question is related to [1] where I didn't find the answers, I think
> Michel was looking for the same information.
>
> If I take a DBPedia example, a client can ask for
> http://dbpedia.org/resource/Germany
> and depending on the requested format, get an html representation of the
> resource http://dbpedia.org/page/Germany
> or the RDF representation http://dbpedia.org/data/Germany
>
>

Works in Marmotta as well.


> I did set up such a behavior using Pubby in the past, but I would like to
> do the same using Marmotta instead. Also I am not familiar with LDP yet,
> but started reading about it.
>
> If such linked data publishing is possible, is it a basic Marmotta feature
> (will Marmotta publish any resource of its store as linked data), or does
> it rely on the LDP implementation (only LDPR will thus be published) ?
>

All resources matching the Marmotta resource prefix will be published.
Technically, there is simply a webservice listening at
http://<server>/<marmotta>/resource
and anything on the path below (or optionally the uri= query parameter)
that will serve a client Linked Data conforming data.


> As Michel asked in [1], is there any example about how to set up such a
> behaviour ?
> This feature being certainly different from the "/marmotta/resource?uri="
> web service.
>

You don't need to use "/marmotta/resource?uri" if the resource URI matches
the correct prefix. ;-)


>
> Thank you for any pointer.
> Fabian
>
>
> [1]
> http://mail-archives.apache.org/mod_mbox/marmotta-users/201409.mbox/%3C730127A8D040CB4A976BE07F089997068BCC2411%40EXC-MBX03.tsn.tno.nl%3E
>

Reply via email to