diff options
author | Christoph Helma <helma@in-silico.de> | 2010-03-16 17:35:34 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.de> | 2010-03-16 17:35:34 +0100 |
commit | 08fed3677d1af954d668202cfaa4781997630168 (patch) | |
tree | cc59b3f4aac4e0bbbf4acff3a71dde706262afba | |
parent | d0bcff7c2fbc990afda42fee4f121bfa81f9c019 (diff) |
OWL-DL export added
-rw-r--r-- | features/step_definitions/lazar_steps.rb | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/features/step_definitions/lazar_steps.rb b/features/step_definitions/lazar_steps.rb index bc39705..c05c07f 100644 --- a/features/step_definitions/lazar_steps.rb +++ b/features/step_definitions/lazar_steps.rb @@ -11,26 +11,9 @@ end Then /^the model should predict (.*) for (.*)$/ do |activity,smiles| compound_uri = OpenTox::Compound.new(:smiles => smiles).uri - puts @uri - puts compound_uri - prediction = `curl -X POST -d 'compound_uri=#{compound_uri}' -H 'Accept:application/x-yaml' #{@uri}` - #resource = RestClient::Resource.new(@uri, :user => @@users[:users].keys[0], :password => @@users[:users].values[0], :accept => "application/x-yaml") - #prediction = resource.post :compound_uri => compound_uri - p = YAML.load(prediction) - classification = p[compound_uri][@feature_uri][:lazar_prediction][:classification] -=begin - model = Redland::Model.new Redland::MemoryStore.new - parser = Redland::Parser.new - parser.parse_string_into_model(model,prediction_rdf,'/') - - puts prediction_rdf - model.subjects(RDF['type'], OT['FeatureValue']).each do |v| - feature = model.object(v,OT['feature']) - feature_name = model.object(feature,DC['title']).to_s - prediction = model.object(v,OT['value']).to_s if feature_name.match(/classification/) - end -=end - puts classification + prediction = YAML.load(`curl -X POST -d 'compound_uri=#{compound_uri}' -H 'Accept:application/x-yaml' #{@uri}`) + classification = prediction.data[compound_uri].first.values.first[:classification] + #puts classification assert_equal activity.to_s, classification.to_s end |