diff options
author | Christoph Helma <helma@in-silico.ch> | 2013-03-27 17:11:50 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2013-03-27 17:11:50 +0100 |
commit | 84417ada7c4d0a3b44ed35a8eee60db2e1e751f6 (patch) | |
tree | 66ae142b5b8a74a0459062cbd12f3629448f897f /lib/opentox.rb | |
parent | a54db46684680d98311631804eca367cc949a715 (diff) |
validation tests ok
Diffstat (limited to 'lib/opentox.rb')
-rw-r--r-- | lib/opentox.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/opentox.rb b/lib/opentox.rb index 1251f33..db7ba5c 100644 --- a/lib/opentox.rb +++ b/lib/opentox.rb @@ -25,8 +25,8 @@ module OpenTox # Object metadata (lazy loading) # @return [Hash] Object metadata def metadata force_update=false - if (@metadata.empty? or force_update) and URI.accessible? @uri - get if @rdf.empty? or force_update + if (@metadata.nil? or @metadata.empty? or force_update) and URI.accessible? @uri + get if @rdf.nil? or @rdf.empty? or force_update # return values as plain strings instead of RDF objects @metadata = @rdf.to_hash[RDF::URI.new(@uri)].inject({}) { |h, (predicate, values)| h[predicate] = values.collect{|v| v.to_s}; h } end |