diff options
author | mguetlein <martin.guetlein@gmail.com> | 2010-08-03 08:54:09 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2010-08-03 08:54:09 +0200 |
commit | ff2a7af228fd6d0d23d29ef249422890841b526c (patch) | |
tree | ebffa9cd137275b9f6d8c7a87c1b9a59e2ca261f /lib | |
parent | 87c815a3eedd87d08f7dc74c3dbfdaf9867103a6 (diff) |
fix dataset rdf support
Diffstat (limited to 'lib')
-rw-r--r-- | lib/owl.rb | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -81,6 +81,7 @@ module OpenTox "predictedVariables", "predictionFeature" ].each{ |c| OBJECT_PROPERTY_CLASS[c] = "Feature"} [ "parameters" ].each{ |c| OBJECT_PROPERTY_CLASS[c] = "Parameter"} [ "compound" ].each{ |c| OBJECT_PROPERTY_CLASS[c] = "Compound"} + [ "complexValue" ].each{ |c| OBJECT_PROPERTY_CLASS[c] = "Tuple"} [ "dataEntry" ].each{ |c| OBJECT_PROPERTY_CLASS[c] = "DataEntry"} [ "values" ].each{ |c| OBJECT_PROPERTY_CLASS[c] = "FeatureValue"} [ "classificationStatistics" ].each{ |c| OBJECT_PROPERTY_CLASS[c] = "ClassificationStatistics"} @@ -92,6 +93,7 @@ module OpenTox [ "crossvalidationInfo" ].each{ |c| OBJECT_PROPERTY_CLASS[c] = "CrossvalidationInfo"} [ "crossvalidation" ].each{ |c| OBJECT_PROPERTY_CLASS[c] = "Crossvalidation"} + # literals point to primitive values (not to other resources) # the literal datatype is encoded via uri: LITERAL_DATATYPE_STRING = XML["string"].uri @@ -328,9 +330,9 @@ module OpenTox raise "hash key must be a object-property, please add '"+prop.to_s+ "' to OpenTox::OWL.OBJECT_PROPERTY_CLASS" unless OBJECT_PROPERTY_CLASS[prop] # the new node is a class node - if v["uri"] + if v[:uri] # identifier is either a specified uri - class_node = Redland::Resource.new(v.delete("uri")) + class_node = Redland::Resource.new(v.delete(:uri)) else # or a new uri, make up internal uri with increment class_node = new_class_node(OBJECT_PROPERTY_CLASS[prop],current_node) |