You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@marmotta.apache.org by Fabian Cretton <Fa...@hevs.ch> on 2014/10/08 15:14:14 UTC

Rép. : Re: How to use Marmotta for Linked data publishing ?

Thank you Sebastian,
 
Just tried it, it works perfectly.
 
Before asking here, I did search for information on the official web
site and in the wiki, but didn't find the information you gave here.
Is it just that I missed it ? otherwise, I suggest to add that
information for other people. It was already a real questionning for me
and also Michel.
 
You ask me "Would a feature that allows automatically rewriting certain
URI prefixes be useful to you? " the answer is that I don't have such a
need so far. But from my experience with pubby, I guess it could bring
some flexibility on the RDF data (not forcing published resources to be
defined with http://<server>/<marmotta>/resource/ prefix). But are there
real life needs about that ? I mean, in a linked data environment URL
needs to be fixed and long lasting, so where does URL rewriting really
come into play in such a context ?
 
And the last question is about LDP: does it mean that LDP is all about
handling "containers", but don't say anything about Linked Data
publishing (i.e. dereferencing a resource). Thats the conclusion from
Michel, and so far it is also mine. But that seems surprising at first
glance. In other words, LDP would define how to access and handle a
bunch of resources (refering to the container), but not how to access a
single resource, is that right ?
 
Thank you
Fabian

>>> Sebastian Schaffert <se...@gmail.com> 07.10.2014
12:56 >>>
Hi Fabian,


2014-10-07 8:42 GMT+02:00 Fabian Cretton <Fa...@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



Re: How to use Marmotta for Linked data publishing ?

Posted by Sergio Fernández <wi...@apache.org>.
Hi Michael,

On 09/10/14 17:10, Bohms, H.M. (Michel) wrote:
> Its more the issue of where the data comes from…if data is in multiple files (say 5 turtle files) they all have a diff. baseURI.
> How then can I import of 5 files content to marmotta?

Importing different files is not a problem at the RDF level. The baseURI 
is just syntactic sugar, later in the model doe snot matter if in the 
original files the resources came identified by relative URIs or fully 
qualified ones.

But of course different base URIs is an issue at the Linked Data level, 
where URIs besides global identifiers should be also suitable locators; 
i.e., you should be able to retrieve the description resource by its URI.

This two documents could be useful for you:

   http://www.w3.org/TR/cooluris/
   http://www.w3.org/TR/ld-bp/

> My work around would now be: just import one of 2 files (the data file), give THIS one the baseuri ending…resource and import the other one (sticking to existing/different baseuri)

If you scenario is not about publishing, you just need a RDF storage, 
then is fine.

Cheers,

-- 
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 660 2747 925
e: sergio.fernandez@redlink.co
w: http://redlink.co

RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by "Bohms, H.M. (Michel)" <mi...@tno.nl>.
Its more the issue of where the data comes from…if data is in multiple files (say 5 turtle files) they all have a diff. baseURI.
How then can I import of 5 files content to marmotta?

My work around would now be: just import one of 2 files (the data file), give THIS one the baseuri ending…resource and import the other one (sticking to existing/different baseuri)
…



Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nl<ma...@tno.nl>

Location<http://www.tno.nl/locaties/DTM>



[cid:image001.gif@01CFE3E3.DCCB5C30]<http://www.tno.nl/>

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.



From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch]
Sent: donderdag 9 oktober 2014 13:31
To: users@marmotta.apache.org
Subject: RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

well, from my understanding:

this is about publishing linked data, as the one from DBPedia, where you want your resources to be dereferencable as:
http://live.dbpedia.org/resource/Europe

And so, on one Linked Data Server, you will publish the data that are part of "http://live.dbpedia.org/<http://live.dbpedia.org/resource/Europe>" domain for instance.

Maybe you have another use case in mind ?

Also, you can still access any data loaded in Marmotta using the following request (quoting Sebastian):
If you use URIs that do not resolve to the Marmotta server, you can still use http://<server>/<marmotta>/resource?uri=<uri<http://%3cserver%3e/%3cmarmotta%3e/resource?uri=%3curi>>, but this is just for convenience, not really Linked Data.

Fabian




>>> "Bohms, H.M. (Michel)" <mi...@tno.nl>> 09.10.2014 13:24 >>>
In that case I am confused ☺

So in the files it should always be?:

# baseURI: http://localhost:8080/marmotta/resource

@prefix : <http://localhost:8080/marmotta/resource#> .

What then if I have 2 ontologies , one importing the other? They can not have the same baseURI…



Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nl<ma...@tno.nl>

Location<http://www.tno.nl/locaties/DTM>



[cid:image001.gif@01CFE3E3.DCCB5C30]<http://www.tno.nl/>

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.



From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch]
Sent: donderdag 9 oktober 2014 13:18
To: users@marmotta.apache.org<ma...@marmotta.apache.org>
Subject: RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

yes, "resource" is predefined.

See Sebastian answers for more about that.

>>> "Bohms, H.M. (Michel)" <mi...@tno.nl>> 09.10.2014 13:15 >>>
Is “resource” as string predefined?
Or does it actually refer to something like in my case “extension-example.ttl”?

(if it isI loose something in the middle : when I import multiple ontologies they are all in one big db….)



Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nl<ma...@tno.nl>

Location<http://www.tno.nl/locaties/DTM>



[cid:image001.gif@01CFE3E3.DCCB5C30]<http://www.tno.nl/>

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.



From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch]
Sent: donderdag 9 oktober 2014 9:33
To: users@marmotta.apache.org<ma...@marmotta.apache.org>
Subject: RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

I think it is because your real resource URL is not <http://localhost:8080/marmotta/resource/Deck_1>
But it is <http://ont.cbnl.org/cbnl-extension-example.ttl#Deck_1>

Marmotta doesn't handle URL-rewriting. See in my example that I did use the Marmotta's url for my test resources.

Just for a test, you could try to make a little .ttl file with resources as:
<http://localhost:8080/marmotta/<http://localhost:8080/marmotta/resource/Deck_1>resource/Deck1> a <something>...

and this should work.


So, in a real case, you will install Marmotta on a specific domain, as "http://ont.cbnl.org"
Then you need to have your Linked Data resources URL which starts with: "http://ont.cbnl.org<http://ont.cbnl.org/>/resource/"
as for instance <http://ont.cbnl.org<http://ont.cbnl.org/>/resource/Deck1>
or <http://ont.cbnl.org/resource/cbnl-extension-example/Deck1>

Thats how I understand it. The team might give more infos.
Fabian

>>> "Bohms, H.M. (Michel)" <mi...@tno.nl>> 09.10.2014 09:25 >>>
Strange, doesnt work for me:


1.      I have:

2.      [cid:image002.jpg@01CFE3E3.DCCB5C30]
If I know do in browser: http://localhost:8080/marmotta/resource/Deck_1, I get:
[cid:image003.jpg@01CFE3E3.DCCB5C30]
Any tip very much appreciated…Michel




Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nl<ma...@tno.nl>

Location<http://www.tno.nl/locaties/DTM>



[cid:image001.gif@01CFE3E3.DCCB5C30]<http://www.tno.nl/>

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.



From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch]
Sent: woensdag 8 oktober 2014 16:02
To: users@marmotta.apache.org<ma...@marmotta.apache.org>
Subject: RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

Michel,

I access my marmotta server on: "vmhwebsem:8081/"
(I did configure Marmotta/Tomcat to remove the /marmotta part)

So I did create a turtle file:
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<http://vmhwebsem:8081/resource/tstLDRes> a <http://xmlns.com/foaf/0.1/Person>;
rdfs:label "A resource to test Marmotta's Linked Data publishing" .
<http://vmhwebsem:8081/resource/person/tstLDRes2> a <http://xmlns.com/foaf/0.1/Person>;
rdfs:label "A second resource to test Marmotta's Linked Data publishing" .
After loading the file, I could enter the resource's URL in the browser, as:
http://vmhwebsem:8081/resource/tstLDRes
or
http://vmhwebsem:8081/resource/person/tstLDRes2

and the browser was effectively redirected to the corresponding html representation.

Here are a few curl examples:
curl -v -H "Accept: text/turtle" "http://vmhwebsem:8081/resource/tstLDRes"
303 : http://vmhwebsem:8081/meta/text/turtle/tstLDRes

curl -v -H "Accept: text/html" "http://vmhwebsem:8081/resource/tstLDRes"
303 : http://vmhwebsem:8081/meta/text/html/tstLDRes

curl -v -H "Accept: application/rdf+xml" "http://vmhwebsem:8081/resource/tstLDRes"
http://vmhwebsem:8081/meta/application/rdf+xml/tstLDRes

With json -> redirected to jsonLD representation:
curl -v -H "Accept: application/json" "http://vmhwebsem:8081/resource/tstLDRes"
http://vmhwebsem:8081/meta/application/ld+json/tstLDRes
curl -v -H "Accept: application/json" "http://vmhwebsem:8081/meta/application/ld+json/tstLDRes"

hope this helps
Fabian

>>> "Bohms, H.M. (Michel)" <mi...@tno.nl>> 08.10.2014 15:33 >>>
Great that it works that way!
Thx Fabian for reasking this issue, would be good to have extra examples/documentation on this indeed.

Can you give me some simple examples for typical uri to class resources and individuals, guess I making some simple mistakes not getting it to work to my own ontologies and data sets,
Thx a lot! Michel



Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nl<ma...@tno.nl>

Location<http://www.tno.nl/locaties/DTM>



[cid:image001.gif@01CFE3E3.DCCB5C30]<http://www.tno.nl/>

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.



From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch]
Sent: woensdag 8 oktober 2014 15:14
To: users@marmotta.apache.org<ma...@marmotta.apache.org>
Subject: Rép. : Re: How to use Marmotta for Linked data publishing ?

Thank you Sebastian,

Just tried it, it works perfectly.

Before asking here, I did search for information on the official web site and in the wiki, but didn't find the information you gave here.
Is it just that I missed it ? otherwise, I suggest to add that information for other people. It was already a real questionning for me and also Michel.

You ask me "Would a feature that allows automatically rewriting certain URI prefixes be useful to you? " the answer is that I don't have such a need so far. But from my experience with pubby, I guess it could bring some flexibility on the RDF data (not forcing published resources to be defined with http://<server>/<marmotta>/resource/<http://%3cserver%3e/%3cmarmotta%3e/resource/> prefix). But are there real life needs about that ? I mean, in a linked data environment URL needs to be fixed and long lasting, so where does URL rewriting really come into play in such a context ?

And the last question is about LDP: does it mean that LDP is all about handling "containers", but don't say anything about Linked Data publishing (i.e. dereferencing a resource). Thats the conclusion from Michel, and so far it is also mine. But that seems surprising at first glance. In other words, LDP would define how to access and handle a bunch of resources (refering to the container), but not how to access a single resource, is that right ?

Thank you
Fabian

>>> Sebastian Schaffert <se...@gmail.com>> 07.10.2014 12:56 >>>
Hi Fabian,


2014-10-07 8:42 GMT+02:00 Fabian Cretton <Fa...@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<http://%3cserver%3e/%3cmarmotta%3e/resource/%3cresource-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/<http://%3cserver%3e/%3cmarmotta%3e/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<http://%3cserver%3e/%3cmarmotta%3e/resource?uri=%3curi>>, 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<http://%3cserver%3e/%3cmarmotta%3e/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


RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by Fabian Cretton <Fa...@hevs.ch>.
well, from my understanding:

this is about publishing linked data, as the one from DBPedia, where you want your resources to be dereferencable as:
http://live.dbpedia.org/resource/Europe

And so, on one Linked Data Server, you will publish the data that are part of "http://live.dbpedia.org/" domain for instance.

Maybe you have another use case in mind ?

Also, you can still access any data loaded in Marmotta using the following request (quoting Sebastian):
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.

Fabian




>>> "Bohms, H.M. (Michel)" <mi...@tno.nl> 09.10.2014 13:24 >>>

In that case I am confused J
 
So in the files it should always be?:
 
# baseURI: http://localhost:8080/marmotta/resource
 
@prefix : <http://localhost:8080/marmotta/resource#> .
 
What then if I have 2 ontologies , one importing the other? They can not have the same baseURI…
 
 Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural ReliabilityT +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nlLocation

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages. 


 
From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch] 
Sent: donderdag 9 oktober 2014 13:18
To: users@marmotta.apache.org
Subject: RE: Rép. : Re: How to use Marmotta for Linked data publishing ?
 
yes, "resource" is predefined.
 
See Sebastian answers for more about that.

>>> "Bohms, H.M. (Michel)" <mi...@tno.nl> 09.10.2014 13:15 >>>
Is “resource” as string predefined?
Or does it actually refer to something like in my case “extension-example.ttl”?
 
(if it isI loose something in the middle : when I import multiple ontologies they are all in one big db….)
 
 Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural ReliabilityT +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nlLocation

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages. 


 
From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch] 
Sent: donderdag 9 oktober 2014 9:33
To: users@marmotta.apache.org
Subject: RE: Rép. : Re: How to use Marmotta for Linked data publishing ?
 
I think it is because your real resource URL is not <http://localhost:8080/marmotta/resource/Deck_1>
But it is <http://ont.cbnl.org/cbnl-extension-example.ttl#Deck_1>
 
Marmotta doesn't handle URL-rewriting. See in my example that I did use the Marmotta's url for my test resources.
 
Just for a test, you could try to make a little .ttl file with resources as:
<http://localhost:8080/marmotta/resource/Deck1> a <something>...
 
and this should work.
 
 
So, in a real case, you will install Marmotta on a specific domain, as "http://ont.cbnl.org"
Then you need to have your Linked Data resources URL which starts with: "http://ont.cbnl.org/resource/"
as for instance <http://ont.cbnl.org/resource/Deck1>
or <http://ont.cbnl.org/resource/cbnl-extension-example/Deck1>
 
Thats how I understand it. The team might give more infos.
Fabian

>>> "Bohms, H.M. (Michel)" <mi...@tno.nl> 09.10.2014 09:25 >>>
Strange, doesnt work for me:
 
1.      I have:
2.      
If I know do in browser: http://localhost:8080/marmotta/resource/Deck_1, I get:

Any tip very much appreciated…Michel
 
 
 Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural ReliabilityT +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nlLocation

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages. 


 
From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch] 
Sent: woensdag 8 oktober 2014 16:02
To: users@marmotta.apache.org
Subject: RE: Rép. : Re: How to use Marmotta for Linked data publishing ?
 
Michel,
 
I access my marmotta server on: "vmhwebsem:8081/"
(I did configure Marmotta/Tomcat to remove the /marmotta part)
 
So I did create a turtle file:
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<http://vmhwebsem:8081/resource/tstLDRes> a <http://xmlns.com/foaf/0.1/Person>;
rdfs:label "A resource to test Marmotta's Linked Data publishing" .
<http://vmhwebsem:8081/resource/person/tstLDRes2> a <http://xmlns.com/foaf/0.1/Person>;
rdfs:label "A second resource to test Marmotta's Linked Data publishing" .
After loading the file, I could enter the resource's URL in the browser, as:
http://vmhwebsem:8081/resource/tstLDRes
or
http://vmhwebsem:8081/resource/person/tstLDRes2
 
and the browser was effectively redirected to the corresponding html representation.
 
Here are a few curl examples:
curl -v -H "Accept: text/turtle" "http://vmhwebsem:8081/resource/tstLDRes"
303 : http://vmhwebsem:8081/meta/text/turtle/tstLDRes
 
curl -v -H "Accept: text/html" "http://vmhwebsem:8081/resource/tstLDRes"
303 : http://vmhwebsem:8081/meta/text/html/tstLDRes
 
curl -v -H "Accept: application/rdf+xml" "http://vmhwebsem:8081/resource/tstLDRes"
http://vmhwebsem:8081/meta/application/rdf+xml/tstLDRes
 
With json -> redirected to jsonLD representation:
curl -v -H "Accept: application/json" "http://vmhwebsem:8081/resource/tstLDRes"
http://vmhwebsem:8081/meta/application/ld+json/tstLDRes
curl -v -H "Accept: application/json" "http://vmhwebsem:8081/meta/application/ld+json/tstLDRes"
 
hope this helps
Fabian

>>> "Bohms, H.M. (Michel)" <mi...@tno.nl> 08.10.2014 15:33 >>>
Great that it works that way!
Thx Fabian for reasking this issue, would be good to have extra examples/documentation on this indeed.
 
Can you give me some simple examples for typical uri to class resources and individuals, guess I making some simple mistakes not getting it to work to my own ontologies and data sets,
Thx a lot! Michel
 
 Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural ReliabilityT +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nlLocation

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages. 


 
From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch] 
Sent: woensdag 8 oktober 2014 15:14
To: users@marmotta.apache.org
Subject: Rép. : Re: How to use Marmotta for Linked data publishing ?
 
Thank you Sebastian,
 
Just tried it, it works perfectly.
 
Before asking here, I did search for information on the official web site and in the wiki, but didn't find the information you gave here.
Is it just that I missed it ? otherwise, I suggest to add that information for other people. It was already a real questionning for me and also Michel.
 
You ask me "Would a feature that allows automatically rewriting certain URI prefixes be useful to you? " the answer is that I don't have such a need so far. But from my experience with pubby, I guess it could bring some flexibility on the RDF data (not forcing published resources to be defined with http://<server>/<marmotta>/resource/ prefix). But are there real life needs about that ? I mean, in a linked data environment URL needs to be fixed and long lasting, so where does URL rewriting really come into play in such a context ?
 
And the last question is about LDP: does it mean that LDP is all about handling "containers", but don't say anything about Linked Data publishing (i.e. dereferencing a resource). Thats the conclusion from Michel, and so far it is also mine. But that seems surprising at first glance. In other words, LDP would define how to access and handle a bunch of resources (refering to the container), but not how to access a single resource, is that right ?
 
Thank you
Fabian

>>> Sebastian Schaffert <se...@gmail.com> 07.10.2014 12:56 >>>
Hi Fabian, 
 
 
2014-10-07 8:42 GMT+02:00 Fabian Cretton <Fa...@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
 

RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by "Bohms, H.M. (Michel)" <mi...@tno.nl>.
In that case I am confused ☺

So in the files it should always be?:

# baseURI: http://localhost:8080/marmotta/resource

@prefix : <http://localhost:8080/marmotta/resource#> .

What then if I have 2 ontologies , one importing the other? They can not have the same baseURI…



Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nl<ma...@tno.nl>

Location<http://www.tno.nl/locaties/DTM>



[cid:image001.gif@01CFE3C4.52353E70]<http://www.tno.nl/>

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.



From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch]
Sent: donderdag 9 oktober 2014 13:18
To: users@marmotta.apache.org
Subject: RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

yes, "resource" is predefined.

See Sebastian answers for more about that.

>>> "Bohms, H.M. (Michel)" <mi...@tno.nl>> 09.10.2014 13:15 >>>
Is “resource” as string predefined?
Or does it actually refer to something like in my case “extension-example.ttl”?

(if it isI loose something in the middle : when I import multiple ontologies they are all in one big db….)



Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nl<ma...@tno.nl>

Location<http://www.tno.nl/locaties/DTM>



[cid:image001.gif@01CFE3C4.52353E70]<http://www.tno.nl/>

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.



From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch]
Sent: donderdag 9 oktober 2014 9:33
To: users@marmotta.apache.org<ma...@marmotta.apache.org>
Subject: RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

I think it is because your real resource URL is not <http://localhost:8080/marmotta/resource/Deck_1>
But it is <http://ont.cbnl.org/cbnl-extension-example.ttl#Deck_1>

Marmotta doesn't handle URL-rewriting. See in my example that I did use the Marmotta's url for my test resources.

Just for a test, you could try to make a little .ttl file with resources as:
<http://localhost:8080/marmotta/<http://localhost:8080/marmotta/resource/Deck_1>resource/Deck1> a <something>...

and this should work.


So, in a real case, you will install Marmotta on a specific domain, as "http://ont.cbnl.org"
Then you need to have your Linked Data resources URL which starts with: "http://ont.cbnl.org<http://ont.cbnl.org/>/resource/"
as for instance <http://ont.cbnl.org<http://ont.cbnl.org/>/resource/Deck1>
or <http://ont.cbnl.org/resource/cbnl-extension-example/Deck1>

Thats how I understand it. The team might give more infos.
Fabian

>>> "Bohms, H.M. (Michel)" <mi...@tno.nl>> 09.10.2014 09:25 >>>
Strange, doesnt work for me:


1.      I have:

2.      [cid:image002.jpg@01CFE3C4.52353E70]
If I know do in browser: http://localhost:8080/marmotta/resource/Deck_1, I get:
[cid:image003.jpg@01CFE3C4.52353E70]
Any tip very much appreciated…Michel




Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nl<ma...@tno.nl>

Location<http://www.tno.nl/locaties/DTM>



[cid:image001.gif@01CFE3C4.52353E70]<http://www.tno.nl/>

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.



From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch]
Sent: woensdag 8 oktober 2014 16:02
To: users@marmotta.apache.org<ma...@marmotta.apache.org>
Subject: RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

Michel,

I access my marmotta server on: "vmhwebsem:8081/"
(I did configure Marmotta/Tomcat to remove the /marmotta part)

So I did create a turtle file:
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<http://vmhwebsem:8081/resource/tstLDRes> a <http://xmlns.com/foaf/0.1/Person>;
rdfs:label "A resource to test Marmotta's Linked Data publishing" .
<http://vmhwebsem:8081/resource/person/tstLDRes2> a <http://xmlns.com/foaf/0.1/Person>;
rdfs:label "A second resource to test Marmotta's Linked Data publishing" .
After loading the file, I could enter the resource's URL in the browser, as:
http://vmhwebsem:8081/resource/tstLDRes
or
http://vmhwebsem:8081/resource/person/tstLDRes2

and the browser was effectively redirected to the corresponding html representation.

Here are a few curl examples:
curl -v -H "Accept: text/turtle" "http://vmhwebsem:8081/resource/tstLDRes"
303 : http://vmhwebsem:8081/meta/text/turtle/tstLDRes

curl -v -H "Accept: text/html" "http://vmhwebsem:8081/resource/tstLDRes"
303 : http://vmhwebsem:8081/meta/text/html/tstLDRes

curl -v -H "Accept: application/rdf+xml" "http://vmhwebsem:8081/resource/tstLDRes"
http://vmhwebsem:8081/meta/application/rdf+xml/tstLDRes

