From 19ca238d5d979cd1c57cfcbae75210a34628633f Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Tue, 7 Aug 2012 12:59:42 +0200 Subject: rest_call_errors removed from 4store.rb --- lib/4store.rb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/4store.rb b/lib/4store.rb index 43c4dde..599ff12 100644 --- a/lib/4store.rb +++ b/lib/4store.rb @@ -29,22 +29,22 @@ module OpenTox bad_request_error "'#{mime_type}' is not a supported content type. Please use one of #{@@content_type_formats.join(", ")}." unless @@content_type_formats.include? mime_type or mime_type == "multipart/form-data" bad_request_error "Reqest body empty." unless rdf mime_type = "application/x-turtle" if mime_type == "text/plain" # ntriples is turtle in 4store - begin + #begin RestClient.post File.join(four_store_uri,"data")+"/", :data => rdf, :graph => uri, "mime-type" => mime_type - rescue - rest_call_error $!.message, File.join(four_store_uri,"data")+"/" - end + #rescue + #rest_call_error $!.message, File.join(four_store_uri,"data")+"/" + #end end def self.put uri, rdf, mime_type bad_request_error "'#{mime_type}' is not a supported content type. Please use one of #{@@content_type_formats.join(", ")}." unless @@content_type_formats.include? mime_type bad_request_error "Reqest body empty." unless rdf mime_type = "application/x-turtle" if mime_type == "text/plain" - begin + #begin RestClient.put File.join(four_store_uri,"data",uri), rdf, :content_type => mime_type - rescue - rest_call_error $!.message, File.join(four_store_uri,"data",uri) - end + #rescue + #rest_call_error $!.message, File.join(four_store_uri,"data",uri) + #end end def self.delete uri @@ -91,9 +91,9 @@ module OpenTox # TODO: check if this prevents SPARQL injections bad_request_error "Only SELECT and CONSTRUCT are accepted SPARQL statements." end - rescue - rest_call_error $!.message, sparql_uri - end + #rescue + #rest_call_error $!.message, sparql_uri + #end def self.klass RDF::OT[SERVICE.capitalize] -- cgit v1.2.3