diff options
author | rautenberg <rautenberg@in-silico.ch> | 2013-04-26 13:47:53 +0200 |
---|---|---|
committer | rautenberg <rautenberg@in-silico.ch> | 2013-04-26 13:47:53 +0200 |
commit | ca4d31be29c811369f1ee3c14fdfa688cc4cb30a (patch) | |
tree | 37f1e9c700f0b3920b807faa4870622be4eb04bc | |
parent | 4e5063039fd2207799e76b9afd97614c1091303b (diff) | |
parent | 4a95ab76acddaffe5fb8b90a7aa41c069558de81 (diff) |
Merge branch 'development' of github.com:opentox/opentox-client into development
-rw-r--r-- | lib/dataset.rb | 8 | ||||
-rw-r--r-- | lib/opentox-client.rb | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/lib/dataset.rb b/lib/dataset.rb index 22c606c..dd019a1 100644 --- a/lib/dataset.rb +++ b/lib/dataset.rb @@ -221,8 +221,8 @@ module OpenTox end -=begin # TODO: fix bug that affects data_entry positions +=begin def to_ntriples # redefined string version for better performance ntriples = "" @@ -249,13 +249,15 @@ module OpenTox end ntriples << "<#{compound.uri}> <#{RDF::OLO.index}> '#{i}' .\n" - data_entry_node = RDF::Node.new + #data_entry_node = RDF::Node.new + data_entry_node = "_:dataentry"+ i.to_s ntriples << "<#{@uri}> <#{RDF::OT.dataEntry}> #{data_entry_node} .\n" ntriples << "#{data_entry_node} <#{RDF.type}> <#{RDF::OT.DataEntry}> .\n" ntriples << "#{data_entry_node} <#{RDF::OLO.index}> '#{i}' .\n" ntriples << "#{data_entry_node} <#{RDF::OT.compound}> <#{compound.uri}> .\n" @data_entries[i].each_with_index do |value,j| - value_node = RDF::Node.new + value_node = data_entry_node+ "_value"+ j.to_s + #value_node = RDF::Node.new ntriples << "#{data_entry_node} <#{RDF::OT.values}> #{value_node} .\n" ntriples << "#{value_node} <#{RDF::OT.feature}> <#{@features[j].uri}> .\n" ntriples << "#{value_node} <#{RDF::OT.value}> '#{value}' .\n" diff --git a/lib/opentox-client.rb b/lib/opentox-client.rb index 1fe084b..16b8552 100644 --- a/lib/opentox-client.rb +++ b/lib/opentox-client.rb @@ -11,11 +11,13 @@ require 'logger' require "securerandom" # define constants and global variables -#TODO: switch services to 1.2 RDF::OT = RDF::Vocabulary.new 'http://www.opentox.org/api/1.2#' RDF::OT1 = RDF::Vocabulary.new 'http://www.opentox.org/api/1.1#' RDF::OTA = RDF::Vocabulary.new 'http://www.opentox.org/algorithmTypes.owl#' RDF::OLO = RDF::Vocabulary.new 'http://purl.org/ontology/olo/core#' +RDF::TB = RDF::Vocabulary.new "http://onto.toxbank.net/api/" +RDF::ISA = RDF::Vocabulary.new "http://onto.toxbank.net/isa/" +RDF::OWL = RDF::Vocabulary.new "http://www.w3.org/2002/07/owl#" CLASSES = ["Generic", "Compound", "Feature", "Dataset", "Algorithm", "Model", "Validation", "Task", "Investigation"] RDF_FORMATS = [:rdfxml,:ntriples,:turtle] |