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 +4 -4
- data/VERSION +1 -1
- data/app/openbel/api/resources/annotation.rb +2 -1
- data/app/openbel/api/resources/namespace.rb +12 -13
- data/app/openbel/api/routes/expressions.rb +8 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90c37f3793684521d80dc8295c45455fe6dfb451
|
4
|
+
data.tar.gz: 5f045dbece8c755bdf1d5d83be7c5252c9ef1e2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 330470357ec0fa5290cdc58ea3cbf234c89d29f0d266c8f3d0ef6bbf5cc5f2e5112097c5d7f291fbdf2df16780019e6c4740fd3f353612465300f6eeed91c4da
|
7
|
+
data.tar.gz: ccce717ee6f5b560c00bf9fa77ec1da3748c3f240a3fdde32e784815d4b76aaa1818f0ff2d84525625b34efdcafe280c7b871a52f31995937868760262554e1c
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.5
|
@@ -103,7 +103,8 @@ module OpenBEL
|
|
103
103
|
private
|
104
104
|
|
105
105
|
def setup(item)
|
106
|
-
@annotation_id
|
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
|
-
|
107
|
-
|
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(
|
113
|
-
link :collection, link_namespace(
|
114
|
-
link :equivalents, link_equivalents(
|
115
|
-
link :orthologs, link_orthologs(
|
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
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
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
|
)
|