<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>
<a name="L21"></a><tt class="py-lineno"> 21</tt> <tt class="py-line"><tt class="py-docstring">""" Basic data types that can be used as attributes for a L{Record</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt> <tt class="py-line"><tt class="py-docstring">Basic attributes of a record can be B{qualified} by one or more</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"><tt class="py-docstring">additional sub-attributes. For instance, an attribute I{author} of</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt> <tt class="py-line"><tt class="py-docstring">type L{Person} can have, for every Person instance, a sub-attribute of</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt> <tt class="py-line"><tt class="py-docstring">type L{Date} that represents its birth date."""</tt> </tt>
</div><div id="_Qualified-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_Qualified-expanded"><a name="L41"></a><tt class="py-lineno"> 41</tt> <tt class="py-line"> <tt class="py-docstring">""" Mix-in class that provides qualifiers to attributes, making</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt> <tt class="py-line"><tt class="py-docstring"> them behave like composite data types (but not arbitrarily nested</tt> </tt>
</div><div id="_Qualified.is_complete-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_Qualified.is_complete-expanded"><a name="L71"></a><tt class="py-lineno"> 71</tt> <tt class="py-line"> <tt class="py-docstring">"""Returns True if the field has an actual value (ie, hasn't</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt> <tt class="py-line"><tt class="py-docstring"> been created by adding qualifiers only)"""</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt> <tt class="py-line"><tt class="py-docstring"> It is used, when you add qualifiers before you add the main field</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt> <tt class="py-line"><tt class="py-docstring"> to a record. Trying to store it will raise an error.</tt> </tt>
</div><div id="URL.index-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="URL.index-expanded"><a name="L324"></a><tt class="py-lineno">324</tt> <tt class="py-line"> <tt class="py-comment"># do not index the document suffix, only the server name and document page</tt> </tt>
<a name="L383"></a><tt class="py-lineno">383</tt> <tt class="py-line"><tt class="py-docstring"> In the simplest case, this can be seen as a value in a enumerated</tt> </tt>
<a name="L384"></a><tt class="py-lineno">384</tt> <tt class="py-line"><tt class="py-docstring"> set of possible values. The possible values are defined as</tt> </tt>
<a name="L385"></a><tt class="py-lineno">385</tt> <tt class="py-line"><tt class="py-docstring"> L{Pyblio.Schema.TxoItem}s, and are stored in the</tt> </tt>
<a name="L386"></a><tt class="py-lineno">386</tt> <tt class="py-line"><tt class="py-docstring"> L{Store.Database}, in the B{txo} attribute, and L{Store.Record}s</tt> </tt>
<a name="L387"></a><tt class="py-lineno">387</tt> <tt class="py-line"><tt class="py-docstring"> can contain Txo attributes which refer to these</tt> </tt>
<a name="L388"></a><tt class="py-lineno">388</tt> <tt class="py-line"><tt class="py-docstring"> L{Pyblio.Schema.TxoItem}s. Say you have a list of known document</tt> </tt>
<a name="L389"></a><tt class="py-lineno">389</tt> <tt class="py-line"><tt class="py-docstring"> types in the I{document-type} taxonomy. You can then affect the</tt> </tt>
<a name="L390"></a><tt class="py-lineno">390</tt> <tt class="py-line"><tt class="py-docstring"> document type to the I{type} attribute of a record with the</tt> </tt>
<a name="L391"></a><tt class="py-lineno">391</tt> <tt class="py-line"><tt class="py-docstring"> following operations:</tt> </tt>
<a name="L443"></a><tt class="py-lineno">443</tt> <tt class="py-line"> <tt class="py-comment"># If 'other' is not of the proper type, simply consider</tt> </tt>
<a name="L456"></a><tt class="py-lineno">456</tt> <tt class="py-line"><tt class="py-comment"># A mapping between class names and class objects</tt> </tt>