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)" <michel.bo...@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.cret...@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)" <michel.bo...@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.cret...@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 <sebastian.schaff...@gmail.com> 07.10.2014 12:56 >>>
Hi Fabian, 
 
 
2014-10-07 8:42 GMT+02:00 Fabian Cretton <fabian.cret...@hevs.ch>:
Hi,
How can Marmotta be used for linked data publishing (à la Pubby), thus handling 
content negociation when querying (dereferencing) a resource hosted by Marmotta.
 
Marmotta does content negotiation automatically if you access 
http://<server>/<marmotta>/resource/<resource-id>. However, unlike Pubby, 
Marmotta is not a wrapper around existing RDF data but a native Linked Data 
server, i.e. it does no URI rewriting. So you would need to make sure your 
resources already have resolvable URIs that point to the Marmotta server (i.e. 
starting with the http://<server>/<marmotta>/resource/ prefix). In that case, 
Marmotta not only supports content negotiation for GET requests, but also for 
POST (create resource) and PUT (upload RDF data to resource).
 
If you use URIs that do not resolve to the Marmotta server, you can still use 
http://<server>/<marmotta>/resource?uri=<uri>, but this is just for 
convenience, not really Linked Data.
 
Would a feature that allows automatically rewriting certain URI prefixes be 
useful to you? We were discussing this some time ago, but for the moment put it 
on hold.
 
This question is related to [1] where I didn't find the answers, I think Michel 
was looking for the same information.
If I take a DBPedia example, a client can ask for 
http://dbpedia.org/resource/Germany
and depending on the requested format, get an html representation of the 
resource http://dbpedia.org/page/Germany
or the RDF representation http://dbpedia.org/data/Germany
 
Works in Marmotta as well.
I did set up such a behavior using Pubby in the past, but I would like to do 
the same using Marmotta instead. Also I am not familiar with LDP yet, but 
started reading about it.
If such linked data publishing is possible, is it a basic Marmotta feature 
(will Marmotta publish any resource of its store as linked data), or does it 
rely on the LDP implementation (only LDPR will thus be published) ?
 
All resources matching the Marmotta resource prefix will be published. 
Technically, there is simply a webservice listening at 
http://<server>/<marmotta>/resource and anything on the path below (or 
optionally the uri= query parameter) that will serve a client Linked Data 
conforming data.
 
As Michel asked in [1], is there any example about how to set up such a 
behaviour ?
This feature being certainly different from the "/marmotta/resource?uri=" web 
service.
 
You don't need to use "/marmotta/resource?uri" if the resource URI matches the 
correct prefix. ;-)
Thank you for any pointer.
Fabian
[1] 
http://mail-archives.apache.org/mod_mbox/marmotta-users/201409.mbox/%3C730127A8D040CB4A976BE07F089997068BCC2411%40EXC-MBX03.tsn.tno.nl%3E
 

Reply via email to