- HTML apidocs
[cl-trane.git] / doc / TRANE-TAXONOMY.html
blob33818239a1a3eb21dbad2c797b2525a24da768a8
1 <html><head><title>TRANE-TAXONOMY</title></head><body><h3>API for package TRANE-TAXONOMY</h3>
2 <blockquote>UNDOCUMENTED</blockquote>
3 <p>(<b>apply-term</b> item term &optional value)&nbsp;&nbsp;&nbsp;<i>function</i></p>
4 <blockquote>Apply TERM to ITEM, optionally setting its value to VALUE.</blockquote><p><b>cl-store-valued-taxonomy</b>&nbsp;&nbsp;&nbsp;<i>class</i></p>
5 <blockquote>Valued taxonomy that by default encodes/decodes almost any Lisp object with CL-STORE as BASE64 string.</blockquote><blockquote>Class precedence list: <tt> cl-store-valued-taxonomy valued-taxonomy taxonomy standard-object t</tt></blockquote>
6 <blockquote>Class init args: <tt> :name :site-dao-class :item-dao-class :encoder :decoder</tt></blockquote>
7 <p>(<b>deftaxonomy</b> name (&optional (class (quote taxonomy))) &rest args)&nbsp;&nbsp;&nbsp;<i>function</i></p>
8 <blockquote>Defines taxonomy named NAME, with class CLASS and initargs ARGS, and remembers it in *TAXONOMIES*.
10 NAME is symbol or string, which will be transformed to a keyword anyway.</blockquote><p><b>DESCRIPTION</b></p>&nbsp;&nbsp;&nbsp;<i><font color="FF0000">undocumented</font></i></p>
11 <p>(<b>ensure-taxonomy</b> taxonomy)&nbsp;&nbsp;&nbsp;<i>function</i></p>
12 <blockquote>If TAXONOMY is a taxonomy object, return it, otherwise find and return taxonomy named TAXONOMY.</blockquote><p>(<b>ensure-term</b> taxonomy site &key text slug create-p)&nbsp;&nbsp;&nbsp;<i>function</i></p>
13 <blockquote>Find or create term in taxonomy TAXONOMY for site SITE.
15 TEXT is a full text of term; if TEXT is given, CREATE-P is
16 non-NIL and term is not found, new term is inserted into
17 database.
19 If SLUG is given instead of TEXT, only search is possible, not
20 creation.</blockquote><p>(<b>find-terms</b> &key taxonomy site text slug)&nbsp;&nbsp;&nbsp;<i>function</i></p>
21 <blockquote>Find list of terms satisfying given keywords.</blockquote><p>(<b>id</b> object)&nbsp;&nbsp;&nbsp;<i>generic-function</i></p>
22 <blockquote>Numeric ID or :NULL for DAOs and, if it makes sense, other objects.
24 Usually it will be a reader method automatically defined for ID column of a DAO.</blockquote><p><b>ITEM-DAO-CLASS</b></p>&nbsp;&nbsp;&nbsp;<i><font color="FF0000">undocumented</font></i></p>
25 <p>(<b>item-terms</b> item &optional taxonomy)&nbsp;&nbsp;&nbsp;<i>function</i></p>
26 <blockquote>List TERMs associated with ITEM in given TAXONOMY.
28 If TAXONOMY is not given, returns terms in all taxonomies.</blockquote><p>(<b>new-term</b> taxonomy site text &optional parent)&nbsp;&nbsp;&nbsp;<i>function</i></p>
29 <blockquote>Create new term in SITE for TAXONOMY, with full name TEXT.</blockquote><p><b>SITE-DAO-CLASS</b></p>&nbsp;&nbsp;&nbsp;<i><font color="FF0000">undocumented</font></i></p>
30 <p>(<b>slug</b> object)&nbsp;&nbsp;&nbsp;<i>generic-function</i></p>
31 <blockquote>Get short, unique, urlified name of OBJECT.</blockquote><p><b>taxonomy</b>&nbsp;&nbsp;&nbsp;<i>class</i></p>
32 <blockquote>Base taxonomy class.
34 Taxonomy has a name (symbol or string, which is transformed to a
35 keyword by DEFTAXONOMY), and refers to DAO classes of taxonomy's
36 SITE and ITEM. DAO classes are required to have an integer
37 primary key, accessible by reader named ID.</blockquote><blockquote>Class precedence list: <tt> taxonomy standard-object t</tt></blockquote>
38 <blockquote>Class init args: <tt> :name :site-dao-class :item-dao-class</tt></blockquote>
39 <p>(<b>taxonomy</b> term)&nbsp;&nbsp;&nbsp;<i>function</i></p>
40 <blockquote>TERM's taxonomy object</blockquote><p><b>TAXONOMY-NAME</b></p>&nbsp;&nbsp;&nbsp;<i><font color="FF0000">undocumented</font></i></p>
41 <p>(<b>taxonomy-slug</b> taxonomy)&nbsp;&nbsp;&nbsp;<i>function</i></p>
42 <blockquote>Return name of taxonomy for database or URL (lowercased string).
44 Applicable to taxonomy objects, symbols and strings.</blockquote><p><b>term</b>&nbsp;&nbsp;&nbsp;<i>class</i></p>
45 <blockquote>Class for a term associated with taxonomy and a site.</blockquote><blockquote>Class precedence list: <tt> term standard-object t</tt></blockquote>
46 <blockquote>Class init args: <tt> :text :site-id :taxonomy-name :description</tt></blockquote>
47 <p>(<b>term-item-ids</b> term)&nbsp;&nbsp;&nbsp;<i>function</i></p>
48 <blockquote>IDs of items associated with given TERM.</blockquote><p>(<b>term-items</b> term)&nbsp;&nbsp;&nbsp;<i>function</i></p>
49 <blockquote>Items associated with given TERM.</blockquote><p>(<b>term-site</b> term)&nbsp;&nbsp;&nbsp;<i>function</i></p>
50 <blockquote>TERM's site object, if TERM is associated with a SITE.</blockquote><p><b>TERM-SITE-ID</b></p>&nbsp;&nbsp;&nbsp;<i><font color="FF0000">undocumented</font></i></p>
51 <p><b>TERM-TAXONOMY-NAME</b></p>&nbsp;&nbsp;&nbsp;<i><font color="FF0000">undocumented</font></i></p>
52 <p><b>TERM-TEXT</b></p>&nbsp;&nbsp;&nbsp;<i><font color="FF0000">undocumented</font></i></p>
53 <p>(<b>term-value</b> item term)&nbsp;&nbsp;&nbsp;<i>function</i></p>
54 <blockquote>Returns value that association of ITEM and TERM is set to.
56 As a second value returns T if an association was found at all,
57 NIL otherwise. This makes it possible to tell between an
58 association with a NIL value and no association at all.</blockquote><p>(setf (<b>term-value</b> item term) new-value)&nbsp;&nbsp;&nbsp;<i>function</i></p>
59 <blockquote>Set new value for association of ITEM and TERM.
61 New association between ITEM and TERM is established if it was
62 not present before.</blockquote><p>(<b>unbind-term</b> item term)&nbsp;&nbsp;&nbsp;<i>function</i></p>
63 <blockquote>Deletes association between ITEM and TERM.</blockquote><p><b>valued-taxonomy</b>&nbsp;&nbsp;&nbsp;<i>class</i></p>
64 <blockquote>Taxonomy where items applied to terms may have values.
66 Defines encoder and decoder function slots, which are responsible
67 for translating value from a Lisp value to DB-safe string. By
68 default it is identity function, which means values need to be
69 strings.</blockquote><blockquote>Class precedence list: <tt> valued-taxonomy taxonomy standard-object t</tt></blockquote>
70 <blockquote>Class init args: <tt> :name :site-dao-class :item-dao-class :encoder :decoder</tt></blockquote>
71 <font size=-1><p>Documentation generated by <a href="http://homepage.mac.com/svc/lispdoc/">lispdoc</a> running on Clozure Common Lisp</p></font></body></html>