simple_bioc 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +13 -0
  3. data/html/BioCMerger.html +748 -0
  4. data/html/BioCReader.html +138 -146
  5. data/html/BioCWriter.html +84 -131
  6. data/html/README_md.html +79 -100
  7. data/html/SimpleBioC/Annotation.html +70 -113
  8. data/html/SimpleBioC/Collection.html +70 -113
  9. data/html/SimpleBioC/Document.html +76 -119
  10. data/html/SimpleBioC/Location.html +70 -113
  11. data/html/SimpleBioC/Node.html +72 -115
  12. data/html/SimpleBioC/NodeBase.html +63 -108
  13. data/html/SimpleBioC/Passage.html +74 -117
  14. data/html/SimpleBioC/Relation.html +85 -115
  15. data/html/SimpleBioC/Sentence.html +74 -117
  16. data/html/SimpleBioC.html +221 -129
  17. data/html/created.rid +16 -15
  18. data/html/css/fonts.css +167 -0
  19. data/html/css/rdoc.css +590 -0
  20. data/html/fonts/Lato-Light.ttf +0 -0
  21. data/html/fonts/Lato-LightItalic.ttf +0 -0
  22. data/html/fonts/Lato-Regular.ttf +0 -0
  23. data/html/fonts/Lato-RegularItalic.ttf +0 -0
  24. data/html/fonts/SourceCodePro-Bold.ttf +0 -0
  25. data/html/fonts/SourceCodePro-Regular.ttf +0 -0
  26. data/html/index.html +71 -53
  27. data/html/js/darkfish.js +32 -26
  28. data/html/js/jquery.js +4 -18
  29. data/html/js/navigation.js.gz +0 -0
  30. data/html/js/search.js +20 -5
  31. data/html/js/search_index.js +1 -1
  32. data/html/js/search_index.js.gz +0 -0
  33. data/html/js/searcher.js.gz +0 -0
  34. data/html/table_of_contents.html +379 -136
  35. data/lib/simple_bioc/bioc_merger.rb +209 -0
  36. data/lib/simple_bioc/relation.rb +1 -1
  37. data/lib/simple_bioc/version.rb +1 -1
  38. data/lib/simple_bioc.rb +8 -4
  39. data/spec/file_check_spec.rb +14 -1
  40. data/xml/PMC2133144.xml +3 -0
  41. data/xml/merge/9864355.xml +1 -0
  42. data/xml/merge/9864355_1.xml +1 -0
  43. data/xml/merge/9864355_2.xml +1974 -0
  44. data/xml/merge/9864355_3.xml +1 -0
  45. data/xml/merge/output.xml +6742 -0
  46. metadata +21 -2
data/html/index.html CHANGED
@@ -2,63 +2,73 @@
2
2
 
3
3
  <html>
4
4
  <head>
5
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
5
+ <meta charset="UTF-8">
6
6
 
7
7
  <title>RDoc Documentation</title>
8
8
 
9
- <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
10
-
11
9
  <script type="text/javascript">
12
10
  var rdoc_rel_prefix = "./";
13
11
  </script>
14
12
 
15
- <script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
16
- <script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
17
- <script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
18
- <script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
19
- <script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
20
- <script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
13
+ <script src="./js/jquery.js"></script>
14
+ <script src="./js/darkfish.js"></script>
15
+
16
+ <link href="./css/fonts.css" rel="stylesheet">
17
+ <link href="./css/rdoc.css" rel="stylesheet">
18
+
19
+
21
20
 
21
+ <body id="top" role="document" class="file">
22
+ <nav role="navigation">
23
+ <div id="project-navigation">
24
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
25
+ <h2>
26
+ <a href="./index.html" rel="home">Home</a>
27
+ </h2>
22
28
 
23
- <body>
24
- <nav id="metadata">
25
- <nav id="home-section" class="section">
26
- <h3 class="section-header">
27
- <a href="./index.html">Home</a>
29
+ <div id="table-of-contents-navigation">
30
+ <a href="./table_of_contents.html#pages">Pages</a>
28
31
  <a href="./table_of_contents.html#classes">Classes</a>
29
32
  <a href="./table_of_contents.html#methods">Methods</a>
30
- </h3>
31
- </nav>
33
+ </div>
34
+ </div>
32
35
 
33
36
 
34
- <nav id="search-section" class="section project-section" class="initially-hidden">
37
+ <div id="search-section" role="search" class="project-section initially-hidden">
35
38
  <form action="#" method="get" accept-charset="utf-8">
