summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2012-08-07 12:59:42 +0200
committerChristoph Helma <helma@in-silico.ch>2012-08-07 12:59:42 +0200
commit19ca238d5d979cd1c57cfcbae75210a34628633f (patch)
treee3763270c6aa8adaa7a73732ea97a357545636b4
parente6305773737339f05d4688472557b9412a514074 (diff)
rest_call_errors removed from 4store.rb
-rw-r--r--lib/4store.rb22
1 files 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]