From 2aa0cf90210d179f802c6755298217380543b70c Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 18 Jul 2012 19:20:38 +0200 Subject: toxbank policy tests pass --- lib/opentox.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/opentox.rb') 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 -- cgit v1.2.3