diff options
author | Christoph Helma <helma@in-silico.ch> | 2012-02-20 16:16:56 +0000 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2012-02-20 16:16:56 +0000 |
commit | b6134b992fde8784c3556fbca32925e721700d32 (patch) | |
tree | fcbac8c01883209aa451282f37592ce4f5794038 /lib/opentox.rb | |
parent | 64135ae320998a836725786f95a4efd3b63f585c (diff) |
task catches and reports errors (some dataset tests still fail)
Diffstat (limited to 'lib/opentox.rb')
-rw-r--r-- | lib/opentox.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/opentox.rb b/lib/opentox.rb index ab5c95f..01de3e7 100644 --- a/lib/opentox.rb +++ b/lib/opentox.rb @@ -13,7 +13,8 @@ class String def to_object # TODO: fix, this is unsafe self =~ /dataset/ ? uri = File.join(self.chomp,"metadata") : uri = self.chomp - raise "#{uri} is not a valid URI." unless RDF::URI.new(uri).uri? + #raise "#{uri} is not a valid URI." unless RDF::URI.new(uri).uri? + raise "#{uri} is not a valid URI." unless uri.uri? RDF::Reader.open(uri) do |reader| reader.each_statement do |statement| if statement.predicate == RDF.type and statement.subject == uri @@ -82,7 +83,10 @@ module OpenTox if reload @metadata = {} begin - RDF::Reader.open(@uri) do |reader| + #puts self.class + #self.kind_of?(OpenTox::Dataset) ? uri = URI.join(@uri,"metadata") : uri = @uri + #$logger.debug uri + RDF::Reader.open(uri) do |reader| reader.each_statement do |statement| @metadata[statement.predicate] = statement.object if statement.subject == @uri end @@ -151,9 +155,6 @@ module OpenTox end - class FromUri - end - # create default classes SERVICES.each do |s| eval "class #{s} @@ -162,7 +163,5 @@ module OpenTox end" end - private - end |