36
- <h3 class="section-header">
37
- <input type="text" name="search" placeholder="Search" id="search-field"
39
+ <div id="search-field-wrapper">
40
+ <input id="search-field" role="combobox" aria-label="Search"
41
+ aria-autocomplete="list" aria-controls="search-results"
42
+ type="text" name="search" placeholder="Search" spellcheck="false"
38
43
  title="Type to search, Up and Down to navigate, Enter to load">
39
- </h3>
40
- </form>
44
+ </div>
41
45
 
42
- <ul id="search-results" class="initially-hidden"></ul>
43
- </nav>
46
+ <ul id="search-results" aria-label="Search Results"
47
+ aria-busy="false" aria-expanded="false"
48
+ aria-atomic="false" class="initially-hidden"></ul>
49
+ </form>
50
+ </div>
44
51
 
52
+ </div>
45
53
 
46
54
  <div id="project-metadata">
47
- <nav id="fileindex-section" class="section project-section">
48
- <h3 class="section-header">Pages</h3>
55
+ <div id="fileindex-section" class="nav-section">
56
+ <h3>Pages</h3>
49
57
 
50
- <ul>
58
+ <ul class="link-list">
51
59
 
52
- <li class="file"><a href="./README_md.html">README</a>
60
+ <li><a href="./README_md.html">README</a>
53
61
 
54
62
  </ul>
55
- </nav>
63
+ </div>
56
64
 
57
- <nav id="classindex-section" class="section project-section">
58
- <h3 class="section-header">Class and Module Index</h3>
65
+ <div id="classindex-section" class="nav-section">
66
+ <h3>Class and Module Index</h3>
59
67
 
60
68
  <ul class="link-list">
61
69
 
70
+ <li><a href="./BioCMerger.html">BioCMerger</a>
71
+
62
72
  <li><a href="./BioCReader.html">BioCReader</a>
63
73
 
64
74
  <li><a href="./BioCWriter.html">BioCWriter</a>
@@ -84,14 +94,15 @@
84
94
  <li><a href="./SimpleBioC/Sentence.html">SimpleBioC::Sentence</a>
85
95
 
86
96
  </ul>
87
- </nav>
97
+ </div>
88
98
 
89
99
  </div>
90
100
  </nav>
91
101
 
92
- <div id="documentation" class="description">
102
+ <main role="main">
93
103
 
94
- <h1 id="label-SimpleBioC"><a href="SimpleBioC.html">SimpleBioC</a><span><a href="#label-SimpleBioC">&para;</a> <a href="#documentation">&uarr;</a></span></h1>
104
+
105
+ <h1 id="label-SimpleBioC"><a href="SimpleBioC.html">SimpleBioC</a><span><a href="#label-SimpleBioC">&para;</a> <a href="#top">&uarr;</a></span></h1>
95
106
 
96
107
  <p><a href="SimpleBioC.html">SimpleBioC</a> is a simple parser / builder for
97
108
  BioC data format. BioC is a simple XML format to share text documents and
@@ -99,7 +110,7 @@ annotations. You can find more information about BioC from the official
99
110
  BioC web site (<a
100
111
  href="http://www.ncbi.nlm.nih.gov/CBBresearch/Dogan/BioC/">www.ncbi.nlm.nih.gov/CBBresearch/Dogan/BioC/</a>)</p>
101
112
 
102
- <h2 id="label-Feature%3A">Feature:<span><a href="#label-Feature%3A">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
113
+ <h2 id="label-Feature-3A">Feature:<span><a href="#label-Feature-3A">&para;</a> <a href="#top">&uarr;</a></span></h2>
103
114
  <ul><li>
104
115
  <p>Parse &amp; convert a BioC document to an object instance compatible to
105
116
  BioC DTD</p>
@@ -109,11 +120,12 @@ BioC DTD</p>
109
120
  <p>Build a BioC document from an object instance</p>
110
121
  </li></ul>
111
122
 
112
- <h2 id="label-Installation">Installation<span><a href="#label-Installation">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
123
+ <h2 id="label-Installation">Installation<span><a href="#label-Installation">&para;</a> <a href="#top">&uarr;</a></span></h2>
113
124
 
114
125
  <p>Add this line to your application&#39;s Gemfile:</p>
115
126
 
116
- <pre>gem &#39;simple_bioc&#39;</pre>
127
+ <pre class="ruby"><span class="ruby-identifier">gem</span> <span class="ruby-string">&#39;simple_bioc&#39;</span>
128
+ </pre>
117
129
 
118
130
  <p>And then execute:</p>
119
131
 
@@ -123,7 +135,7 @@ BioC DTD</p>
123
135
 
124
136
  <pre>$ gem install simple_bioc</pre>
125
137
 
