</div><divid="_xml-collapsed"style="display:none;"pad="+++"indent="++++"></div><divid="_xml-expanded"><aname="L23"></a><ttclass="py-lineno"> 23</tt><ttclass="py-line"><ttclass="py-docstring">""" Parse the result from the server, and immeditately catch</tt></tt>
<aname="L24"></a><ttclass="py-lineno"> 24</tt><ttclass="py-line"><ttclass="py-docstring"> possible errors."""</tt></tt>
</div><divid="_r_info-collapsed"style="display:none;"pad="+++"indent="++++"></div><divid="_r_info-expanded"><aname="L35"></a><ttclass="py-lineno"> 35</tt><ttclass="py-line"><ttclass="py-docstring">""" Return (number of hits, number of searched records)."""</tt></tt>
</div><divid="WOK-collapsed"style="display:none;"pad="+++"indent="++++"></div><divid="WOK-expanded"><aname="L45"></a><ttclass="py-lineno"> 45</tt><ttclass="py-line"><ttclass="py-docstring">""" I represent a query session on the Web of Knowledge.</tt></tt>
<aname="L47"></a><ttclass="py-lineno"> 47</tt><ttclass="py-line"><ttclass="py-docstring"> The session is connected to a database whose schema is</tt></tt>
<aname="L54"></a><ttclass="py-lineno"> 54</tt><ttclass="py-line"><ttclass="py-comment"># This base URL is for IP-based authentification. Don't know how</tt></tt>
<aname="L55"></a><ttclass="py-lineno"> 55</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># other systems work.</tt></tt>
<aname="L58"></a><ttclass="py-lineno"> 58</tt><ttclass="py-line"><ttclass="py-comment"># Maximal number of results one can ask in a single result set.</tt></tt>
</div><divid="WOK._done-collapsed"style="display:none;"pad="+++"indent="++++++++"></div><divid="WOK._done-expanded"><aname="L107"></a><ttclass="py-lineno">107</tt><ttclass="py-line"><ttclass="py-docstring">""" Called in any case to mark the end of a pending request to</tt></tt>
<aname="L108"></a><ttclass="py-lineno">108</tt><ttclass="py-line"><ttclass="py-docstring"> the WOK server."""</tt></tt>
</div><divid="WOK.count-collapsed"style="display:none;"pad="+++"indent="++++++++"></div><divid="WOK.count-expanded"><aname="L114"></a><ttclass="py-lineno">114</tt><ttclass="py-line"><ttclass="py-docstring">""" Ask WOK for the number of results of a given query."""</tt></tt>
</div><divid="WOK.search-collapsed"style="display:none;"pad="+++"indent="++++++++"></div><divid="WOK.search-expanded"><aname="L133"></a><ttclass="py-lineno">133</tt><ttclass="py-line"><ttclass="py-docstring">""" Start a query on the WOK, and fill in the database with</tt></tt>
<aname="L134"></a><ttclass="py-lineno">134</tt><ttclass="py-line"><ttclass="py-docstring"> the matches.</tt></tt>
<aname="L139"></a><ttclass="py-lineno">139</tt><ttclass="py-line"><ttclass="py-docstring"> @return: a deferred that will fire when the query is</tt></tt>
<aname="L149"></a><ttclass="py-lineno">149</tt><ttclass="py-line"><ttclass="py-comment"># Limit our initial query to the max per batch amount.</tt></tt>
Pyblio.Schema.TxoItem.name"class="py-name"href="#"onclick="return doclink('link-44', 'name', 'link-44');">name</a></tt><ttclass="py-op">=</tt><ttclass="py-name">_</tt><ttclass="py-op">(</tt><ttclass="py-string">'Imported from Web of Knowledge'</tt><ttclass="py-op">)</tt></tt>
<aname="L167"></a><ttclass="py-lineno">167</tt><ttclass="py-line"><ttclass="py-comment"># We retrieve a first result containing the total, which might</tt></tt>
<aname="L168"></a><ttclass="py-lineno">168</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># lead to more hits afterward.</tt></tt>
<aname="L174"></a><ttclass="py-lineno">174</tt><ttclass="py-line"><ttclass="py-comment"># Now, we know how much records we are supposed to fetch</tt></tt>
<aname="L187"></a><ttclass="py-lineno">187</tt><ttclass="py-line"><ttclass="py-comment"># If not, the main deferred returns the result set and</tt></tt>
<aname="L188"></a><ttclass="py-lineno">188</tt><ttclass="py-line"><ttclass="py-comment"></tt><ttclass="py-comment"># the stats, as the DB itself has been modified in the</tt></tt>
</div><divid="WOK.cancel-collapsed"style="display:none;"pad="+++"indent="++++++++"></div><divid="WOK.cancel-expanded"><aname="L219"></a><ttclass="py-lineno">219</tt><ttclass="py-line"><ttclass="py-docstring">""" Cancel a running query. The database is not reverted to its</tt></tt>
<aname="L220"></a><ttclass="py-lineno">220</tt><ttclass="py-line"><ttclass="py-docstring"> original state."""</tt></tt>