openbel-api 1.2.4-java → 1.2.5-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 40982dd3cf6e6d9f62a658b2655dc9c787955731
4
- data.tar.gz: b69d590f8e724877211c8a7d3bb68e636f9ffefa
3
+ metadata.gz: 90c37f3793684521d80dc8295c45455fe6dfb451
4
+ data.tar.gz: 5f045dbece8c755bdf1d5d83be7c5252c9ef1e2e
5
5
  SHA512:
6
- metadata.gz: 1df9c3ebf406b516d57e310a443e2225e53d9fe4af664952bbb87164b9f35fe6ee8360d9292bf5857588d8f6c3933f79c3621ff8d9e4980b84e8bf049e7e448a
7
- data.tar.gz: 739c2d01202410e70138dfe7dc5e3288ae3af6c4181c6cd0f16ec86cca2a03b16bdce14440f6dd5ecf539b6abf526f9faaca5f2c62117cd0da64764079d7ed79
6
+ metadata.gz: 330470357ec0fa5290cdc58ea3cbf234c89d29f0d266c8f3d0ef6bbf5cc5f2e5112097c5d7f291fbdf2df16780019e6c4740fd3f353612465300f6eeed91c4da
7
+ data.tar.gz: ccce717ee6f5b560c00bf9fa77ec1da3748c3f240a3fdde32e784815d4b76aaa1818f0ff2d84525625b34efdcafe280c7b871a52f31995937868760262554e1c
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.4
1
+ 1.2.5
@@ -103,7 +103,8 @@ module OpenBEL
103
103
  private
104
104
 
105
105
  def setup(item)
106
- @annotation_id, @annotation_value_id = URI(item.uri).path.split('/')[3..-1]
106
+ @annotation_id = item.annotation.prefix.first
107
+ @annotation_value_id = item.identifier.first
107
108
  end
108
109
 
109
110
  def link_self
@@ -103,24 +103,23 @@ module OpenBEL
103
103
  class NamespaceValueResourceSerializer < BaseSerializer
104
104
  adapter Oat::Adapters::HAL
105
105
  schema do
106
- parts = URI(item.delete(:rdf_uri)).path.split('/')[3..-1]
107
- namespace_id = parts[0]
108
- namespace_value_id = parts.join('/')
106
+ id = item[:namespace][:prefix]
107
+ value_id = item[:identifier]
109
108
 
110
109
  type :namespace_value
111
110
  property :namespace_value, item
112
- link :self, link_self(namespace_value_id)
113
- link :collection, link_namespace(namespace_id)
114
- link :equivalents, link_equivalents(namespace_value_id)
115
- link :orthologs, link_orthologs(namespace_value_id)
111
+ link :self, link_self(id, value_id)
112
+ link :collection, link_namespace(id)
113
+ link :equivalents, link_equivalents(id, value_id)
114
+ link :orthologs, link_orthologs(id, value_id)
116
115
  end
117
116
 
118
117
  private
119
118
 
120
- def link_self(id)
119
+ def link_self(id, value_id)
121
120
  {
122
121
  :type => :namespace_value,
123
- :href => "#{base_url}/api/namespaces/#{id}"
122
+ :href => "#{base_url}/api/namespaces/#{id}/values/#{value_id}"
124
123
  }
125
124
  end
126
125
 
@@ -131,17 +130,17 @@ module OpenBEL
131
130
  }
132
131
  end
133
132
 
134
- def link_equivalents(id)
133
+ def link_equivalents(id, value_id)
135
134
  {
136
135
  :type => :namespace_value_collection,
137
- :href => "#{base_url}/api/namespaces/#{id}/equivalents"
136
+ :href => "#{base_url}/api/namespaces/#{id}/values/#{value_id}/equivalents"
138
137
  }
139
138
  end
140
139
 
141
- def link_orthologs(id)
140
+ def link_orthologs(id, value_id)
142
141
  {
143
142
  :type => :namespace_value_collection,
144
- :href => "#{base_url}/api/namespaces/#{id}/orthologs"
143
+ :href => "#{base_url}/api/namespaces/#{id}/values/#{value_id}/orthologs"
145
144
  }
146
145
  end
147
146
  end
@@ -285,11 +285,14 @@ module OpenBEL
285
285
  {'Content-Type' => 'application/json'},
286
286
  render_json(
287
287
  {
288
- valid_syntax: false,
289
- valid_semantics: false,
290
- message: 'Invalid syntax.',
291
- warnings: [],
292
- term_signatures: []
288
+ validation: {
289
+ expression: bel,
290
+ valid_syntax: false,
291
+ valid_semantics: false,
292
+ message: 'Invalid syntax.',
293
+ warnings: [],
294
+ term_signatures: []
295
+ }
293
296
  }
294
297
  )
295
298
  )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openbel-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: java
6
6
  authors:
7
7
  - Anthony Bargnesi