126
- <h2 id="label-Simple+Usages">Simple Usages<span><a href="#label-Simple+Usages">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
138
+ <h2 id="label-Simple+Usages">Simple Usages<span><a href="#label-Simple+Usages">&para;</a> <a href="#top">&uarr;</a></span></h2>
127
139
 
128
140
  <p>Include library</p>
129
141
 
@@ -132,7 +144,8 @@ BioC DTD</p>
132
144
 
133
145
  <p>Parse with a file name (path)</p>
134
146
 
135
- <pre>collection = SimpleBioC::from_xml(filename)</pre>
147
+ <pre class="ruby"><span class="ruby-identifier">collection</span> = <span class="ruby-constant">SimpleBioC</span><span class="ruby-operator">::</span><span class="ruby-identifier">from_xml</span>(<span class="ruby-identifier">filename</span>)
148
+ </pre>
136
149
 
137
150
  <p>Traverse &amp; Manipulate Data. Data structure are almost the same as the
138
151
  DTD. Please refer <a
@@ -141,32 +154,36 @@ documents</a> and <a
141
154
  href="http://www.ncbi.nlm.nih.gov/CBBresearch/Dogan/BioC/BioCDTD.html">the
142
155
  BioC DTD</a>.</p>
143
156
 
144
- <pre>puts collection.documents[2].passages[0].text</pre>
157
+ <pre class="ruby"><span class="ruby-identifier">puts</span> <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">documents</span>[<span class="ruby-value">2</span>].<span class="ruby-identifier">passages</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">text</span>
158
+ </pre>
145
159
 
146
160
  <p>Build XML text from data</p>
147
161
 
148
- <pre>puts SimpleBioC::to_xml(collection)</pre>
162
+ <pre class="ruby"><span class="ruby-identifier">puts</span> <span class="ruby-constant">SimpleBioC</span><span class="ruby-operator">::</span><span class="ruby-identifier">to_xml</span>(<span class="ruby-identifier">collection</span>)
163
+ </pre>
149
164
 
150
- <h2 id="label-Options">Options<span><a href="#label-Options">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
165
+ <h2 id="label-Options">Options<span><a href="#label-Options">&para;</a> <a href="#top">&uarr;</a></span></h2>
151
166
 
152
- <h3 id="label-Specify+set+of+%3Cdocument%3Es+to+parse">Specify set of &lt;document&gt;s to parse<span><a href="#label-Specify+set+of+%3Cdocument%3Es+to+parse">&para;</a> <a href="#documentation">&uarr;</a></span></h3>
167
+ <h3 id="label-Specify+set+of+-3Cdocument-3Es+to+parse">Specify set of &lt;document&gt;s to parse<span><a href="#label-Specify+set+of+-3Cdocument-3Es+to+parse">&para;</a> <a href="#top">&uarr;</a></span></h3>
153
168
 
154
169
  <p>You can parse only a set of document elements in a large xml document
155
170
  instead of parsing all the document elements. It may decrease the
156
171
  processing time. For example, the following code will return a collection
157
172
  with two documents (“1234”, “4567”).</p>
158
173
 
159
- <pre>collection = SimpleBioc::from_xml(filename, {documents: [&quot;1234&quot;, &quot;4567&quot;]})</pre>
174
+ <pre class="ruby"><span class="ruby-identifier">collection</span> = <span class="ruby-constant">SimpleBioc</span><span class="ruby-operator">::</span><span class="ruby-identifier">from_xml</span>(<span class="ruby-identifier">filename</span>, {<span class="ruby-identifier">documents</span><span class="ruby-operator">:</span> [<span class="ruby-string">&quot;1234&quot;</span>, <span class="ruby-string">&quot;4567&quot;</span>]})
175
+ </pre>
160
176
 
161
- <h3 id="label-No+whitespace+in+output">No whitespace in output<span><a href="#label-No+whitespace+in+output">&para;</a> <a href="#documentation">&uarr;</a></span></h3>
177
+ <h3 id="label-No+whitespace+in+output">No whitespace in output<span><a href="#label-No+whitespace+in+output">&para;</a> <a href="#top">&uarr;</a></span></h3>
162
178
 
163
179
  <p>By default, outputs of SimpleBioC::to_xml() will be formatted with
164
180
  whitespace. If you do not want this whitespace, you should pass
165
181
  &#39;save_with&#39; option with 0 to the to_xml() function.</p>
166
182
 
167
- <pre>puts SimpleBioC::to_xml(collection, {save_with:0})</pre>
183
+ <pre class="ruby"><span class="ruby-identifier">puts</span> <span class="ruby-constant">SimpleBioC</span><span class="ruby-operator">::</span><span class="ruby-identifier">to_xml</span>(<span class="ruby-identifier">collection</span>, {<span class="ruby-identifier">save_with</span>:<span class="ruby-value">0</span>})
184
+ </pre>
168
185
 
