Thoughts on how to describe a PURL-​like service in RDF

Prob­lem: you can add (POST) any con­tent to Talis Con­tent­box but you can­not provide under which URI will end up. The URI is gen­er­ated and it looks like http://​api​.talis​.com/​s​t​o​r​e​s​/​l​g​r​i​d​i​n​o​c​-​d​e​v​1​/​i​t​e​m​s​/​67704​c​3​e​-​6786 – 4223-​8701-​db4a493e0757

A PURL–like ser­vice would be use­ful and easy to describe in RDF (stored and query-​able via Metabox), dis­cuss­ing it on #talis, an example came up:

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

<http://dannyayers.com/misc/foaf/foaf>
	a  :HTTPRedirection ;
	:statusCode  "301"^^<http://www.w3.org/2001/XMLSchema#int> ;
	:target  <http://dannyayers.com/me> .

I was think­ing along the same idea but using the HTTP-​in-​RDF vocab­u­lary, which would allow to express even more head­ers (i.e. ETag, etc.), roughly it may look like this:

@prefix http: <http://www.w3.org/2006/http#>
@prefix header: <http://www.w3.org/2006/http-header#>

<http://dannyayers.com/misc/foaf/foaf>  http:response  [
	http:responseCode http:301 ;
	http:header  [
		a http:MessageHeader ;
		http:fieldName header:location ;
		http:fieldValue <http://dannyayers.com/me>
	] ;
] .

For a trans­par­ent redir­ec­tion (proxy style), it may look like

@prefix http: <http://www.w3.org/2006/http#>
@prefix header: <http://www.w3.org/2006/http-header#>

<http://example.com/lorem> http:response  [
	http:responseCode http:200 ;
	http:body <http://api.talis.com/stores/lgridinoc-dev1/items/67704c3e-6786-4223-8701-db4a493e0757> ;
	http:header  [
		a http:MessageHeader ;
		http:fieldName header:etag ;
		http:fieldValue "4a13d3d84bd9"
	] ;
] .