diff options
author | Christoph Helma <helma@in-silico.ch> | 2012-05-09 17:17:47 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2012-05-09 17:17:47 +0200 |
commit | ec48b70d5af790b61203e694f34aa8cadfaf6725 (patch) | |
tree | 61e030c4c6478af4a90e96d1b2fb292453928c56 | |
parent | 3712549a610e7d028d66edb023e2e84717fd5fe6 (diff) |
post to service_uri fixed
-rw-r--r-- | lib/4store.rb | 1 | ||||
-rw-r--r-- | lib/opentox.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/4store.rb b/lib/4store.rb index 5ccc8a2..f2e3fcd 100644 --- a/lib/4store.rb +++ b/lib/4store.rb @@ -122,6 +122,7 @@ module OpenTox end def self.available? uri + #sparql = "SELECT DISTINCT ?s WHERE {GRAPH <#{uri}> {?s ?p ?o} }" sparql = "SELECT DISTINCT ?s WHERE {GRAPH <#{uri}> {?s <#{RDF.type}> <#{klass}>} }" r = query(sparql, nil) r.size == 1 and r.first == uri diff --git a/lib/opentox.rb b/lib/opentox.rb index f3765d6..31a6e82 100644 --- a/lib/opentox.rb +++ b/lib/opentox.rb @@ -64,7 +64,7 @@ module OpenTox # Create a new resource post "/#{SERVICE}/?" do uri = uri("/#{SERVICE}/#{SecureRandom.uuid}") - FourStore.post(uri, @body, @content_type) + FourStore.put(uri, @body, @content_type) response['Content-Type'] = "text/uri-list" uri end |