169
- <h2 id="label-Sample">Sample<span><a href="#label-Sample">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
186
+ <h2 id="label-Sample">Sample<span><a href="#label-Sample">&para;</a> <a href="#top">&uarr;</a></span></h2>
170
187
 
171
188
  <p>More samples can be found in Samples directory</p>
172
189
 
@@ -205,7 +222,7 @@ whitespace. If you do not want this whitespace, you should pass
205
222
  <span class="ruby-identifier">puts</span> <span class="ruby-identifier">xml</span>
206
223
  </pre>
207
224
 
208
- <h2 id="label-Contributing">Contributing<span><a href="#label-Contributing">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
225
+ <h2 id="label-Contributing">Contributing<span><a href="#label-Contributing">&para;</a> <a href="#top">&uarr;</a></span></h2>
209
226
  <ol><li>
210
227
  <p>Fork it</p>
211
228
  </li><li>
@@ -219,17 +236,18 @@ feature&#39;</code>)</p>
219
236
  <p>Create new Pull Request</p>
220
237
  </li></ol>
221
238
 
222
- <h2 id="label-LICENSE">LICENSE<span><a href="#label-LICENSE">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
239
+ <h2 id="label-LICENSE">LICENSE<span><a href="#label-LICENSE">&para;</a> <a href="#top">&uarr;</a></span></h2>
223
240
 
224
241
  <p>Copyright © 2013, Dongseop Kwon</p>
225
242
 
226
243
  <p>Released under the MIT License.</p>
227
- </div>
244
+ </main>
245
+
228
246
 
229
247
 
230
- <footer id="validator-badges">
231
- <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
232
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
233
- <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
248
+ <footer id="validator-badges" role="contentinfo">
249
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
250
+ <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
251
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
234
252
  </footer>
235
253
 
data/html/js/darkfish.js CHANGED
@@ -44,28 +44,6 @@ function hookSourceViews() {
44
44
  $('.method-heading').click( showSource );
45
45
  };
46
46
 
47
- function toggleDebuggingSection() {
48
- $('.debugging-section').slideToggle();
49
- };
50
-
51
- function hookDebuggingToggle() {
52
- $('#debugging-toggle img').click( toggleDebuggingSection );
53
- };
54
-
55
- function hookTableOfContentsToggle() {
56
- $('.indexpage li .toc-toggle').each( function() {
57
- $(this).click( function() {
58
- $(this).toggleClass('open');
59
- });
60
-
61
- var section = $(this).next();
62
-
63
- $(this).click( function() {
64
- section.slideToggle();
65
- });
66
- });
67
- }
68
-
69
47
  function hookSearch() {
70
48
  var input = $('#search-field').eq(0);
71
49
  var result = $('#search-results').eq(0);
@@ -143,13 +121,41 @@ function highlightClickTarget( event ) {
143
121
  };
144
122
  };
145
123
 
124
+ function loadAsync(path, success) {
125
+ $.ajax({
126
+ url: rdoc_rel_prefix + path,
127
+ dataType: 'script',
128
+ success: success,
129
+ cache: true
130
+ });
131
+ };
146
132
 
147
133
  $(document).ready( function() {
148
134
  hookSourceViews();
149
- hookDebuggingToggle();
150
- hookSearch();
151
135
  highlightLocationTarget();
152
- hookTableOfContentsToggle();
153
-
154
136
  $('ul.link-list a').bind( "click", highlightClickTarget );
137
+
138
+ var search_scripts_loaded = {
139
+ navigation_loaded: false,
140
+ search_loaded: false,
141
+ search_index_loaded: false,
142
+ searcher_loaded: false,
143
+ }
144
+
145
+ var search_success_function = function(variable) {
146
+ return (function (data, status, xhr) {
147
+ search_scripts_loaded[variable] = true;
148
+
149
+ if (search_scripts_loaded['navigation_loaded'] == true &&
150
+ search_scripts_loaded['search_loaded'] == true &&
151
+ search_scripts_loaded['search_index_loaded'] == true &&
152
+ search_scripts_loaded['searcher_loaded'] == true)
153
+ hookSearch();
154
+ });
155
+ }
156
+
157
+ loadAsync('js/navigation.js', search_success_function('navigation_loaded'));
158
+ loadAsync('js/search.js', search_success_function('search_loaded'));
159
+ loadAsync('js/search_index.js', search_success_function('search_index_loaded'));
160
+ loadAsync('js/searcher.js', search_success_function('searcher_loaded'));
155
161
  });