<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># This program is free software; you can redistribute it and/or</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># modify it under the terms of the GNU General Public License</tt> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># as published by the Free Software Foundation; either version 2 </tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># of the License, or (at your option) any later version.</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># This program is distributed in the hope that it will be useful,</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># but WITHOUT ANY WARRANTY; without even the implied warranty of</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># GNU General Public License for more details. </tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># You should have received a copy of the GNU General Public License</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># along with this program; if not, write to the Free Software</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt> <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</tt> </tt>
</div><div id="_xml-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_xml-expanded"><a name="L45"></a><tt class="py-lineno"> 45</tt> <tt class="py-line"> <tt class="py-docstring">""" Parse the result from the server, and immeditately catch</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt> <tt class="py-line"><tt class="py-docstring"> possible errors."""</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt> <tt class="py-line"> <tt class="py-string">'jsubsetaim'</tt><tt class="py-op">:</tt> <tt class="py-name">_</tt><tt class="py-op">(</tt><tt class="py-string">'Core clinical journals'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-comment">#AIM - Abridged Index Medicus A list of core clinical journals created 20 years ago </tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt> <tt class="py-line"> <tt class="py-string">'jsubsetq'</tt><tt class="py-op">:</tt> <tt class="py-name">_</tt><tt class="py-op">(</tt><tt class="py-string">'History of Medicine journals'</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-comment">#Q - history of medicine journals, non-Index Medicus </tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt> <tt class="py-line"><tt class="py-docstring"> 'field' is a single value from self.query_fields.</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt> <tt class="py-line"><tt class="py-docstring"> 'publication_type' is a single value from self.publication_types, or None.</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt> <tt class="py-line"><tt class="py-docstring"> 'language' is from self.language or None</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt> <tt class="py-line"><tt class="py-docstring"> 'subset' is from self.subset or None</tt> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt> <tt class="py-line"><tt class="py-docstring"> 'age_range' is from self.age_range or None</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt> <tt class="py-line"><tt class="py-docstring"> 'human_animal' is from self.human_animal or None</tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt> <tt class="py-line"><tt class="py-docstring"> 'gender' is from self.gender or None</tt> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt> <tt class="py-line"><tt class="py-docstring"> If use_publication_date is True, select publications whose</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt> <tt class="py-line"><tt class="py-docstring"> publication date is between from_date and to_date, otherwise</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt> <tt class="py-line"><tt class="py-docstring"> use the entrez date.</tt> </tt>
<a name="L316"></a><tt class="py-lineno">316</tt> <tt class="py-line"> <tt class="py-comment"># We have the charge of setting and cleaning self._pending</tt> </tt>
<a name="L328"></a><tt class="py-lineno">328</tt> <tt class="py-line"> <tt class="py-keyword">assert</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_pending</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-string">'no more than one search at a time per connection'</tt> </tt>
<a name="L343"></a><tt class="py-lineno">343</tt> <tt class="py-line"> <tt class="py-keyword">assert</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_pending</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-string">'no more than one search at a time per connection'</tt> </tt>
<a name="L359"></a><tt class="py-lineno">359</tt> <tt class="py-line"> <tt class="py-comment"># Special case for no query: this would cause an error from</tt> </tt>
<a name="L360"></a><tt class="py-lineno">360</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># the server if we do not catch it first.</tt> </tt>
<a name="L376"></a><tt class="py-lineno">376</tt> <tt class="py-line"> <tt class="py-comment"># Parameters necessary to fetch the content of the result set</tt> </tt>
<a name="L389"></a><tt class="py-lineno">389</tt> <tt class="py-line"> <tt class="py-comment"># data is None during the initial call to the method,</tt> </tt>
<a name="L390"></a><tt class="py-lineno">390</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># so that we can reuse the same code.</tt> </tt>
Pyblio.Stores.bsddbstore.log" class="py-name" href="#" onclick="return doclink('link-86', 'log', 'link-50');">log</a></tt><tt class="py-op">.</tt><tt class="py-name">warn</tt><tt class="py-op">(</tt><tt class="py-string">"what happend? I increased the result set by %d"</tt> <tt class="py-op">%</tt> <tt class="py-name">freshly_parsed</tt><tt class="py-op">)</tt> </tt>
<a name="L398"></a><tt class="py-lineno">398</tt> <tt class="py-line"> <tt class="py-comment"># pretend there has been at least one parsing, so</tt> </tt>
<a name="L399"></a><tt class="py-lineno">399</tt> <tt class="py-line"><tt class="py-comment"></tt> <tt class="py-comment"># that we ensure that the task</tt> </tt>
<a name="L411"></a><tt class="py-lineno">411</tt> <tt class="py-line"> <tt class="py-comment"># No need to fetch 500 results if only 20 are requested</tt> </tt>
</div><div id="PubMed.cancel-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="PubMed.cancel-expanded"><a name="L434"></a><tt class="py-lineno">434</tt> <tt class="py-line"> <tt class="py-docstring">""" Cancel a running query. The database is not reverted to its</tt> </tt>
<a name="L435"></a><tt class="py-lineno">435</tt> <tt class="py-line"><tt class="py-docstring"> original state."""</tt> </tt>