Hi,I have found an interesting ontology for HTTP called "Http in RDF". It is being developed with
some interesting use cases in mind:
- Reporting test results - Conformance claims - Developing Web Apps http://www.w3.org/TR/HTTP-in-RDF/This could be used in the case of RESTlets to log all information about connections into an RDF database, which could then be queried using SPARQL, or used in other ways... It can also be interesting just to look
at the model being used here.The ontology is pure RDF which means that relations are very flexible. It is possible for example for relations to point to literals just as easily as it is for them to objects point to objects. Clearly for particular applications it would help to use the ontology in a more OWL-DL like manner, which would fit java use better, and perhaps even
be more efficient for DB storage.What do the resulting relations look like? Here is an example I put together to help me grok it.
If I run the following curl [EMAIL PROTECTED]:0$ curl -I http://xmlns.com/foaf/0.1/knows --trace-ascii I get the following trace
== Info: About to connect() to xmlns.com port 80 (#0) == Info: Trying 208.113.134.174... == Info: connected == Info: Connected to xmlns.com (208.113.134.174) port 80 (#0) => Send header, 155 bytes (0x9b) 0000: HEAD /foaf/0.1/knows HTTP/1.1 001f: User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 005f: OpenSSL/0.9.7l zlib/1.2.3 007b: Host: xmlns.com 008c: Accept: */* 0099: <= Recv header, 24 bytes (0x18) 0000: HTTP/1.1 303 See Other <= Recv header, 37 bytes (0x25) 0000: Date: Wed, 21 Nov 2007 00:14:38 GMT <= Recv header, 136 bytes (0x88) 0000: Server: Apache/1.3.37 (Unix) mod_throttle/3.1.2 DAV/1.0.3 mod_fa 0040: stcgi/2.4.2 mod_gzip/1.3.26.1a PHP/4.4.7 mod_ssl/2.8.22 OpenSSL/ 0080: 0.9.7e <= Recv header, 39 bytes (0x27) 0000: Location: http://xmlns.com/foaf/spec/ <= Recv header, 45 bytes (0x2d) 0000: Content-Type: text/html; charset=iso-8859-1 <= Recv header, 2 bytes (0x2) 0000: == Info: Connection #0 to host xmlns.com left intact == Info: Closing connection #0
which would result in the following graph in N3 @prefix http: <http://www.w3.org/2006/http#> . @prefix http-header: <http://www.w3.org/2006/http-header#> . _:r1 a http:HeadRequest; http:abs_path "/foaf/0.1/knows"; http:version "1.1"; http:header [ http:fieldName http-header:User-Agent;http:fieldValue "curl/7.16.3 (powerpc-apple- darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3" ];
http:header [ http:fieldName http-header:Host;
http:fieldValue "xmlns.com" ];
http:header [ http:fieldName http-header:Accept;
http:fieldValue "*/*" ];
http:response [ http:version "1.1";
http:responseCode http:303;
http:header [ http:fieldName http-header:Date;
http:fieldValue "Wed, 21 Nov 2007
00:14:38 GMT" ];
http:header [ http:fieldName http-header:Server;
http:fieldValue "Apache/1.3.37
(Unix) mod_throttle/3.1.2 DAV/1.0.3 mod_fastcgi/2.4.2 mod_gzip/
1.3.26.1a PHP/4.4.7 mod_ssl/2.8.22 OpenSSL/0.9.7e" ];
http:header [ http:fieldName http-header:Location;
http:fieldValue "http://xmlns.com/foaf/spec/
" ];
http:header [ http:fieldName http-header:Content-
Type;
http:fieldValue [ http:elementName
"text/html";
http:param
[ http:paramName "charset";
http:paramValue "iso-8859-1" ]
]
]
] .
Notice that the above does not tell us what the request was issued
against. So one has to link the
request to the connection it is part of _:c1 a http:Connection; http:connectionAuthority "xmlns.com:80"; http:request _:r1 . If we wanted to follow up with this with a new request to http://xmlns.com/foaf/spec/ then we would send another request, perhaps using the same connection _:c1 http:request [ a http:GetRequest; http:abs_path "/foaf/0.1/knows"; http:version "1.1"; # etc...http:response [ http:body <file:///cache/sdfsdfs.rdf >;
] .
So it is clear from the above that we have a vocabulary here that is
very close to the mechanics
of HTTP. It may be helpful to have a few relations a little higher in
the stack of abstractions to link
the resource <http://xmlns.com/foaf/0.1/knows> to its representationsAnyway, any thoughts on how close this model is to the Restlets model? Does it help? Using @rdf annotations from so(m)mer (https://sommer.dev.java.net) one may even be able to link the two models
quite easily .
Henry
Ps. The above may look very verbose, but remember that URLs are
pointers, and so every use of a URL can be
condensed down to 1 pointer. Home page: http://bblfish.net/ Sun Blog: http://blogs.sun.com/bblfish/ Foaf name: http://bblfish.net/people/henry/card#me
smime.p7s
Description: S/MIME cryptographic signature