With json -> redirected to jsonLD representation:
curl -v -H "Accept: application/json" "http://vmhwebsem:8081/resource/tstLDRes"
http://vmhwebsem:8081/meta/application/ld+json/tstLDRes
curl -v -H "Accept: application/json" "http://vmhwebsem:8081/meta/application/ld+json/tstLDRes"

hope this helps
Fabian

>>> "Bohms, H.M. (Michel)" <mi...@tno.nl>> 08.10.2014 15:33 >>>
Great that it works that way!
Thx Fabian for reasking this issue, would be good to have extra examples/documentation on this indeed.

Can you give me some simple examples for typical uri to class resources and individuals, guess I making some simple mistakes not getting it to work to my own ontologies and data sets,
Thx a lot! Michel



Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nl<ma...@tno.nl>

Location<http://www.tno.nl/locaties/DTM>



[cid:image001.gif@01CFE3C4.52353E70]<http://www.tno.nl/>

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.



From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch]
Sent: woensdag 8 oktober 2014 15:14
To: users@marmotta.apache.org<ma...@marmotta.apache.org>
Subject: Rép. : Re: How to use Marmotta for Linked data publishing ?

Thank you Sebastian,

Just tried it, it works perfectly.

Before asking here, I did search for information on the official web site and in the wiki, but didn't find the information you gave here.
Is it just that I missed it ? otherwise, I suggest to add that information for other people. It was already a real questionning for me and also Michel.

You ask me "Would a feature that allows automatically rewriting certain URI prefixes be useful to you? " the answer is that I don't have such a need so far. But from my experience with pubby, I guess it could bring some flexibility on the RDF data (not forcing published resources to be defined with http://<server>/<marmotta>/resource/<http://%3cserver%3e/%3cmarmotta%3e/resource/> prefix). But are there real life needs about that ? I mean, in a linked data environment URL needs to be fixed and long lasting, so where does URL rewriting really come into play in such a context ?

And the last question is about LDP: does it mean that LDP is all about handling "containers", but don't say anything about Linked Data publishing (i.e. dereferencing a resource). Thats the conclusion from Michel, and so far it is also mine. But that seems surprising at first glance. In other words, LDP would define how to access and handle a bunch of resources (refering to the container), but not how to access a single resource, is that right ?

Thank you
Fabian

>>> Sebastian Schaffert <se...@gmail.com>> 07.10.2014 12:56 >>>
Hi Fabian,


2014-10-07 8:42 GMT+02:00 Fabian Cretton <Fa...@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<http://%3cserver%3e/%3cmarmotta%3e/resource/%3cresource-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/<http://%3cserver%3e/%3cmarmotta%3e/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<http://%3cserver%3e/%3cmarmotta%3e/resource?uri=%3curi>>, 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<http://%3cserver%3e/%3cmarmotta%3e/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


RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by Fabian Cretton <Fa...@hevs.ch>.
yes, "resource" is predefined.

See Sebastian answers for more about that.

>>> "Bohms, H.M. (Michel)" <mi...@tno.nl> 09.10.2014 13:15 >>>

Is “resource” as string predefined?
Or does it actually refer to something like in my case “extension-example.ttl”?
 
(if it isI loose something in the middle : when I import multiple ontologies they are all in one big db….)
 
 Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural ReliabilityT +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nlLocation

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages. 


 
From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch] 
Sent: donderdag 9 oktober 2014 9:33
To: users@marmotta.apache.org
Subject: RE: Rép. : Re: How to use Marmotta for Linked data publishing ?
 
I think it is because your real resource URL is not <http://localhost:8080/marmotta/resource/Deck_1>
But it is <http://ont.cbnl.org/cbnl-extension-example.ttl#Deck_1>
 
Marmotta doesn't handle URL-rewriting. See in my example that I did use the Marmotta's url for my test resources.
 
Just for a test, you could try to make a little .ttl file with resources as:
<http://localhost:8080/marmotta/resource/Deck1> a <something>...
 
and this should work.
 
 
So, in a real case, you will install Marmotta on a specific domain, as "http://ont.cbnl.org"
Then you need to have your Linked Data resources URL which starts with: "http://ont.cbnl.org/resource/"
as for instance <http://ont.cbnl.org/resource/Deck1>
or <http://ont.cbnl.org/resource/cbnl-extension-example/Deck1>
 
Thats how I understand it. The team might give more infos.
Fabian

>>> "Bohms, H.M. (Michel)" <mi...@tno.nl> 09.10.2014 09:25 >>>
Strange, doesnt work for me:
 
1.      I have:
2.      
If I know do in browser: http://localhost:8080/marmotta/resource/Deck_1, I get:

Any tip very much appreciated…Michel
 
 
 Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural ReliabilityT +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nlLocation

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages. 


 
From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch] 
Sent: woensdag 8 oktober 2014 16:02
To: users@marmotta.apache.org
Subject: RE: Rép. : Re: How to use Marmotta for Linked data publishing ?
 
Michel,
 
I access my marmotta server on: "vmhwebsem:8081/"
(I did configure Marmotta/Tomcat to remove the /marmotta part)
 
So I did create a turtle file:
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<http://vmhwebsem:8081/resource/tstLDRes> a <http://xmlns.com/foaf/0.1/Person>;
rdfs:label "A resource to test Marmotta's Linked Data publishing" .
<http://vmhwebsem:8081/resource/person/tstLDRes2> a <http://xmlns.com/foaf/0.1/Person>;
rdfs:label "A second resource to test Marmotta's Linked Data publishing" .
After loading the file, I could enter the resource's URL in the browser, as:
http://vmhwebsem:8081/resource/tstLDRes
or
http://vmhwebsem:8081/resource/person/tstLDRes2
 
and the browser was effectively redirected to the corresponding html representation.
 
Here are a few curl examples:
curl -v -H "Accept: text/turtle" "http://vmhwebsem:8081/resource/tstLDRes"
303 : http://vmhwebsem:8081/meta/text/turtle/tstLDRes
 
curl -v -H "Accept: text/html" "http://vmhwebsem:8081/resource/tstLDRes"
303 : http://vmhwebsem:8081/meta/text/html/tstLDRes
 
curl -v -H "Accept: application/rdf+xml" "http://vmhwebsem:8081/resource/tstLDRes"
http://vmhwebsem:8081/meta/application/rdf+xml/tstLDRes
 
With json -> redirected to jsonLD representation:
curl -v -H "Accept: application/json" "http://vmhwebsem:8081/resource/tstLDRes"
http://vmhwebsem:8081/meta/application/ld+json/tstLDRes
curl -v -H "Accept: application/json" "http://vmhwebsem:8081/meta/application/ld+json/tstLDRes"
 
hope this helps
Fabian

>>> "Bohms, H.M. (Michel)" <mi...@tno.nl> 08.10.2014 15:33 >>>
Great that it works that way!
Thx Fabian for reasking this issue, would be good to have extra examples/documentation on this indeed.
 
Can you give me some simple examples for typical uri to class resources and individuals, guess I making some simple mistakes not getting it to work to my own ontologies and data sets,
Thx a lot! Michel
 
 Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural ReliabilityT +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nlLocation

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages. 


 
From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch] 
Sent: woensdag 8 oktober 2014 15:14
To: users@marmotta.apache.org
Subject: Rép. : Re: How to use Marmotta for Linked data publishing ?
 
Thank you Sebastian,
 
Just tried it, it works perfectly.
 
Before asking here, I did search for information on the official web site and in the wiki, but didn't find the information you gave here.
Is it just that I missed it ? otherwise, I suggest to add that information for other people. It was already a real questionning for me and also Michel.
 
You ask me "Would a feature that allows automatically rewriting certain URI prefixes be useful to you? " the answer is that I don't have such a need so far. But from my experience with pubby, I guess it could bring some flexibility on the RDF data (not forcing published resources to be defined with http://<server>/<marmotta>/resource/ prefix). But are there real life needs about that ? I mean, in a linked data environment URL needs to be fixed and long lasting, so where does URL rewriting really come into play in such a context ?
 
And the last question is about LDP: does it mean that LDP is all about handling "containers", but don't say anything about Linked Data publishing (i.e. dereferencing a resource). Thats the conclusion from Michel, and so far it is also mine. But that seems surprising at first glance. In other words, LDP would define how to access and handle a bunch of resources (refering to the container), but not how to access a single resource, is that right ?
 
Thank you
Fabian

>>> Sebastian Schaffert <se...@gmail.com> 07.10.2014 12:56 >>>
Hi Fabian, 
 
 
2014-10-07 8:42 GMT+02:00 Fabian Cretton <Fa...@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
 

RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by "Bohms, H.M. (Michel)" <mi...@tno.nl>.
Is “resource” as string predefined?
Or does it actually refer to something like in my case “extension-example.ttl”?

(if it isI loose something in the middle : when I import multiple ontologies they are all in one big db….)



Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nl<ma...@tno.nl>

Location<http://www.tno.nl/locaties/DTM>



[cid:image001.gif@01CFE3C3.1733EAC0]<http://www.tno.nl/>

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.



From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch]
Sent: donderdag 9 oktober 2014 9:33
To: users@marmotta.apache.org
Subject: RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

I think it is because your real resource URL is not <http://localhost:8080/marmotta/resource/Deck_1>
But it is <http://ont.cbnl.org/cbnl-extension-example.ttl#Deck_1>

Marmotta doesn't handle URL-rewriting. See in my example that I did use the Marmotta's url for my test resources.

Just for a test, you could try to make a little .ttl file with resources as:
<http://localhost:8080/marmotta/<http://localhost:8080/marmotta/resource/Deck_1>resource/Deck1> a <something>...

and this should work.


So, in a real case, you will install Marmotta on a specific domain, as "http://ont.cbnl.org"
Then you need to have your Linked Data resources URL which starts with: "http://ont.cbnl.org<http://ont.cbnl.org/>/resource/"
as for instance <http://ont.cbnl.org<http://ont.cbnl.org/>/resource/Deck1>
or <http://ont.cbnl.org/resource/cbnl-extension-example/Deck1>

Thats how I understand it. The team might give more infos.
Fabian

>>> "Bohms, H.M. (Michel)" <mi...@tno.nl>> 09.10.2014 09:25 >>>
Strange, doesnt work for me:


1.      I have:

2.      [cid:image002.jpg@01CFE3C3.1733EAC0]
If I know do in browser: http://localhost:8080/marmotta/resource/Deck_1, I get:
[cid:image003.jpg@01CFE3C3.1733EAC0]
Any tip very much appreciated…Michel




Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nl<ma...@tno.nl>

Location<http://www.tno.nl/locaties/DTM>



[cid:image001.gif@01CFE3C3.1733EAC0]<http://www.tno.nl/>

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.



From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch]
Sent: woensdag 8 oktober 2014 16:02
To: users@marmotta.apache.org<ma...@marmotta.apache.org>
Subject: RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

Michel,

I access my marmotta server on: "vmhwebsem:8081/"
(I did configure Marmotta/Tomcat to remove the /marmotta part)

