opentox-ruby-api-wrapper 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/algorithm.rb +19 -1
- data/lib/dataset.rb +0 -2
- data/lib/model.rb +2 -3
- data/lib/ot-logger.rb +1 -1
- data/lib/owl.rb +2 -2
- data/lib/task.rb +0 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.6.
|
1
|
+
1.6.3
|
data/lib/algorithm.rb
CHANGED
@@ -1,7 +1,25 @@
|
|
1
|
-
LOGGER.progname = File.expand_path(__FILE__)
|
2
1
|
|
3
2
|
module OpenTox
|
4
3
|
module Algorithm
|
4
|
+
|
5
|
+
|
6
|
+
class Generic
|
7
|
+
|
8
|
+
attr_accessor :uri, :title, :date
|
9
|
+
|
10
|
+
def self.find(uri)
|
11
|
+
owl = OpenTox::Owl.from_uri(uri, "Algorithm")
|
12
|
+
return self.new(owl)
|
13
|
+
end
|
14
|
+
|
15
|
+
protected
|
16
|
+
def initialize(owl)
|
17
|
+
@title = owl.get("title")
|
18
|
+
@date = owl.get("date")
|
19
|
+
@uri = owl.uri
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
5
23
|
|
6
24
|
class Fminer
|
7
25
|
|
data/lib/dataset.rb
CHANGED
data/lib/model.rb
CHANGED
@@ -21,9 +21,8 @@ module OpenTox
|
|
21
21
|
|
22
22
|
protected
|
23
23
|
def initialize(owl)
|
24
|
-
|
25
|
-
|
26
|
-
self.send("#{a.to_s}=".to_sym, owl.get(a.to_s))
|
24
|
+
MODEL_ATTRIBS.each do |a|
|
25
|
+
self.send("#{a.to_s}=".to_sym, owl.get(a.to_s)) unless a==:uri
|
27
26
|
end
|
28
27
|
@uri = owl.uri
|
29
28
|
if ENV['RACK_ENV'] =~ /test|debug/
|
data/lib/ot-logger.rb
CHANGED
data/lib/owl.rb
CHANGED
@@ -240,7 +240,7 @@ module OpenTox
|
|
240
240
|
unless owl.root_node
|
241
241
|
types = []
|
242
242
|
owl.model.find(nil, RDF_TYPE, nil){ |s,p,o| types << o.to_s }
|
243
|
-
raise "root node for class '"+ot_class+"' not found (available type nodes: "+types.inspect+")"
|
243
|
+
raise "root node for class '"+owl.node(ot_class).to_s+"' not found (available type nodes: "+types.inspect+")"
|
244
244
|
end
|
245
245
|
raise "no uri in rdf: '"+owl.uri+"'" unless owl.uri and Utils.is_uri?(owl.uri)
|
246
246
|
owl.ot_class = ot_class
|
@@ -251,7 +251,7 @@ module OpenTox
|
|
251
251
|
end
|
252
252
|
|
253
253
|
def self.from_uri(uri, ot_class)
|
254
|
-
|
254
|
+
return from_data(RestClientWrapper.get(uri,:accept => "application/rdf+xml").to_s, uri, ot_class)
|
255
255
|
end
|
256
256
|
|
257
257
|
def rdf
|
data/lib/task.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opentox-ruby-api-wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 1.6.
|
9
|
+
- 3
|
10
|
+
version: 1.6.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Christoph Helma, Martin Guetlein
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-18 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|