diff options
author | Christoph Helma <helma@in-silico.ch> | 2012-03-08 15:23:43 +0000 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2012-03-08 15:23:43 +0000 |
commit | 63fcd8f8feed58af4b1e1ff0e5fdaa09791c9596 (patch) | |
tree | 97103c785013abd8fe2b3798f73ebec4bcb9e885 /lib/opentox-client.rb | |
parent | 2f6d5c75fc1fece5fc10cc7c45ad59cf6b820d64 (diff) |
improved integration of error reports, call stack added as errorDetails
Diffstat (limited to 'lib/opentox-client.rb')
-rw-r--r-- | lib/opentox-client.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/opentox-client.rb b/lib/opentox-client.rb index a587aa5..7d9329d 100644 --- a/lib/opentox-client.rb +++ b/lib/opentox-client.rb @@ -6,6 +6,22 @@ require "rest-client" require 'uri' require 'yaml' require 'logger' + +# define constants and global variables +#TODO: switch services to 1.2 +RDF::OT = RDF::Vocabulary.new 'http://www.opentox.org/api/1.2#' +RDF::OT1 = RDF::Vocabulary.new 'http://www.opentox.org/api/1.1#' +RDF::OTA = RDF::Vocabulary.new 'http://www.opentox.org/algorithmTypes.owl#' + +#CLASSES = ["Compound", "Feature", "Dataset", "Algorithm", "Model", "Validation", "Task", "ErrorReport", "Investigation"] +CLASSES = ["Compound", "Feature", "Dataset", "Algorithm", "Model", "Validation", "Task", "Investigation"] +RDF_FORMATS = [:rdfxml,:ntriples,:turtle] +$default_rdf = "application/rdf+xml" + +# Regular expressions for parsing classification data +TRUE_REGEXP = /^(true|active|1|1.0|tox|activating|carcinogen|mutagenic)$/i +FALSE_REGEXP = /^(false|inactive|0|0.0|low tox|deactivating|non-carcinogen|non-mutagenic)$/i + require File.join(File.dirname(__FILE__),"overwrite.rb") require File.join(File.dirname(__FILE__),"error.rb") require File.join(File.dirname(__FILE__),"rest-client-wrapper.rb") |