ncbo_resource_index 1.0 → 1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/ncbo_resource_index.rb +2 -14
  2. metadata +2 -2
@@ -94,24 +94,12 @@ module NCBO
94
94
  raise ArgumentError, ":resourceids must be an array" unless @options[:resourceids].kind_of? Array
95
95
  resource = resource.upcase
96
96
 
97
- "http://rest.bioontology.org/resource_index/details/false/virtual/concept/1032/resource/AE/0/9999?conceptid=Melanoma&elementid=E-GEOD-18509"
98
-
99
97
  concept_annotations = []
100
98
  concepts.each do |concept|
101
99
  split_concept = concept.split("/")
102
100
  ontology_id = split_concept[0]
103
101
  concept_id = split_concept[1]
104
102
  virtual = @options[:isVirtualOntologyId] ? "/virtual" : ""
105
- puts ["#{@options[:resource_index_location]}",
106
- "details/#{@options[:elementDetails]}",
107
- virtual,
108
- "/concept/#{ontology_id}",
109
- "/resource/#{resource}",
110
- "/#{@options[:offset]}",
111
- "/#{@options[:limit]}",
112
- "?conceptid=#{CGI.escape(concept_id)}",
113
- "&elementid=#{CGI.escape(element)}",
114
- "&apikey=#{@options[:apikey]}"].join("")
115
103
  result_xml = open(["#{@options[:resource_index_location]}",
116
104
  "details/#{@options[:elementDetails]}",
117
105
  virtual,
@@ -161,7 +149,7 @@ module NCBO
161
149
  "?offset=#{@options[:offset]}",
162
150
  "&limit=#{@options[:limit]}",
163
151
  "&conceptids=#{@options[:conceptids].join(",")}",
164
- "&ontologiesToKeepInResult=#{@options[:ontologiesToKeepInResult]}",
152
+ "&ontologiesToKeepInResult=#{@options[:ontologiesToKeepInResult].join(",")}",
165
153
  "&isVirtualOntologyId=#{@options[:isVirtualOntologyId]}",
166
154
  "&apikey=#{@options[:apikey]}"].join("")
167
155
  result_xml = open(["#{@options[:resource_index_location]}",
@@ -169,7 +157,7 @@ module NCBO
169
157
  "?offset=#{@options[:offset]}",
170
158
  "&limit=#{@options[:limit]}",
171
159
  "&conceptids=#{@options[:conceptids].join(",")}",
172
- "&ontologiesToKeepInResult=#{@options[:ontologiesToKeepInResult]}",
160
+ "&ontologiesToKeepInResult=#{@options[:ontologiesToKeepInResult].join(",")}",
173
161
  "&isVirtualOntologyId=#{@options[:isVirtualOntologyId]}",
174
162
  "&apikey=#{@options[:apikey]}"].join("")).read
175
163
  Parser::ResourceIndex.parse_ranked_element_results(result_xml)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ncbo_resource_index
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: '1.1'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-25 00:00:00.000000000 Z
12
+ date: 2012-07-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: libxml-ruby