So I did create a turtle file:
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<http://vmhwebsem:8081/resource/tstLDRes> a <http://xmlns.com/foaf/0.1/Person>;
rdfs:label "A resource to test Marmotta's Linked Data publishing" .
<http://vmhwebsem:8081/resource/person/tstLDRes2> a <http://xmlns.com/foaf/0.1/Person>;
rdfs:label "A second resource to test Marmotta's Linked Data publishing" .
After loading the file, I could enter the resource's URL in the browser, as:
http://vmhwebsem:8081/resource/tstLDRes
or
http://vmhwebsem:8081/resource/person/tstLDRes2

and the browser was effectively redirected to the corresponding html representation.

Here are a few curl examples:
curl -v -H "Accept: text/turtle" "http://vmhwebsem:8081/resource/tstLDRes"
303 : http://vmhwebsem:8081/meta/text/turtle/tstLDRes

curl -v -H "Accept: text/html" "http://vmhwebsem:8081/resource/tstLDRes"
303 : http://vmhwebsem:8081/meta/text/html/tstLDRes

curl -v -H "Accept: application/rdf+xml" "http://vmhwebsem:8081/resource/tstLDRes"
http://vmhwebsem:8081/meta/application/rdf+xml/tstLDRes

With json -> redirected to jsonLD representation:
curl -v -H "Accept: application/json" "http://vmhwebsem:8081/resource/tstLDRes"
http://vmhwebsem:8081/meta/application/ld+json/tstLDRes
curl -v -H "Accept: application/json" "http://vmhwebsem:8081/meta/application/ld+json/tstLDRes"

hope this helps
Fabian

>>> "Bohms, H.M. (Michel)" <mi...@tno.nl>> 08.10.2014 15:33 >>>
Great that it works that way!
Thx Fabian for reasking this issue, would be good to have extra examples/documentation on this indeed.

Can you give me some simple examples for typical uri to class resources and individuals, guess I making some simple mistakes not getting it to work to my own ontologies and data sets,
Thx a lot! Michel



Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nl<ma...@tno.nl>

Location<http://www.tno.nl/locaties/DTM>



[cid:image001.gif@01CFE3C3.1733EAC0]<http://www.tno.nl/>

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.



From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch]
Sent: woensdag 8 oktober 2014 15:14
To: users@marmotta.apache.org<ma...@marmotta.apache.org>
Subject: Rép. : Re: How to use Marmotta for Linked data publishing ?

Thank you Sebastian,

Just tried it, it works perfectly.

Before asking here, I did search for information on the official web site and in the wiki, but didn't find the information you gave here.
Is it just that I missed it ? otherwise, I suggest to add that information for other people. It was already a real questionning for me and also Michel.

You ask me "Would a feature that allows automatically rewriting certain URI prefixes be useful to you? " the answer is that I don't have such a need so far. But from my experience with pubby, I guess it could bring some flexibility on the RDF data (not forcing published resources to be defined with http://<server>/<marmotta>/resource/<http://%3cserver%3e/%3cmarmotta%3e/resource/> prefix). But are there real life needs about that ? I mean, in a linked data environment URL needs to be fixed and long lasting, so where does URL rewriting really come into play in such a context ?

And the last question is about LDP: does it mean that LDP is all about handling "containers", but don't say anything about Linked Data publishing (i.e. dereferencing a resource). Thats the conclusion from Michel, and so far it is also mine. But that seems surprising at first glance. In other words, LDP would define how to access and handle a bunch of resources (refering to the container), but not how to access a single resource, is that right ?

Thank you
Fabian

>>> Sebastian Schaffert <se...@gmail.com>> 07.10.2014 12:56 >>>
Hi Fabian,


2014-10-07 8:42 GMT+02:00 Fabian Cretton <Fa...@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<http://%3cserver%3e/%3cmarmotta%3e/resource/%3cresource-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/<http://%3cserver%3e/%3cmarmotta%3e/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<http://%3cserver%3e/%3cmarmotta%3e/resource?uri=%3curi>>, 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<http://%3cserver%3e/%3cmarmotta%3e/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


RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by "Bohms, H.M. (Michel)" <mi...@tno.nl>.
In my example file I have both T-Boxes and A-Boxes.

An A-Box example in the file is “Bridge_1”.
(which is an individual of the A-box “Bridge” in the same file).

What I would like to do is to be able to get the data via:

"http://dbpedia.org/resource/<http://dbpedia.org/resource/Switzerland>Bridge_1”



So what name space (baseURI) should I define for my file to be able to do that?

Guess I wrongly thought it has to be: "http://dbpedia.org/resource/<http://dbpedia.org/resource/Switzerland>”


From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch]
Sent: vrijdag 10 oktober 2014 10:09
To: users@marmotta.apache.org
Subject: RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

Michel,

Actually I am not really sure what you try to achieve. We talk about Linked Data publishing, right ? So making data from the store accessible via their URI, with content negociation.

I would make a distinction between the ontology (let say T-Box) and the data (A-Box).
As in DBPedia, both have different prefixes:
"http://dbpedia.org/resource/<http://dbpedia.org/resource/Switzerland>" for the A-Box
and for instance "http://dbpedia.org/ontology/"   for the T-Box.

I don't think Marmotta is intended to publich the T-Box on "/resource" eventhoug it is feasible, but it would be misleading I think.
Also, it seems reasonable to publish a T-Box on a "hash URI", as people will want to access the all T-Box and not just one resource.

I think you don't want to assert this: http://localhost:8080/marmotta/resource rdf:type owl:Ontology ;
I don't know how Marmotta handles that, but it seems a wrong assertion.

Taking a much simple exemple, you can declare:
<http://localhost:8080/resource/tstLDRes> a <http://xmlns.com/foaf/0.1/Person>;
rdfs:label "A resource to test Marmotta's Linked Data publishing" .

And then have a "linked data" access to: http://localhost:8080/resource/tstLDRes

If we wanted to handle T-Box, we could create a new Marmotta module, for instance on a "/ontology" web service. That was suggested in the discutions by the Team, and that would be not too complicated to implement.

As an example, we did a little demonstrator for eGov projects, where we use pubby to publish the A-Box, as for instance:
http://logd.ch/eCH-0070/id/10

(here we used 'id' instead of 'resource', as it is also often used, and shorter)

And we did use a tool called "LODE" to publish the .html version of the T-Box, as:
http://logd.ch/voc/service

Hope this helps
Fabian


>>> "Bohms, H.M. (Michel)" <mi...@tno.nl>> 09.10.2014 17:22 >>>

I now imported a file:



# baseURI: http://localhost:8080/marmotta/resource

# imports: http://localhost:8080/marmotta/resource/cbnl-extension.ttl



@prefix : <http://localhost:8080/marmotta/resource#> .

@prefix ext: <http://localhost:8080/marmotta/resource/cbnl-extension.ttl#> .

@prefix owl: <http://www.w3.org/2002/07/owl#> .

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

@prefix unit: <http://qudt.org/vocab/unit#> .

@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .



<http://localhost:8080/marmotta/resource>

  rdf:type owl:Ontology ;

  owl:imports <http://localhost:8080/marmotta/resource/cbnl-extension.ttl> ;

.

:Deck

  rdf:type owl:Class ;

  rdfs:subClassOf owl:Thing ;

.

:Deck_1

  rdf:type :Deck ;



.. I get:



[cid:image001.png@01CFE62E.63A31530]





Must be something small?



Dr. ir. H.M. (Michel) Bohms

Sr. Research Scientist

Structural Reliability

T +31 (0)88 866 31 07

M +31 (0)63 038 12 20

E michel.bohms@tno.nl<ma...@tno.nl>



This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.



-----Original Message-----
From: Sergio Fernández [mailto:wikier@apache.org]
Sent: donderdag 9 oktober 2014 16:33
To: users@marmotta.apache.org<ma...@marmotta.apache.org>
Subject: Re: Rép. : Re: How to use Marmotta for Linked data publishing ?



Hi,



On 09/10/14 09:32, Fabian Cretton wrote:

> I think it is because your real resource URL is not

> <http://localhost:8080/marmotta/resource/Deck_1>

> But it is <http://ont.cbnl.org/cbnl-extension-example.ttl#Deck_1>

> Marmotta doesn't handle URL-rewriting. See in my example that I did

> use the Marmotta's url for my test resources.



then you can alternatively request:



http://localhost:8080/marmotta/resource?uri=http%3A%2F%2Font.cbnl.org%2Fcbnl-extension-example.ttl%23Deck_1



But that's a very basic Linked Data assumption: you can't directly serve resources named with uris you do not control ;-)



I'll try dump to the webpage/wiki some of the hint I'm collecting for the ISWC tutorial. BTW, if someone is attending, you may find it

interesting:



   http://marmotta.apache.org/events/iswc2014



Cheers,



--

Sergio Fernández

Partner Technology Manager

Redlink GmbH

m: +43 660 2747 925

e: sergio.fernandez@redlink.co<ma...@redlink.co>

w: http://redlink.co

RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by Fabian Cretton <Fa...@hevs.ch>.
Michel,

Actually I am not really sure what you try to achieve. We talk about Linked Data publishing, right ? So making data from the store accessible via their URI, with content negociation.

I would make a distinction between the ontology (let say T-Box) and the data (A-Box).
As in DBPedia, both have different prefixes:
"http://dbpedia.org/resource/" for the A-Box
and for instance "http://dbpedia.org/ontology/"   for the T-Box.

I don't think Marmotta is intended to publich the T-Box on "/resource" eventhoug it is feasible, but it would be misleading I think.
Also, it seems reasonable to publish a T-Box on a "hash URI", as people will want to access the all T-Box and not just one resource.

I think you don't want to assert this: http://localhost:8080/marmotta/resource rdf:type owl:Ontology ;
I don't know how Marmotta handles that, but it seems a wrong assertion.

Taking a much simple exemple, you can declare:
<http://localhost:8080/resource/tstLDRes> a <http://xmlns.com/foaf/0.1/Person>;
rdfs:label "A resource to test Marmotta's Linked Data publishing" .

And then have a "linked data" access to: http://localhost:8080/resource/tstLDRes

If we wanted to handle T-Box, we could create a new Marmotta module, for instance on a "/ontology" web service. That was suggested in the discutions by the Team, and that would be not too complicated to implement.

As an example, we did a little demonstrator for eGov projects, where we use pubby to publish the A-Box, as for instance:
http://logd.ch/eCH-0070/id/10

(here we used 'id' instead of 'resource', as it is also often used, and shorter)

And we did use a tool called "LODE" to publish the .html version of the T-Box, as:
http://logd.ch/voc/service

Hope this helps
Fabian


>>> "Bohms, H.M. (Michel)" <mi...@tno.nl> 09.10.2014 17:22 >>>

I now imported a file:
 
# baseURI: http://localhost:8080/marmotta/resource
# imports: http://localhost:8080/marmotta/resource/cbnl-extension.ttl
 
@prefix : <http://localhost:8080/marmotta/resource#> .
@prefix ext: <http://localhost:8080/marmotta/resource/cbnl-extension.ttl#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix unit: <http://qudt.org/vocab/unit#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
 
<http://localhost:8080/marmotta/resource>
  rdf:type owl:Ontology ;
  owl:imports <http://localhost:8080/marmotta/resource/cbnl-extension.ttl> ;
.
:Deck
  rdf:type owl:Class ;
  rdfs:subClassOf owl:Thing ;
.
:Deck_1
  rdf:type :Deck ;
 
.. I get:
 

 
 
Must be something small?
 
Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural Reliability
T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nl
 
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
 
