From 506952dff164c3535ece28859778260f69d748fa Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Tue, 16 Mar 2010 17:35:34 +0100 Subject: OWL-DL export added --- application.rb | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'application.rb') diff --git a/application.rb b/application.rb index b43b11f..14c4aa6 100644 --- a/application.rb +++ b/application.rb @@ -21,23 +21,6 @@ get '/?' do # get index of models Model.all.collect{|m| m.uri}.join("\n") + "\n" end -get '/:id/?' do - model = Model.get(params[:id]) - halt 404, "Model #{uri} not found." unless model - accept = request.env['HTTP_ACCEPT'] - accept = "application/rdf+xml" if accept == '*/*' or accept =~ /html/ or accept == '' or accept.nil? - case accept - when "application/rdf+xml" - response['Content-Type'] = 'application/rdf+xml' - model.owl - when /yaml/ - response['Content-Type'] = 'application/x-yaml' - model.yaml - else - halt 400, "Unsupported MIME type '#{accept}'" - end -end - delete '/:id/?' do begin Model.get(params[:id]).destroy! -- cgit v1.2.3