oba-client 1.2.0 → 1.2.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.
- data/History.md +22 -18
- data/README.md +7 -4
- data/Rakefile +1 -0
- data/lib/oba_client.rb +6 -6
- data/test/test_oba_client.rb +4 -0
- metadata +4 -4
data/History.md
CHANGED
@@ -1,36 +1,40 @@
|
|
1
|
-
|
1
|
+
## 1.2.1 / 2010-07-08
|
2
2
|
|
3
|
-
*
|
4
|
-
* Does not yet parse statistics.
|
3
|
+
* Link correctly (problem with using markdown-ed URL in README.md).
|
5
4
|
|
6
|
-
## 1.0
|
5
|
+
## 1.2.0 / 2010-07-08
|
7
6
|
|
8
|
-
*
|
7
|
+
* Parse statistics.
|
9
8
|
|
10
|
-
## 1.
|
9
|
+
## 1.1.1 / 2010-07-08
|
11
10
|
|
12
|
-
*
|
13
|
-
|
14
|
-
## 1.0.3 / 2010-07-07
|
11
|
+
* Rake or Hoe bug workaround.
|
15
12
|
|
16
|
-
|
13
|
+
## 1.1.0 / 2010-07-08
|
14
|
+
|
15
|
+
* Fully parse MGREP mappings.
|
16
|
+
|
17
|
+
## 1.0.5 / 2010-07-08
|
18
|
+
|
19
|
+
* Modify docs slightly.
|
17
20
|
|
18
21
|
## 1.0.4 / 2010-07-08
|
19
22
|
|
20
23
|
* Add all possible parameter values for the Annotator.
|
21
24
|
|
22
|
-
## 1.0.
|
25
|
+
## 1.0.3 / 2010-07-07
|
23
26
|
|
24
|
-
*
|
27
|
+
* Add more tests.
|
25
28
|
|
26
|
-
## 1.
|
29
|
+
## 1.0.2 / 2010-07-07
|
27
30
|
|
28
|
-
*
|
31
|
+
* Oops, no release notes.
|
29
32
|
|
30
|
-
## 1.
|
33
|
+
## 1.0.1 / 2010-07-07
|
31
34
|
|
32
|
-
*
|
35
|
+
* Oops, fix a symbol bug.
|
33
36
|
|
34
|
-
|
37
|
+
# 1.0.0 / 2010-07-07
|
35
38
|
|
36
|
-
*
|
39
|
+
* Initial release.
|
40
|
+
* Does not yet parse statistics.
|
data/README.md
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
# oba-client
|
2
2
|
|
3
|
-
* http://rubyforge.org/projects/oba-client
|
4
3
|
* [RubyForge project](http://rubyforge.org/projects/oba-client "RubyForge project")
|
5
4
|
|
6
5
|
## DESCRIPTION:
|
7
6
|
|
8
7
|
A client for accessing the NCBO's Open Biomedical Annotator service.
|
9
|
-
See [the Annotator documentation](http://www.bioontology.org/wiki/index.php/Annotator_User_Guide "Documentation") for much more information
|
8
|
+
See [the Annotator documentation](http://www.bioontology.org/wiki/index.php/Annotator_User_Guide "Documentation") for much more information.
|
10
9
|
|
11
10
|
## FEATURES:
|
12
11
|
|
@@ -23,8 +22,12 @@ See [the Annotator documentation](http://www.bioontology.org/wiki/index.php/Anno
|
|
23
22
|
|
24
23
|
## USAGE:
|
25
24
|
|
25
|
+
require "rubygems"
|
26
|
+
require "oba-client"
|
27
|
+
|
26
28
|
client = OBAClient.new
|
27
|
-
|
29
|
+
# As XML.
|
30
|
+
result = client.execute("some text string")
|
28
31
|
|
29
32
|
client2 = OBAClient.new({:parse_xml => true})
|
30
33
|
# Returns {:statistics => {information about the annotation},
|
@@ -34,7 +37,7 @@ See [the Annotator documentation](http://www.bioontology.org/wiki/index.php/Anno
|
|
34
37
|
client2.execute("this is the second query for this client!")
|
35
38
|
|
36
39
|
# Or, parse some file you've already got lying about (pass as a string).
|
37
|
-
parsed = OBAClient::parse("<?xml
|
40
|
+
parsed = OBAClient::parse("<?xml version='1.0'>...</xml>")
|
38
41
|
|
39
42
|
## LICENSE:
|
40
43
|
|
data/Rakefile
CHANGED
data/lib/oba_client.rb
CHANGED
@@ -5,7 +5,7 @@ require "net/http"
|
|
5
5
|
require "uri"
|
6
6
|
|
7
7
|
class OBAClient
|
8
|
-
VERSION = "1.2.
|
8
|
+
VERSION = "1.2.1"
|
9
9
|
|
10
10
|
# A high HTTP read timeout, as the service sometimes takes awhile to respond.
|
11
11
|
DEFAULT_TIMEOUT = 30
|
@@ -153,11 +153,11 @@ class OBAClient
|
|
153
153
|
end
|
154
154
|
|
155
155
|
doc.xpath(ONTOLOGY_BEANS_XPATH).each do |ontology|
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
156
|
+
ontologies << {
|
157
|
+
:localOntologyId => ontology.xpath("localOntologyId").text.to_i,
|
158
|
+
:virtualOntologyId => ontology.xpath("virtualOntologyId").text.to_i,
|
159
|
+
:name => ontology.xpath("name").text
|
160
|
+
}
|
161
161
|
end
|
162
162
|
|
163
163
|
{
|
data/test/test_oba_client.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oba-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 1
|
10
|
+
version: 1.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Rob Tirrell
|
@@ -68,7 +68,7 @@ dependencies:
|
|
68
68
|
version_requirements: *id003
|
69
69
|
description: |-
|
70
70
|
A client for accessing the NCBO's Open Biomedical Annotator service.
|
71
|
-
See [the Annotator documentation](http://www.bioontology.org/wiki/index.php/Annotator_User_Guide "Documentation") for much more information
|
71
|
+
See [the Annotator documentation](http://www.bioontology.org/wiki/index.php/Annotator_User_Guide "Documentation") for much more information.
|
72
72
|
email:
|
73
73
|
- rpt@stanford.edu
|
74
74
|
executables: []
|