-----Original Message-----
From: Sergio Fernández [mailto:wikier@apache.org] 
Sent: donderdag 9 oktober 2014 16:33
To: users@marmotta.apache.org
Subject: Re: Rép. : Re: How to use Marmotta for Linked data publishing ?
 
Hi,
 
On 09/10/14 09:32, Fabian Cretton wrote:
> I think it is because your real resource URL is not 
> <http://localhost:8080/marmotta/resource/Deck_1>
> But it is <http://ont.cbnl.org/cbnl-extension-example.ttl#Deck_1>
> Marmotta doesn't handle URL-rewriting. See in my example that I did 
> use the Marmotta's url for my test resources.
 
then you can alternatively request:
 
http://localhost:8080/marmotta/resource?uri=http%3A%2F%2Font.cbnl.org%2Fcbnl-extension-example.ttl%23Deck_1
 
But that's a very basic Linked Data assumption: you can't directly serve resources named with uris you do not control ;-)
 
I'll try dump to the webpage/wiki some of the hint I'm collecting for the ISWC tutorial. BTW, if someone is attending, you may find it
interesting:
 
   http://marmotta.apache.org/events/iswc2014
 
Cheers,
 
--
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 660 2747 925
e: sergio.fernandez@redlink.co
w: http://redlink.co

RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by "Bohms, H.M. (Michel)" <mi...@tno.nl>.
That was it! thx

I assume the reverting to:
http://localhost:8080/marmotta/meta/text/html/Deck_1

is the expected behavior..?
are there alternative behaviours (ie by giving  more options in url)?

Thx

From: Sebastian Schaffert [mailto:sebastian.schaffert@gmail.com]
Sent: vrijdag 10 oktober 2014 10:19
To: users@marmotta.apache.org
Subject: Re: Rép. : Re: How to use Marmotta for Linked data publishing ?

Hi Michel,

2014-10-09 17:22 GMT+02:00 Bohms, H.M. (Michel) <mi...@tno.nl>>:

I now imported a file:



# baseURI: http://localhost:8080/marmotta/resource

# imports: http://localhost:8080/marmotta/resource/cbnl-extension.ttl



@prefix : <http://localhost:8080/marmotta/resource#<http://localhost:8080/marmotta/resource>> .

Here is your problem, should be
@prefix : <http://localhost:8080/marmotta/resource/>


In general, be very careful with URIs containing "#", because the "#" is interpreted very often by the client side (i.e. the browser) and not even sent to the server. In that case we have no means of returning the requested data to you.


Greetings,

Sebastian



Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. TNO aanvaardt geen aansprakelijkheid voor de inhoud van deze e-mail, de wijze waarop u deze gebruikt en voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het elektronisch verzenden van berichten.

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.

Re: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by Sebastian Schaffert <se...@gmail.com>.
Hi Michel,

2014-10-09 17:22 GMT+02:00 Bohms, H.M. (Michel) <mi...@tno.nl>:

>  I now imported a file:
>
>
>
> # baseURI: http://localhost:8080/marmotta/resource
>
> # imports: http://localhost:8080/marmotta/resource/cbnl-extension.ttl
>
>
>
> @prefix : <http://localhost:8080/marmotta/resource#> .
>

Here is your problem, should be
@prefix : <http://localhost:8080/marmotta/resource
<http://localhost:8080/marmotta/resource#>/>


In general, be very careful with URIs containing "#", because the "#" is
interpreted very often by the client side (i.e. the browser) and not even
sent to the server. In that case we have no means of returning the
requested data to you.


Greetings,

Sebastian

RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by "Bohms, H.M. (Michel)" <mi...@tno.nl>.
I now imported a file:



# baseURI: http://localhost:8080/marmotta/resource

# imports: http://localhost:8080/marmotta/resource/cbnl-extension.ttl



@prefix : <http://localhost:8080/marmotta/resource#> .

@prefix ext: <http://localhost:8080/marmotta/resource/cbnl-extension.ttl#> .

@prefix owl: <http://www.w3.org/2002/07/owl#> .

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

@prefix unit: <http://qudt.org/vocab/unit#> .

@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .



<http://localhost:8080/marmotta/resource>

  rdf:type owl:Ontology ;

  owl:imports <http://localhost:8080/marmotta/resource/cbnl-extension.ttl> ;

.

:Deck

  rdf:type owl:Class ;

  rdfs:subClassOf owl:Thing ;

.

:Deck_1

  rdf:type :Deck ;



.. I get:



[cid:image001.png@01CFE3E5.8EDDF300]





Must be something small?



Dr. ir. H.M. (Michel) Bohms

Sr. Research Scientist

Structural Reliability

T +31 (0)88 866 31 07

M +31 (0)63 038 12 20

E michel.bohms@tno.nl



This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.



-----Original Message-----
From: Sergio Fernández [mailto:wikier@apache.org]
Sent: donderdag 9 oktober 2014 16:33
To: users@marmotta.apache.org
Subject: Re: Rép. : Re: How to use Marmotta for Linked data publishing ?



Hi,



On 09/10/14 09:32, Fabian Cretton wrote:

> I think it is because your real resource URL is not

> <http://localhost:8080/marmotta/resource/Deck_1>

> But it is <http://ont.cbnl.org/cbnl-extension-example.ttl#Deck_1>

> Marmotta doesn't handle URL-rewriting. See in my example that I did

> use the Marmotta's url for my test resources.



then you can alternatively request:



http://localhost:8080/marmotta/resource?uri=http%3A%2F%2Font.cbnl.org%2Fcbnl-extension-example.ttl%23Deck_1



But that's a very basic Linked Data assumption: you can't directly serve resources named with uris you do not control ;-)



I'll try dump to the webpage/wiki some of the hint I'm collecting for the ISWC tutorial. BTW, if someone is attending, you may find it

interesting:



   http://marmotta.apache.org/events/iswc2014



Cheers,



--

Sergio Fernández

Partner Technology Manager

Redlink GmbH

m: +43 660 2747 925

e: sergio.fernandez@redlink.co<ma...@redlink.co>

w: http://redlink.co

Re: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by Sergio Fernández <wi...@apache.org>.
Hi,

On 09/10/14 09:32, Fabian Cretton wrote:
> I think it is because your real resource URL is not
> <http://localhost:8080/marmotta/resource/Deck_1>
> But it is <http://ont.cbnl.org/cbnl-extension-example.ttl#Deck_1>
> Marmotta doesn't handle URL-rewriting. See in my example that I did use the
> Marmotta's url for my test resources.

then you can alternatively request:

http://localhost:8080/marmotta/resource?uri=http%3A%2F%2Font.cbnl.org%2Fcbnl-extension-example.ttl%23Deck_1

But that's a very basic Linked Data assumption: you can't directly serve 
resources named with uris you do not control ;-)

I'll try dump to the webpage/wiki some of the hint I'm collecting for 
the ISWC tutorial. BTW, if someone is attending, you may find it 
interesting:

   http://marmotta.apache.org/events/iswc2014

Cheers,

-- 
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 660 2747 925
e: sergio.fernandez@redlink.co
w: http://redlink.co

RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by Fabian Cretton <Fa...@hevs.ch>.
I think it is because your real resource URL is not <http://localhost:8080/marmotta/resource/Deck_1>
But it is <http://ont.cbnl.org/cbnl-extension-example.ttl#Deck_1>

Marmotta doesn't handle URL-rewriting. See in my example that I did use the Marmotta's url for my test resources.

Just for a test, you could try to make a little .ttl file with resources as:
<http://localhost:8080/marmotta/resource/Deck1> a <something>...

and this should work.


So, in a real case, you will install Marmotta on a specific domain, as "http://ont.cbnl.org"
Then you need to have your Linked Data resources URL which starts with: "http://ont.cbnl.org/resource/"
as for instance <http://ont.cbnl.org/resource/Deck1>
or <http://ont.cbnl.org/resource/cbnl-extension-example/Deck1>

Thats how I understand it. The team might give more infos.
Fabian

>>> "Bohms, H.M. (Michel)" <mi...@tno.nl> 09.10.2014 09:25 >>>

Strange, doesnt work for me:
 
1.      I have:
2.      
If I know do in browser: http://localhost:8080/marmotta/resource/Deck_1, I get:

Any tip very much appreciated…Michel
 
 
 Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural ReliabilityT +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nlLocation

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages. 


 
From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch] 
Sent: woensdag 8 oktober 2014 16:02
To: users@marmotta.apache.org
Subject: RE: Rép. : Re: How to use Marmotta for Linked data publishing ?
 
Michel,
 
I access my marmotta server on: "vmhwebsem:8081/"
(I did configure Marmotta/Tomcat to remove the /marmotta part)
 
So I did create a turtle file:
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<http://vmhwebsem:8081/resource/tstLDRes> a <http://xmlns.com/foaf/0.1/Person>;
rdfs:label "A resource to test Marmotta's Linked Data publishing" .
<http://vmhwebsem:8081/resource/person/tstLDRes2> a <http://xmlns.com/foaf/0.1/Person>;
rdfs:label "A second resource to test Marmotta's Linked Data publishing" .
After loading the file, I could enter the resource's URL in the browser, as:
http://vmhwebsem:8081/resource/tstLDRes
or
http://vmhwebsem:8081/resource/person/tstLDRes2
 
and the browser was effectively redirected to the corresponding html representation.
 
Here are a few curl examples:
curl -v -H "Accept: text/turtle" "http://vmhwebsem:8081/resource/tstLDRes"
303 : http://vmhwebsem:8081/meta/text/turtle/tstLDRes
 
curl -v -H "Accept: text/html" "http://vmhwebsem:8081/resource/tstLDRes"
303 : http://vmhwebsem:8081/meta/text/html/tstLDRes
 
curl -v -H "Accept: application/rdf+xml" "http://vmhwebsem:8081/resource/tstLDRes"
http://vmhwebsem:8081/meta/application/rdf+xml/tstLDRes
 
With json -> redirected to jsonLD representation:
curl -v -H "Accept: application/json" "http://vmhwebsem:8081/resource/tstLDRes"
http://vmhwebsem:8081/meta/application/ld+json/tstLDRes
curl -v -H "Accept: application/json" "http://vmhwebsem:8081/meta/application/ld+json/tstLDRes"
 
hope this helps
Fabian

>>> "Bohms, H.M. (Michel)" <mi...@tno.nl> 08.10.2014 15:33 >>>
Great that it works that way!
Thx Fabian for reasking this issue, would be good to have extra examples/documentation on this indeed.
 
Can you give me some simple examples for typical uri to class resources and individuals, guess I making some simple mistakes not getting it to work to my own ontologies and data sets,
Thx a lot! Michel
 
 Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural ReliabilityT +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nlLocation

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages. 


 
From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch] 
Sent: woensdag 8 oktober 2014 15:14
To: users@marmotta.apache.org
Subject: Rép. : Re: How to use Marmotta for Linked data publishing ?
 
Thank you Sebastian,
 
Just tried it, it works perfectly.
 
Before asking here, I did search for information on the official web site and in the wiki, but didn't find the information you gave here.
Is it just that I missed it ? otherwise, I suggest to add that information for other people. It was already a real questionning for me and also Michel.
 
