From d1aee784626156b1acefaa39e90628d8143531dc Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 24 Apr 2013 20:08:45 +0200 Subject: numbered anonymous nodes for dataentries. --- lib/dataset.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/dataset.rb b/lib/dataset.rb index 402d2a1..ec0abdb 100644 --- a/lib/dataset.rb +++ b/lib/dataset.rb @@ -220,8 +220,8 @@ module OpenTox end -=begin # TODO: fix bug that affects data_entry positions +=begin def to_ntriples # redefined string version for better performance ntriples = "" @@ -248,13 +248,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" -- cgit v1.2.3 From c2b56cb98075fa74f01eb52f78a78e0c5bd8a697 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 24 Apr 2013 20:09:25 +0200 Subject: additional RDF vocabularies. --- lib/opentox-client.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/opentox-client.rb b/lib/opentox-client.rb index 1fe084b..b0d0dc9 100644 --- a/lib/opentox-client.rb +++ b/lib/opentox-client.rb @@ -16,6 +16,9 @@ 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] -- cgit v1.2.3 From 0f9d5366ce75f6fcf29d7adfc37ab8f5dfc9dc75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20G=C3=BCtlein?= Date: Thu, 25 Apr 2013 13:47:31 +0300 Subject: removing old comment --- lib/opentox-client.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'lib') diff --git a/lib/opentox-client.rb b/lib/opentox-client.rb index 1fe084b..ae377bd 100644 --- a/lib/opentox-client.rb +++ b/lib/opentox-client.rb @@ -11,7 +11,6 @@ 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#' -- cgit v1.2.3