diff options
author | Christoph Helma <helma@in-silico.de> | 2010-02-08 10:23:33 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.de> | 2010-02-08 10:23:33 +0100 |
commit | 499b05d3d949b2b53b4411d28779d9155cf5bf5e (patch) | |
tree | 0e305f1df57e4ac7fae7353dce259adf3f010a85 | |
parent | 96acb35b4357ee4094c2f54384f200b5533d8ad9 (diff) |
started to track tasks from model
-rw-r--r-- | lib/dataset.rb | 2 | ||||
-rw-r--r-- | lib/model.rb | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/dataset.rb b/lib/dataset.rb index 0a49e87..bd523a3 100644 --- a/lib/dataset.rb +++ b/lib/dataset.rb @@ -87,7 +87,7 @@ module OpenTox def self.find(uri) dataset = Dataset.new data = `curl "#{uri}"` - #data = RestClient.get uri, :accept => 'application/rdf+xml' # unclear why this does not work for complex uris, Dataset.find works from irb + #data = RestClient.get(uri, :accept => 'application/rdf+xml') # unclear why this does not work for complex uris, Dataset.find works from irb dataset.rdf = data dataset end diff --git a/lib/model.rb b/lib/model.rb index bd9d546..a585b59 100644 --- a/lib/model.rb +++ b/lib/model.rb @@ -50,6 +50,14 @@ module OpenTox RestClient.post(@@config[:services]["opentox-model"], data, :content_type => "application/x-yaml").to_s end +# def self.create(task) +# @uri = RestClient.post(@@config[:services]["opentox-model"], :task_uri => task.uri) +# end + +# def yaml=(data) +# RestClient.put(@@uri, data, :content_type => "application/x-yaml").to_s +# end + def endpoint YAML.load(RestClient.get(uri))[:endpoint] end |