You ask me "Would a feature that allows automatically rewriting certain URI prefixes be useful to you? " the answer is that I don't have such a need so far. But from my experience with pubby, I guess it could bring some flexibility on the RDF data (not forcing published resources to be defined with http://<server>/<marmotta>/resource/ prefix). But are there real life needs about that ? I mean, in a linked data environment URL needs to be fixed and long lasting, so where does URL rewriting really come into play in such a context ?
 
And the last question is about LDP: does it mean that LDP is all about handling "containers", but don't say anything about Linked Data publishing (i.e. dereferencing a resource). Thats the conclusion from Michel, and so far it is also mine. But that seems surprising at first glance. In other words, LDP would define how to access and handle a bunch of resources (refering to the container), but not how to access a single resource, is that right ?
 
Thank you
Fabian

>>> Sebastian Schaffert <se...@gmail.com> 07.10.2014 12:56 >>>
Hi Fabian, 
 
 
2014-10-07 8:42 GMT+02:00 Fabian Cretton <Fa...@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
 

RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by "Bohms, H.M. (Michel)" <mi...@tno.nl>.
Strange, doesnt work for me:


1.      I have:

2.      [cid:image001.jpg@01CFE3A2.F84C22A0]
If I know do in browser: http://localhost:8080/marmotta/resource/Deck_1, I get:
[cid:image002.jpg@01CFE3A2.F84C22A0]
Any tip very much appreciated…Michel




Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nl<ma...@tno.nl>

Location<http://www.tno.nl/locaties/DTM>



[cid:image003.gif@01CFE3A2.F84C22A0]<http://www.tno.nl/>

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.



From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch]
Sent: woensdag 8 oktober 2014 16:02
To: users@marmotta.apache.org
Subject: RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

Michel,

I access my marmotta server on: "vmhwebsem:8081/"
(I did configure Marmotta/Tomcat to remove the /marmotta part)

So I did create a turtle file:
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<http://vmhwebsem:8081/resource/tstLDRes> a <http://xmlns.com/foaf/0.1/Person>;
rdfs:label "A resource to test Marmotta's Linked Data publishing" .
<http://vmhwebsem:8081/resource/person/tstLDRes2> a <http://xmlns.com/foaf/0.1/Person>;
rdfs:label "A second resource to test Marmotta's Linked Data publishing" .
After loading the file, I could enter the resource's URL in the browser, as:
http://vmhwebsem:8081/resource/tstLDRes
or
http://vmhwebsem:8081/resource/person/tstLDRes2

and the browser was effectively redirected to the corresponding html representation.

Here are a few curl examples:
curl -v -H "Accept: text/turtle" "http://vmhwebsem:8081/resource/tstLDRes"
303 : http://vmhwebsem:8081/meta/text/turtle/tstLDRes

curl -v -H "Accept: text/html" "http://vmhwebsem:8081/resource/tstLDRes"
303 : http://vmhwebsem:8081/meta/text/html/tstLDRes

curl -v -H "Accept: application/rdf+xml" "http://vmhwebsem:8081/resource/tstLDRes"
http://vmhwebsem:8081/meta/application/rdf+xml/tstLDRes

With json -> redirected to jsonLD representation:
curl -v -H "Accept: application/json" "http://vmhwebsem:8081/resource/tstLDRes"
http://vmhwebsem:8081/meta/application/ld+json/tstLDRes
curl -v -H "Accept: application/json" "http://vmhwebsem:8081/meta/application/ld+json/tstLDRes"

hope this helps
Fabian

>>> "Bohms, H.M. (Michel)" <mi...@tno.nl>> 08.10.2014 15:33 >>>
Great that it works that way!
Thx Fabian for reasking this issue, would be good to have extra examples/documentation on this indeed.

Can you give me some simple examples for typical uri to class resources and individuals, guess I making some simple mistakes not getting it to work to my own ontologies and data sets,
Thx a lot! Michel



Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nl<ma...@tno.nl>

Location<http://www.tno.nl/locaties/DTM>



[cid:image003.gif@01CFE3A2.F84C22A0]<http://www.tno.nl/>

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.



From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch]
Sent: woensdag 8 oktober 2014 15:14
To: users@marmotta.apache.org<ma...@marmotta.apache.org>
Subject: Rép. : Re: How to use Marmotta for Linked data publishing ?

Thank you Sebastian,

Just tried it, it works perfectly.

Before asking here, I did search for information on the official web site and in the wiki, but didn't find the information you gave here.
Is it just that I missed it ? otherwise, I suggest to add that information for other people. It was already a real questionning for me and also Michel.

You ask me "Would a feature that allows automatically rewriting certain URI prefixes be useful to you? " the answer is that I don't have such a need so far. But from my experience with pubby, I guess it could bring some flexibility on the RDF data (not forcing published resources to be defined with http://<server>/<marmotta>/resource/<http://%3cserver%3e/%3cmarmotta%3e/resource/> prefix). But are there real life needs about that ? I mean, in a linked data environment URL needs to be fixed and long lasting, so where does URL rewriting really come into play in such a context ?

And the last question is about LDP: does it mean that LDP is all about handling "containers", but don't say anything about Linked Data publishing (i.e. dereferencing a resource). Thats the conclusion from Michel, and so far it is also mine. But that seems surprising at first glance. In other words, LDP would define how to access and handle a bunch of resources (refering to the container), but not how to access a single resource, is that right ?

Thank you
Fabian

>>> Sebastian Schaffert <se...@gmail.com>> 07.10.2014 12:56 >>>
Hi Fabian,


2014-10-07 8:42 GMT+02:00 Fabian Cretton <Fa...@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<http://%3cserver%3e/%3cmarmotta%3e/resource/%3cresource-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/<http://%3cserver%3e/%3cmarmotta%3e/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<http://%3cserver%3e/%3cmarmotta%3e/resource?uri=%3curi>>, 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<http://%3cserver%3e/%3cmarmotta%3e/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


RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by Fabian Cretton <Fa...@hevs.ch>.
Michel,

I access my marmotta server on: "vmhwebsem:8081/"
(I did configure Marmotta/Tomcat to remove the /marmotta part)

So I did create a turtle file:
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<http://vmhwebsem:8081/resource/tstLDRes> a <http://xmlns.com/foaf/0.1/Person>;
rdfs:label "A resource to test Marmotta's Linked Data publishing" .
<http://vmhwebsem:8081/resource/person/tstLDRes2> a <http://xmlns.com/foaf/0.1/Person>;
rdfs:label "A second resource to test Marmotta's Linked Data publishing" .

After loading the file, I could enter the resource's URL in the browser, as:
http://vmhwebsem:8081/resource/tstLDRes
or
http://vmhwebsem:8081/resource/person/tstLDRes2

and the browser was effectively redirected to the corresponding html representation.

Here are a few curl examples:
curl -v -H "Accept: text/turtle" "http://vmhwebsem:8081/resource/tstLDRes"
303 : http://vmhwebsem:8081/meta/text/turtle/tstLDRes
 
curl -v -H "Accept: text/html" "http://vmhwebsem:8081/resource/tstLDRes"
303 : http://vmhwebsem:8081/meta/text/html/tstLDRes
 
curl -v -H "Accept: application/rdf+xml" "http://vmhwebsem:8081/resource/tstLDRes"
http://vmhwebsem:8081/meta/application/rdf+xml/tstLDRes

With json -> redirected to jsonLD representation:
curl -v -H "Accept: application/json" "http://vmhwebsem:8081/resource/tstLDRes"
http://vmhwebsem:8081/meta/application/ld+json/tstLDRes
curl -v -H "Accept: application/json" "http://vmhwebsem:8081/meta/application/ld+json/tstLDRes"

hope this helps
Fabian

>>> "Bohms, H.M. (Michel)" <mi...@tno.nl> 08.10.2014 15:33 >>>

Great that it works that way!
Thx Fabian for reasking this issue, would be good to have extra examples/documentation on this indeed.
 
Can you give me some simple examples for typical uri to class resources and individuals, guess I making some simple mistakes not getting it to work to my own ontologies and data sets,
Thx a lot! Michel
 
 Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural ReliabilityT +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nlLocation

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages. 


 
From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch] 
Sent: woensdag 8 oktober 2014 15:14
To: users@marmotta.apache.org
Subject: Rép. : Re: How to use Marmotta for Linked data publishing ?
 
Thank you Sebastian,
 
Just tried it, it works perfectly.
 
Before asking here, I did search for information on the official web site and in the wiki, but didn't find the information you gave here.
Is it just that I missed it ? otherwise, I suggest to add that information for other people. It was already a real questionning for me and also Michel.
 
You ask me "Would a feature that allows automatically rewriting certain URI prefixes be useful to you? " the answer is that I don't have such a need so far. But from my experience with pubby, I guess it could bring some flexibility on the RDF data (not forcing published resources to be defined with http://<server>/<marmotta>/resource/ prefix). But are there real life needs about that ? I mean, in a linked data environment URL needs to be fixed and long lasting, so where does URL rewriting really come into play in such a context ?
 
And the last question is about LDP: does it mean that LDP is all about handling "containers", but don't say anything about Linked Data publishing (i.e. dereferencing a resource). Thats the conclusion from Michel, and so far it is also mine. But that seems surprising at first glance. In other words, LDP would define how to access and handle a bunch of resources (refering to the container), but not how to access a single resource, is that right ?
 
Thank you
Fabian

>>> Sebastian Schaffert <se...@gmail.com> 07.10.2014 12:56 >>>
Hi Fabian, 
 
 
2014-10-07 8:42 GMT+02:00 Fabian Cretton <Fa...@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
 

Re: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by Sebastian Schaffert <se...@gmail.com>.
Hi Colin,

2014-10-08 16:01 GMT+02:00 Colin Maudry <co...@maudry.com>:

>  Hi guys,
>
> Short answer: please read how to make cool URIs
> <http://www.w3.org/Provider/Style/URI.html>, which is rather an "how NOT
> to" make uncool URIs.
>
> Here is a long wiki page
> <http://www.w3.org/2011/gld/wiki/223_Best_Practices_URI_Construction>
> that guides you in the construction of URI patterns.
>
> The whole book <http://patterns.dataincubator.org/> is excellent, but here
> <http://patterns.dataincubator.org/book/patterned-uris.html> is the
> chapter about URI patterns.
>
>
The whole topic of how to construct URIs and whether to use "cool URIs" or
not is one of long and still open dispute (there are also many arguments
against cool URIs, for example when the name of something changes, just
consider a person marrying and changing the last name; another example is
that the URI scheme imposes a certain hierarchy on how to structure your
data, would you have a picture of Venice under .../pictures/venice/01 or
.../venice/pictures/01?). Therefore in Marmotta we tried to make as few
assumptions as possibe (the only being the prefix, which is a technical
reason). If you want to, you can even place an Apache HTTPD as proxy in
front of Marmotta and use rewriting rules that map to .../resource?uri=...
to store any URLs you like.



> Your URIs should be made to be valid for centuries. This means there
> shouldn't be any reference to the tool used (/marmotta) in it, since you
> might use "Rabitta" in 2024, a crypto-quantic linked data platform. You
> DON'T want to change your URIs to match the new tool name and take the risk
> of breaking relations that others might have made to your data.
>
> A quick rule is: all the information contained in the URI should be valid
> today and in 500 years. Examples: date of creation, type of thing (an
> 'event' doesn't become a 'person' over time; shouldn't be specific), unique
> identifier.
>

