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 &key value order)
<i>function
</i></p>
4 <blockquote>Apply TERM to ITEM, optionally setting its value to VALUE.
</blockquote><p><b>cl-store-valued-taxonomy
</b> <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 :item-dao-class :encoder :decoder
</tt></blockquote>
7 <p>(
<b>deftaxonomy
</b> name (&optional (class (quote taxonomy))) &rest args)
<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> <i><font color=
"FF0000">undocumented
</font></i></p>
11 <p>(
<b>ensure-taxonomy
</b> taxonomy)
<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 &key text slug create-p)
<i>function
</i></p>
13 <blockquote>Find or create term in taxonomy TAXONOMY.
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
19 If SLUG is given instead of TEXT, only search is possible, not
20 creation.
</blockquote><p>(
<b>find-terms
</b> &key taxonomy text slug)
<i>function
</i></p>
21 <blockquote>Find list of terms satisfying given keywords.
</blockquote><p>(
<b>id
</b> x)
<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> <i><font color=
"FF0000">undocumented
</font></i></p>
25 <p>(
<b>item-terms
</b> item &optional taxonomy)
<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 text &optional parent)
<i>function
</i></p>
29 <blockquote>Create new term in TAXONOMY, with full name TEXT.
</blockquote><p>(
<b>order-item-terms
</b> item terms &key taxonomy null-other-terms)
<i>function
</i></p>
30 <blockquote>Set TERMS (a list of terms or term IDs), associated with ITEM, in given order.
32 If NULL-OTHER-TERMS is not NIL, terms not listed in TERMS get their
33 order column set to NULL. If TAXONOMY is given, restrict changes to
34 terms of given taxonomy.
</blockquote><p>(
<b>setup-taxonomy-sql
</b> &key item)
<i>function
</i></p>
35 <blockquote>List of SQL statements, suitable for TRANE-COMMON:EXECUTE*, to initialize database for Trane Taxonomy module.
37 ITEM is an optional arguments that, if given, specifies foreign key
38 reference on term's associated item_id columns. It can be a DAO
39 class, a symbol naming one, or a list literally specifying S-SQL's
40 foreign key (as for :CREATE-TABLE sql-op :REFERENCES constraint).
</blockquote><p>(
<b>slug
</b> x)
<i>generic-function
</i></p>
41 <blockquote>Get short, unique, urlified name of OBJECT.
</blockquote><p><b>taxonomy
</b> <i>class
</i></p>
42 <blockquote>Base taxonomy class.
44 Taxonomy has a name (symbol or string, which is transformed to a
45 keyword by DEFTAXONOMY), and refers to DAO classes of taxonomy's ITEM.
46 DAO classes are required to have an integer primary key, accessible by
47 reader named ID.
</blockquote><blockquote>Class precedence list:
<tt> taxonomy standard-object t
</tt></blockquote>
48 <blockquote>Class init args:
<tt> :name :item-dao-class
</tt></blockquote>
49 <p>(
<b>taxonomy
</b> term)
<i>function
</i></p>
50 <blockquote>TERM's taxonomy object
</blockquote><p><b>TAXONOMY-NAME
</b></p> <i><font color=
"FF0000">undocumented
</font></i></p>
51 <p>(
<b>taxonomy-slug
</b> taxonomy)
<i>function
</i></p>
52 <blockquote>Return name of taxonomy for database or URL (lowercased string).
54 Applicable to taxonomy objects, symbols and strings.
</blockquote><p><b>term
</b> <i>class
</i></p>
55 <blockquote>Class for a term associated with taxonomy.
</blockquote><blockquote>Class precedence list:
<tt> term standard-object t
</tt></blockquote>
56 <blockquote>Class init args:
<tt> :text :taxonomy-name :description
</tt></blockquote>
57 <p>(
<b>term-item-ids
</b> term)
<i>function
</i></p>
58 <blockquote>IDs of items associated with given TERM.
</blockquote><p>(
<b>term-items
</b> term)
<i>function
</i></p>
59 <blockquote>Items associated with given TERM.
</blockquote><p>(
<b>term-taxonomy
</b> term)
<i>function
</i></p>
60 <blockquote>TERM's taxonomy object
</blockquote><p><b>TERM-TAXONOMY-NAME
</b></p> <i><font color=
"FF0000">undocumented
</font></i></p>
61 <p><b>TERM-TEXT
</b></p> <i><font color=
"FF0000">undocumented
</font></i></p>
62 <p>(
<b>term-value
</b> item term)
<i>function
</i></p>
63 <blockquote>Returns value that association of ITEM and TERM is set to.
65 As a second value returns T if an association was found at all,
66 NIL otherwise. This makes it possible to tell between an
67 association with a NIL value and no association at all.
69 Third value is a term ordering value, if ordering is set.
</blockquote><p>(setf (
<b>term-value
</b> item term) new-value)
<i>function
</i></p>
70 <blockquote>Set new value for association of ITEM and TERM.
72 New association between ITEM and TERM is established if it was
73 not present before.
</blockquote><p>(
<b>unbind-term
</b> item term)
<i>function
</i></p>
74 <blockquote>Deletes association between ITEM and TERM.
76 If PURGE-EMPTY is non-NIL (default), deletes also from TERM table if
77 no more items refer to this term.
</blockquote><p><b>valued-taxonomy
</b> <i>class
</i></p>
78 <blockquote>Taxonomy where items applied to terms may have values.
80 Defines encoder and decoder function slots, which are responsible
81 for translating value from a Lisp value to DB-safe string. By
82 default it is identity function, which means values need to be
83 strings.
</blockquote><blockquote>Class precedence list:
<tt> valued-taxonomy taxonomy standard-object t
</tt></blockquote>
84 <blockquote>Class init args:
<tt> :name :item-dao-class :encoder :decoder
</tt></blockquote>
85 <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>