<p>The BibDocFile library handles every interaction relation between records and related fulltext document files.</p>
<h2>Nomenclature</h2>
<p>
<dl>
<dt>record</dt><dd>the unit of information within Invenio. It is constituted by all the MARC metadata and have unique integer called <strong>Record ID</strong>.</dd>
<dt>fulltext</dt><dd>is a physical file connected to a record and often described by the record it self.</dd>
<dt>bibdoc</dt><dd>is an abstract document related to a record. It has a unique <strong>docname</strong> within the record, and is linked with multiple format and revision of fulltext files.</dd>
<dt>format (or extension)</dt><dd>is the extension associated with a physical file. Within a bibdoc, for a given version it can exist at most one file with a given format (e.g. .gif, .jpeg...)</dd>
<dt>version (or revision)</dt><dd>a progressive integer associated with a fulltext. The higher, the recent. Usually previous versions of a file are hidden.</dd>
</dl>
</p>
<h2>Python API</h2>
<p>Given a <tt>record_id</tt>, <tt>BibRecDocs(record_id)</tt> will be an object useful to represent all the bibdocs connected to a record.</p>
<p>Given a <tt>record_id</tt> and a <tt>docname</tt> or a <tt>document_id</tt>, <tt>BibDoc(recid=record_id, docname=docname)</tt> or <tt>BibDoc(docid=document_id)</tt> will be an object useful to represent all the possible version and formats of a document connected to a record.</p>
<p>By properly querying <tt>BibRecDocs</tt> and <tt>BibDoc</tt> you can obtain a <tt>BibDocFile</tt>. This is an object representing all the possible details related a single physical file, like a comment, a description, the path, the related URL, the size, the format, the version, the checksum, the protection...</p>
<p>See <a href="http://invenio-software.org/code-browser/invenio.legacy.bibdocfile.api-module.html">bibdocfile API</a> for a complete API description.</p>