This is a bit in contradiction with the web spirit. It starts with the
problem that I cannot reserve a domain name for 500 years. ;-)

When we are publishing Linked Data, we in many cases simply use UUIDs as
the last part of the URI. They are unique, they are safe, they allow for
data changes, but they are not cool (i.e. not for humans, no semantics
hidden in the URI). It's a matter of philosophy.

Greetings,

Sebastian

Re: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by Colin Maudry <co...@maudry.com>.
Alright then :) It's just that it wasn't clear looking at your 
interesting conversation that included /marmotta in URI patterns.

Please go on :)

Colin

On 10/8/2014 4:05 PM, Fabian Cretton wrote:
> Hi Colin,
> Thanks for the pointers, I am well aware of all that.
> There is no problem to configure Marmotta/Tomcat without the 
> "/marmotta" bit :-)
> Fabian
>
> >>> Colin Maudry <co...@maudry.com> 08.10.2014 16:01 >>>
> Hi guys,
>
> Short answer: please read how to make cool URIs 
> <http://www.w3.org/Provider/Style/URI.html>, which is rather an "how 
> NOT to" make uncool URIs.
>
> Here isa long wiki page 
> <http://www.w3.org/2011/gld/wiki/223_Best_Practices_URI_Construction> 
> that guides you in the construction of URI patterns.
>
> The whole book <http://patterns.dataincubator.org/> is excellent, but 
> here <http://patterns.dataincubator.org/book/patterned-uris.html> is 
> the chapter about URI patterns.
>
> Your URIs should be made to be valid for centuries. This means there 
> shouldn't be any reference to the tool used (/marmotta) in it, since 
> you might use "Rabitta" in 2024, a crypto-quantic linked data 
> platform. You DON'T want to change your URIs to match the new tool 
> name and take the risk of breaking relations that others might have 
> made to your data.
>
> A quick rule is: all the information contained in the URI should be 
> valid today and in 500 years. Examples: date of creation, type of 
> thing (an 'event' doesn't become a 'person' over time; shouldn't be 
> specific), unique identifier.
>
> So, I don't know at which level there should be a translation from the 
> URI as a URL and a URL that Marmotta can process, but for your own 
> good, create cool URIs.
>
> Best regards,
> Colin
>
> On 10/8/2014 3:33 PM, Bohms, H.M. (Michel) wrote:
>> <!--[if mso 9]--> <!--[endif]-->
>>
>> Great that it works that way!
>>
>> Thx Fabian for reasking this issue, would be good to have extra 
>> examples/documentation on this indeed.
>>
>> Can you give me some simple examples for typical uri to class 
>> resources and individuals, guess I making some simple mistakes not 
>> getting it to work to my own ontologies and data sets,
>>
>> Thx a lot! Michel
>>
>>
>> 	
>>
>> Dr. ir. H.M. (Michel) Bohms
>> Sr. Research Scientist
>> Structural Reliability
>>
>> 	
>>
>> T +31 (0)88 866 31 07
>> M +31 (0)63 038 12 20
>> E michel.bohms@tno.nl <ma...@tno.nl>
>>
>> 	
>>
>> Location <http://www.tno.nl/locaties/DTM>
>>
>> <http://www.tno.nl/>
>>
>> This message may contain information that is not intended for you. If 
>> you are not the addressee or if this message was sent to you by 
>> mistake, you are requested to inform the sender and delete the 
>> message. TNO accepts no liability for the content of this e-mail, for 
>> the manner in which you use it and for damage of any kind resulting 
>> from the risks inherent to the electronic transmission of messages.
>>
>> *From:*Fabian Cretton [mailto:Fabian.Cretton@hevs.ch]
>> *Sent:* woensdag 8 oktober 2014 15:14
>> *To:* users@marmotta.apache.org
>> *Subject:* Rép. : Re: How to use Marmotta for Linked data publishing ?
>>
>> Thank you Sebastian,
>>
>> Just tried it, it works perfectly.
>>
>> Before asking here, I did search for information on the official web 
>> site and in the wiki, but didn't find the information you gave here.
>>
>> Is it just that I missed it ? otherwise, I suggest to add that 
>> information for other people. It was already a real questionning for 
>> me and also Michel.
>>
>> You ask me "Would a feature that allows automatically rewriting 
>> certain URI prefixes be useful to you? " the answer is that I don't 
>> have such a need so far. But from my experience with pubby, I guess 
>> it could bring some flexibility on the RDF data (not forcing 
>> published resources to be defined with 
>> http://<server>/<marmotta>/resource/ 
>> <http://%3cserver%3e/%3cmarmotta%3e/resource/>prefix). But are there 
>> real life needs about that ? I mean, in a linked data environment URL 
>> needs to be fixed and long lasting, so where does URL rewriting 
>> really come into play in such a context ?
>>
>> And the last question is about LDP: does it mean that LDP is all 
>> about handling "containers", but don't say anything about Linked Data 
>> publishing (i.e. dereferencing a resource). Thats the conclusion from 
>> Michel, and so far it is also mine. But that seems surprising at 
>> first glance. In other words, LDP would define how to access and 
>> handle a bunch of resources (refering to the container), but not how 
>> to access a single resource, is that right ?
>>
>> Thank you
>>
>> Fabian
>>
>> >>> Sebastian Schaffert <sebastian.schaffert@gmail.com 
>> <ma...@gmail.com>> 07.10.2014 12:56 >>>
>>
>> Hi Fabian,
>>
>> 2014-10-07 8:42 GMT+02:00 Fabian Cretton <Fabian.Cretton@hevs.ch 
>> <ma...@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 
>> <http://%3cserver%3e/%3cmarmotta%3e/resource/%3cresource-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/ 
>> <http://%3cserver%3e/%3cmarmotta%3e/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 
>> <http://%3cserver%3e/%3cmarmotta%3e/resource?uri=%3curi>>, 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 
>> <http://%3cserver%3e/%3cmarmotta%3e/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
>>
>


Re: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by Fabian Cretton <Fa...@hevs.ch>.
Hi Colin,

Thanks for the pointers, I am well aware of all that.

There is no problem to configure Marmotta/Tomcat without the "/marmotta" bit :-)
Fabian

>>> Colin Maudry <co...@maudry.com> 08.10.2014 16:01 >>>
Hi guys,

Short answer: please read how to make cool URIs, which is rather an "how NOT to" make uncool URIs.

Here is a long wiki page that guides you in the construction of URI patterns.

The whole book is excellent, but here is the chapter about URI patterns.

Your URIs should be made to be valid for centuries. This means there shouldn't be any reference to the tool used (/marmotta) in it, since you might use "Rabitta" in 2024, a crypto-quantic linked data platform. You DON'T want to change your URIs to match the new tool name and take the risk of breaking relations that others might have made to your data.

A quick rule is: all the information contained in the URI should be valid today and in 500 years. Examples: date of creation, type of thing (an 'event' doesn't become a 'person' over time; shouldn't be specific), unique identifier.

So, I don't know at which level there should be a translation from the URI as a URL and a URL that Marmotta can process, but for your own good, create cool URIs.

Best regards,
Colin


On 10/8/2014 3:33 PM, Bohms, H.M. (Michel) wrote:

<!--[if mso 9]--> <!--[endif]--> 
Great that it works that way!
Thx Fabian for reasking this issue, would be good to have extra examples/documentation on this indeed.

Can you give me some simple examples for typical uri to class resources and individuals, guess I making some simple mistakes not getting it to work to my own ontologies and data sets,
Thx a lot! Michel

Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural ReliabilityT +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nlLocation

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages. 



From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch] 
Sent: woensdag 8 oktober 2014 15:14
To: users@marmotta.apache.org
Subject: Rép. : Re: How to use Marmotta for Linked data publishing ?

Thank you Sebastian,

Just tried it, it works perfectly.

Before asking here, I did search for information on the official web site and in the wiki, but didn't find the information you gave here.
Is it just that I missed it ? otherwise, I suggest to add that information for other people. It was already a real questionning for me and also Michel.

You ask me "Would a feature that allows automatically rewriting certain URI prefixes be useful to you? " the answer is that I don't have such a need so far. But from my experience with pubby, I guess it could bring some flexibility on the RDF data (not forcing published resources to be defined with http://<server>/<marmotta>/resource/ prefix). But are there real life needs about that ? I mean, in a linked data environment URL needs to be fixed and long lasting, so where does URL rewriting really come into play in such a context ?

And the last question is about LDP: does it mean that LDP is all about handling "containers", but don't say anything about Linked Data publishing (i.e. dereferencing a resource). Thats the conclusion from Michel, and so far it is also mine. But that seems surprising at first glance. In other words, LDP would define how to access and handle a bunch of resources (refering to the container), but not how to access a single resource, is that right ?

Thank you
Fabian

>>> Sebastian Schaffert <se...@gmail.com> 07.10.2014 12:56 >>>
Hi Fabian, 


2014-10-07 8:42 GMT+02:00 Fabian Cretton <Fa...@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

Re: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by Colin Maudry <co...@maudry.com>.
Hi guys,

Short answer: please read how to make cool URIs 
<http://www.w3.org/Provider/Style/URI.html>, which is rather an "how NOT 
to" make uncool URIs.

Here isa long wiki page 
<http://www.w3.org/2011/gld/wiki/223_Best_Practices_URI_Construction> 
that guides you in the construction of URI patterns.

The whole book <http://patterns.dataincubator.org/> is excellent, but 
here <http://patterns.dataincubator.org/book/patterned-uris.html> is the 
chapter about URI patterns.

Your URIs should be made to be valid for centuries. This means there 
shouldn't be any reference to the tool used (/marmotta) in it, since you 
might use "Rabitta" in 2024, a crypto-quantic linked data platform. You 
DON'T want to change your URIs to match the new tool name and take the 
risk of breaking relations that others might have made to your data.

A quick rule is: all the information contained in the URI should be 
valid today and in 500 years. Examples: date of creation, type of thing 
(an 'event' doesn't become a 'person' over time; shouldn't be specific), 
unique identifier.

So, I don't know at which level there should be a translation from the 
URI as a URL and a URL that Marmotta can process, but for your own good, 
create cool URIs.

Best regards,
Colin

