diff options
author | Martin Gütlein <martin.guetlein@gmail.com> | 2010-03-23 13:00:55 +0100 |
---|---|---|
committer | Martin Gütlein <martin.guetlein@gmail.com> | 2010-03-23 13:00:55 +0100 |
commit | 54d1c336501dd34785ca29a3393a9fd347097482 (patch) | |
tree | 9a3764deb28e9db0b09ae5ba284a8df7c7528325 /lib/dataset.rb | |
parent | 420efdf93cc335c8adbdba38a71fa36b797188b0 (diff) |
added amit dataset parsing, static lazar feature modifier
Diffstat (limited to 'lib/dataset.rb')
-rw-r--r-- | lib/dataset.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/dataset.rb b/lib/dataset.rb index bbadd2d..2d49829 100644 --- a/lib/dataset.rb +++ b/lib/dataset.rb @@ -123,6 +123,16 @@ module OpenTox value = true when FALSE_REGEXP # defined in environment.rb value = false + when /.*\^\^<.*XMLSchema#.*>/ + case value.to_s + when /XMLSchema#string/ + value = value.to_s[0..(value.to_s.index("^^")-1)] + when /XMLSchema#double/ + value = value.to_s[0..(value.to_s.index("^^")-1)].to_f + else + LOGGER.warn " ILLEGAL TYPE "+compound_uri + " has value '" + value.to_s + "' for feature " + feature_uri + value = nil + end else LOGGER.warn compound_uri + " has value '" + value.to_s + "' for feature " + feature_uri value = nil |