summaryrefslogtreecommitdiff
path: root/lib/opentox.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2011-04-04 18:46:22 +0200
committerChristoph Helma <helma@in-silico.ch>2011-04-04 18:46:22 +0200
commit1daec5badcff31c591377017b32055aac775dbb7 (patch)
treea9dc4c5a1df87d13dd5127528b366081b403a1e2 /lib/opentox.rb
parent2fcaf3cd3c68b8e679ecf77f70285778495d78c2 (diff)
OT.isA substituted by RDF.type, identification of feature_types by RDF.type
Diffstat (limited to 'lib/opentox.rb')
-rw-r--r--lib/opentox.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/opentox.rb b/lib/opentox.rb
index 1992896..c76e21a 100644
--- a/lib/opentox.rb
+++ b/lib/opentox.rb
@@ -31,7 +31,14 @@ module OpenTox
end
def add_metadata(metadata)
- metadata.each { |k,v| @metadata[k] = v }
+ metadata.each do |k,v|
+ if v.is_a? Array
+ @metadata[k] = [] unless @metadata[k]
+ @metadata[k] << v
+ else
+ @metadata[k] = v
+ end
+ end
end
# Get OWL-DL representation in RDF/XML format