On 10/8/2014 3:33 PM, Bohms, H.M. (Michel) wrote:
>
> Great that it works that way!
>
> Thx Fabian for reasking this issue, would be good to have extra 
> examples/documentation on this indeed.
>
> Can you give me some simple examples for typical uri to class 
> resources and individuals, guess I making some simple mistakes not 
> getting it to work to my own ontologies and data sets,
>
> Thx a lot! Michel
>
> 	
>
> Dr. ir. H.M. (Michel) Bohms
> Sr. Research Scientist
> Structural Reliability
>
> 	
>
> T +31 (0)88 866 31 07
> M +31 (0)63 038 12 20
> E michel.bohms@tno.nl <ma...@tno.nl>
>
> 	
>
> Location <http://www.tno.nl/locaties/DTM>
>
> <http://www.tno.nl/>
>
> This message may contain information that is not intended for you. If 
> you are not the addressee or if this message was sent to you by 
> mistake, you are requested to inform the sender and delete the 
> message. TNO accepts no liability for the content of this e-mail, for 
> the manner in which you use it and for damage of any kind resulting 
> from the risks inherent to the electronic transmission of messages.
>
> *From:*Fabian Cretton [mailto:Fabian.Cretton@hevs.ch]
> *Sent:* woensdag 8 oktober 2014 15:14
> *To:* users@marmotta.apache.org
> *Subject:* Rép. : Re: How to use Marmotta for Linked data publishing ?
>
> Thank you Sebastian,
>
> Just tried it, it works perfectly.
>
> Before asking here, I did search for information on the official web 
> site and in the wiki, but didn't find the information you gave here.
>
> Is it just that I missed it ? otherwise, I suggest to add that 
> information for other people. It was already a real questionning for 
> me and also Michel.
>
> You ask me "Would a feature that allows automatically rewriting 
> certain URI prefixes be useful to you? " the answer is that I don't 
> have such a need so far. But from my experience with pubby, I guess it 
> could bring some flexibility on the RDF data (not forcing published 
> resources to be defined with http://<server>/<marmotta>/resource/ 
> <http://%3cserver%3e/%3cmarmotta%3e/resource/>prefix). But are there 
> real life needs about that ? I mean, in a linked data environment URL 
> needs to be fixed and long lasting, so where does URL rewriting really 
> come into play in such a context ?
>
> And the last question is about LDP: does it mean that LDP is all about 
> handling "containers", but don't say anything about Linked Data 
> publishing (i.e. dereferencing a resource). Thats the conclusion from 
> Michel, and so far it is also mine. But that seems surprising at first 
> glance. In other words, LDP would define how to access and handle a 
> bunch of resources (refering to the container), but not how to access 
> a single resource, is that right ?
>
> Thank you
>
> Fabian
>
> >>> Sebastian Schaffert <sebastian.schaffert@gmail.com 
> <ma...@gmail.com>> 07.10.2014 12:56 >>>
>
> Hi Fabian,
>
> 2014-10-07 8:42 GMT+02:00 Fabian Cretton <Fabian.Cretton@hevs.ch 
> <ma...@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 
> <http://%3cserver%3e/%3cmarmotta%3e/resource/%3cresource-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/ 
> <http://%3cserver%3e/%3cmarmotta%3e/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 
> <http://%3cserver%3e/%3cmarmotta%3e/resource?uri=%3curi>>, 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 
> <http://%3cserver%3e/%3cmarmotta%3e/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
>


Re: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by Fabian Cretton <Fa...@hevs.ch>.
Thank you Sergio,
 
but is this reconciliation part of Marmotta ? i.e. is "google refine"
or now "open refine" (with the Deri's RDF extension) included in
Marmotta as it seems it was in LMF ?
 
Fabian

>>> Sergio Fernández<wi...@apache.org> 11.10.2014 09:27 >>>
On 10/10/14 10:26, Fabian Cretton wrote:
> Consulting  https://code.google.com/p/lmf/, it seems that you did
integrate Google Refine to the LMF tool, which seems interesting :-)
> Is it still there in Marmotta ?
> Or more generally, is there any reconciliation possibilities in
marmotta ?

Reconciliation support is based on Apache Stanbol, available in the RDF

Extension >= 0.8.0: http://refine.deri.ie

-- 
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 660 2747 925
e: sergio.fernandez@redlink.co
w: http://redlink.co

Re: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by Sergio Fernández <wi...@apache.org>.
On 10/10/14 10:26, Fabian Cretton wrote:
> Consulting  https://code.google.com/p/lmf/, it seems that you did integrate Google Refine to the LMF tool, which seems interesting :-)
> Is it still there in Marmotta ?
> Or more generally, is there any reconciliation possibilities in marmotta ?

Reconciliation support is based on Apache Stanbol, available in the RDF 
Extension >= 0.8.0: http://refine.deri.ie

-- 
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 660 2747 925
e: sergio.fernandez@redlink.co
w: http://redlink.co

Re: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by Fabian Cretton <Fa...@hevs.ch>.
Thank you for the details Sebastian.
 
Consulting  https://code.google.com/p/lmf/, it seems that you did integrate Google Refine to the LMF tool, which seems interesting :-)
Is it still there in Marmotta ?
Or more generally, is there any reconciliation possibilities in marmotta ?
 
Thanks
Fabian

>>> Sebastian Schaffert <se...@gmail.com> 09.10.2014 10:00 >>>
Hi Michel and Fabian,


2014-10-08 15:33 GMT+02:00 Bohms, H.M. (Michel) <mi...@tno.nl>:




Great that it works that way!
Thx Fabian for reasking this issue, would be good to have extra examples/documentation on this indeed.


There is some documentation on the pre-Apache project page at https://code.google.com/p/lmf/ . We intended to move it already for a long time but never found the chance. Time to fix it ;-)










You ask me "Would a feature that allows automatically rewriting certain URI prefixes be useful to you? " the answer is that I don't have such a need so far. But from my experience with pubby, I guess it could bring some flexibility on the RDF data (not forcing published resources to be defined with http://<server>/<marmotta>/resource/ ( http://%3cserver%3e/%3cmarmotta%3e/resource/ ) prefix). But are there real life needs about that ? I mean, in a linked data environment URL needs to be fixed and long lasting, so where does URL rewriting really come into play in such a context ?



There is a certain scenario where users first create data in some external tool and then only then decide they want to publish it as Linked Data under a certain URL. We've had that problem from time to time and always did a manual fix. But it could of course be done automatically as well. If you don't have such a need, I am happy with it ;-)

BTW, the /resource prefix is there mostly for technical reasons (i.e. being able to distinguish between what is a resource and what is some other page in Marmotta). You can avoid the /resource prefix if you put an Apache HTTPD as proxy and define appropriate rewrite rules to /resource?uri=...








And the last question is about LDP: does it mean that LDP is all about handling "containers", but don't say anything about Linked Data publishing (i.e. dereferencing a resource). Thats the conclusion from Michel, and so far it is also mine. But that seems surprising at first glance. In other words, LDP would define how to access and handle a bunch of resources (refering to the container), but not how to access a single resource, is that right ?



Indeed, the LDP specification does not say much about dereferencing. It is in many parts still a bit underspecified (and in others IMHO a bit overspecified, e.g. enforcing certain vocabularies as system properties). Sergio and Jakob are more experts here, they can help you on this. 

Note that the feature-complete LDP module in Marmotta is separate to the /resource functionality and is new in the current Marmotta development snapshot. We are planning a release for the next days, so if you want to try out these features, maybe it is worthwhile waiting a bit ;-)




Greetings,

Sebastian



Re: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by Sebastian Schaffert <se...@gmail.com>.
Hi Michel and Fabian,


2014-10-08 15:33 GMT+02:00 Bohms, H.M. (Michel) <mi...@tno.nl>:

>   Great that it works that way!
>
> Thx Fabian for reasking this issue, would be good to have extra
> examples/documentation on this indeed.
>

There is some documentation on the pre-Apache project page at
https://code.google.com/p/lmf/ . We intended to move it already for a long
time but never found the chance. Time to fix it ;-)




>
>
>
> You ask me "Would a feature that allows automatically rewriting certain
> URI prefixes be useful to you? " the answer is that I don't have such a
> need so far. But from my experience with pubby, I guess it could bring
> some flexibility on the RDF data (not forcing published resources to be
> defined with http://<server>/<marmotta>/resource/ prefix). But are there
> real life needs about that ? I mean, in a linked data environment URL needs
> to be fixed and long lasting, so where does URL rewriting really come into
> play in such a context ?
>
>
>

There is a certain scenario where users first create data in some external
tool and then only then decide they want to publish it as Linked Data under
a certain URL. We've had that problem from time to time and always did a
manual fix. But it could of course be done automatically as well. If you
don't have such a need, I am happy with it ;-)

BTW, the /resource prefix is there mostly for technical reasons (i.e. being
able to distinguish between what is a resource and what is some other page
in Marmotta). You can avoid the /resource prefix if you put an Apache HTTPD
as proxy and define appropriate rewrite rules to /resource?uri=...




>   And the last question is about LDP: does it mean that LDP is all about
> handling "containers", but don't say anything about Linked Data
> publishing (i.e. dereferencing a resource). Thats the conclusion from
> Michel, and so far it is also mine. But that seems surprising at first
> glance. In other words, LDP would define how to access and handle a bunch
> of resources (refering to the container), but not how to access a single
> resource, is that right ?
>


Indeed, the LDP specification does not say much about dereferencing. It is
in many parts still a bit underspecified (and in others IMHO a bit
overspecified, e.g. enforcing certain vocabularies as system properties).
Sergio and Jakob are more experts here, they can help you on this.

Note that the feature-complete LDP module in Marmotta is separate to the
/resource functionality and is new in the current Marmotta development
snapshot. We are planning a release for the next days, so if you want to
try out these features, maybe it is worthwhile waiting a bit ;-)




Greetings,

Sebastian

RE: Rép. : Re: How to use Marmotta for Linked data publishing ?

Posted by "Bohms, H.M. (Michel)" <mi...@tno.nl>.
Great that it works that way!
Thx Fabian for reasking this issue, would be good to have extra examples/documentation on this indeed.

Can you give me some simple examples for typical uri to class resources and individuals, guess I making some simple mistakes not getting it to work to my own ontologies and data sets,
Thx a lot! Michel



Dr. ir. H.M. (Michel) Bohms
Sr. Research Scientist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bohms@tno.nl<ma...@tno.nl>

Location<http://www.tno.nl/locaties/DTM>



[cid:image001.gif@01CFE30D.3CF1E700]<http://www.tno.nl/>

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.



From: Fabian Cretton [mailto:Fabian.Cretton@hevs.ch]
Sent: woensdag 8 oktober 2014 15:14
To: users@marmotta.apache.org
Subject: Rép. : Re: How to use Marmotta for Linked data publishing ?

Thank you Sebastian,

Just tried it, it works perfectly.

Before asking here, I did search for information on the official web site and in the wiki, but didn't find the information you gave here.
Is it just that I missed it ? otherwise, I suggest to add that information for other people. It was already a real questionning for me and also Michel.

You ask me "Would a feature that allows automatically rewriting certain URI prefixes be useful to you? " the answer is that I don't have such a need so far. But from my experience with pubby, I guess it could bring some flexibility on the RDF data (not forcing published resources to be defined with http://<server>/<marmotta>/resource/<http://%3cserver%3e/%3cmarmotta%3e/resource/> prefix). But are there real life needs about that ? I mean, in a linked data environment URL needs to be fixed and long lasting, so where does URL rewriting really come into play in such a context ?

And the last question is about LDP: does it mean that LDP is all about handling "containers", but don't say anything about Linked Data publishing (i.e. dereferencing a resource). Thats the conclusion from Michel, and so far it is also mine. But that seems surprising at first glance. In other words, LDP would define how to access and handle a bunch of resources (refering to the container), but not how to access a single resource, is that right ?

Thank you
Fabian

>>> Sebastian Schaffert <se...@gmail.com>> 07.10.2014 12:56 >>>
Hi Fabian,


2014-10-07 8:42 GMT+02:00 Fabian Cretton <Fa...@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<http://%3cserver%3e/%3cmarmotta%3e/resource/%3cresource-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/<http://%3cserver%3e/%3cmarmotta%3e/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<http://%3cserver%3e/%3cmarmotta%3e/resource?uri=%3curi>>, 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<http://%3cserver%3e/%3cmarmotta%3e/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