Content negotiation helps to represent a resource at the same URL in different ways considering the capabilities of the requesting user agent. It allows user agents to choose between several representations of a resource by giving an appropriate MIME type in the HTTP-Accept-header.
Browsers typically accept MIME types of text/html to get some human readable representation. A semantic web application, though, might prefer to get a representation of the resource in RDF and thus accepts only application/rdf+xml. In BibSonomy we have added this behaviour to URLs representing particular resources - i.e., a single bookmark or publication reference (which may be represented by several posts). You can access this feature by prepending the /url/ and /bibtex/ URLs with the prefix "/uri/", e.g.,
http://www.bibsonomy.org/uri/url/d1bb7b3f6cafafa7b418f9f356ff2e83
or
http://www.bibsonomy.org/uri/bibtex/2b8b87c78e9e27a44aacde0402c642bff
Depending on the Accept-header of your user agent you get a redirect to the appropriate representation of those resources. You can read some more information on this in the BibSonomy help system.
Hiển thị các bài đăng có nhãn content negotiation. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn content negotiation. Hiển thị tất cả bài đăng
Chủ Nhật, 24 tháng 11, 2013
Chủ Nhật, 3 tháng 11, 2013
Feature of the Week: Improved Content-Negotiation Capabilities
Today I describe a rather technical feature of BibSonomy that is important for programmers and in particular for Semantic Web enthusiasts.
As I already mentioned in my post from EKAW 2010, we are constantly trying to improve BibSonomy's integration into the Linked Data Cloud. In the 2.0.14 release of BibSonomy a new content negotiation mechanism was implemented that augments our first implementation from 2007.
Instead of using the special /uri/ prefix, we now perform content negotiation on all URLs BibSonomy serves. Depending on the HTTP Accept header of your client, you are redirected (with the HTTP status code 303 See Other) to a view representing the requested resource(s) in a corresponding format. The following media types are currently supported:
In particular the application/rdf+xml media type is important for BibSonomy's integration in the Linked Data Cloud. There are still some issues we have to fix, e.g., proper representation of author order or the vocabulary to represent tagging information (e.g., using commontag.org in favour of/addition to the RSS taxonomy module). Therefore, many thanks to Sebastian Tramp and Pascal Hitzler for there helpful comments.
Finally: Please note that content negotiation works for all URLs, even when it currently does not really make sense. E.g., when you request the /login page in application/rdf+xml, you get a redirect to /burst/login. Since this page does not exist, you get a 404 Not Found error.
As I already mentioned in my post from EKAW 2010, we are constantly trying to improve BibSonomy's integration into the Linked Data Cloud. In the 2.0.14 release of BibSonomy a new content negotiation mechanism was implemented that augments our first implementation from 2007.
Instead of using the special /uri/ prefix, we now perform content negotiation on all URLs BibSonomy serves. Depending on the HTTP Accept header of your client, you are redirected (with the HTTP status code 303 See Other) to a view representing the requested resource(s) in a corresponding format. The following media types are currently supported:
- application/rdf+xml
- RDF output according to the BuRST specification. This is basically a combination of the RSS and SWRC schema to describe publication references. Hence, currently only the publication posts are returned.
- application/json
- All posts (bookmarks and publications) in JSON format. This is a lightweight JavaScript data structure.
- text/csv
- All posts (bookmarks and publications) as comma separated values (CSV).
- text/x-bibtex
- Publications in BibTeX format.
In particular the application/rdf+xml media type is important for BibSonomy's integration in the Linked Data Cloud. There are still some issues we have to fix, e.g., proper representation of author order or the vocabulary to represent tagging information (e.g., using commontag.org in favour of/addition to the RSS taxonomy module). Therefore, many thanks to Sebastian Tramp and Pascal Hitzler for there helpful comments.
Finally: Please note that content negotiation works for all URLs, even when it currently does not really make sense. E.g., when you request the /login page in application/rdf+xml, you get a redirect to /burst/login. Since this page does not exist, you get a 404 Not Found error.
Đăng ký:
Bài đăng (Atom)