summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.de>2009-12-19 13:32:53 +0100
committerChristoph Helma <helma@in-silico.de>2009-12-19 13:32:53 +0100
commit777dc162d4058764a652f66bb61e141b6b5b1345 (patch)
tree81a615df2716990f587fe38ff57acf42f568dc7d
parent89a053cb15ca5b7c50f39fe29fe052bf7e5fe436 (diff)
OWL-DL fixed for dataset and fminer
-rw-r--r--application.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/application.rb b/application.rb
index e89a39f..6032bfa 100644
--- a/application.rb
+++ b/application.rb
@@ -2,9 +2,6 @@ require 'rubygems'
gem 'opentox-ruby-api-wrapper', '~>1.2'
require 'opentox-ruby-api-wrapper'
-#mime :rdf, "application/rdf+xml"
-#set :default_content, :rdf
-
## REST API
get '/?' do
@@ -16,10 +13,9 @@ get '/:id/?' do
path = File.join("datasets",params[:id] + ".rdf")
halt 404, "Dataset #{uri} not found." unless File.exists? path
accept = request.env['HTTP_ACCEPT']
- puts accept
accept = 'application/rdf+xml' if accept == '*/*' or accept == '' or accept.nil?
case accept
- when /rdf/
+ when /rdf/ # redland sends text/rdf instead of application/rdf+xml
send_file path
when /yaml/
OpenTox::Dataset.find(uri).to_yaml