From 63fcd8f8feed58af4b1e1ff0e5fdaa09791c9596 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 8 Mar 2012 15:23:43 +0000 Subject: improved integration of error reports, call stack added as errorDetails --- lib/opentox-client.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib/opentox-client.rb') 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") -- cgit v1.2.3