diff options
author | Christoph Helma <helma@in-silico.ch> | 2012-07-18 19:20:38 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2012-07-18 19:20:38 +0200 |
commit | 2aa0cf90210d179f802c6755298217380543b70c (patch) | |
tree | 4231fb729973a040305c941f0af99deb39a877cf /lib/opentox.rb | |
parent | b3d32c18947b659dfa98b066931fb8912f7dc102 (diff) |
toxbank policy tests pass
Diffstat (limited to 'lib/opentox.rb')
-rw-r--r-- | lib/opentox.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/opentox.rb b/lib/opentox.rb index 825531c..800874f 100644 --- a/lib/opentox.rb +++ b/lib/opentox.rb @@ -60,14 +60,14 @@ module OpenTox end # Get object from webservice - def get - # TODO: RDFXML - response = RestClientWrapper.get(@uri,{},{:accept => "text/plain", :subjectid => @subjectid}) + def get mime_type="text/plain" + response = RestClientWrapper.get(@uri,{},{:accept => mime_type, :subjectid => @subjectid}) if URI.task?(response) wait_for_task response - response = RestClientWrapper.get(t.resultURI,{},{:accept => "text/plain", :subjectid => @subjectid}) + response = RestClientWrapper.get(t.resultURI,{},{:accept => mime_type, :subjectid => @subjectid}) end - parse_ntriples response + parse_ntriples response if mime_type == "text/plain" + parse_rdfxml response if mime_type == "application/rdf+xml" end # Post object to webservice |