diff options
author | Christoph Helma <helma@in-silico.de> | 2010-02-15 10:14:43 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.de> | 2010-02-15 10:14:43 +0100 |
commit | 33d59523b3340d213b2bee58cde5de9ff4bffe99 (patch) | |
tree | 1026f79ad3d597417d048c967d1097fa789103b1 /lib/dataset.rb | |
parent | 658a73f4648f179f4f9073e0011e71085ee3e733 (diff) |
OWL-DL partially fixed according to Ninas suggestions
Diffstat (limited to 'lib/dataset.rb')
-rw-r--r-- | lib/dataset.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/dataset.rb b/lib/dataset.rb index 3971537..65e1e6b 100644 --- a/lib/dataset.rb +++ b/lib/dataset.rb @@ -14,6 +14,8 @@ module OpenTox data_entry = @model.subject OT['compound'], compound if data_entry.nil? data_entry = @model.create_resource + dataset = @model.subject(RDF['type'],OT[self.owl_class]) + @model.add dataset, RDF['dataEntry'], data_entry @model.add data_entry, RDF['type'], OT["DataEntry"] @model.add data_entry, OT['compound'], compound end @@ -29,6 +31,8 @@ module OpenTox data_entry = @model.subject OT['compound'], compound if data_entry.nil? data_entry = @model.create_resource + dataset = @model.subject(RDF['type'],OT[self.owl_class]) + @model.add dataset, RDF['dataEntry'], data_entry @model.add data_entry, RDF['type'], OT["DataEntry"] @model.add data_entry, OT['compound'], compound end @@ -57,7 +61,7 @@ module OpenTox def find_or_create_compound(uri) compound = @model.subject(DC["identifier"], uri) if compound.nil? - compound = @model.create_resource + compound = @model.create_resource(uri) @model.add compound, RDF['type'], OT["Compound"] @model.add compound, DC["identifier"], uri end @@ -68,7 +72,7 @@ module OpenTox def find_or_create_feature(uri) feature = @model.subject(DC["identifier"], uri) if feature.nil? - feature = @model.create_resource + feature = @model.create_resource(uri) @model.add feature, RDF['type'], OT["Feature"] @model.add feature, DC["identifier"], uri @model.add feature, DC["title"], File.basename(uri).split(/#/)[1] |