Index: openacs-4/packages/acs-content-repository/www/doc/guide/keywords.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/www/doc/guide/keywords.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-content-repository/www/doc/guide/keywords.adp 27 Oct 2014 16:39:15 -0000 1.2
+++ openacs-4/packages/acs-content-repository/www/doc/guide/keywords.adp 7 Aug 2017 23:47:47 -0000 1.3
@@ -1,37 +1,49 @@
-
+
Subject Keywords are used to implement categorization
for the Content Management system. A Subject Keyword is a small
-label, such as "Oracle Documentation" or "My Favorite Foods", which
-can be associated with any number of content items. Thus, content
-items may be grouped by arbitrary categories. For example,
-assigning the Subject Keyword "My Favorite Foods" to the content
-items "Potstickers", "Strawberries" and "Ice Cream" would indicate
+label, such as "Oracle Documentation" or "My
+Favorite Foods", which can be associated with any number of
+content items. Thus, content items may be grouped by arbitrary
+categories. For example, assigning the Subject Keyword "My
+Favorite Foods" to the content items "Potstickers",
+"Strawberries" and "Ice Cream" would indicate
that all the three items belong in the same category - namely, the
-category of the user's favorite foods. The actual physical location
-of these items within the repository is irrelevant. Subject Keywords may be nested to provide more detailed control
-over categorization; for example, "My Favorite Foods" may be
-further subdivided into "Healthy" and "Unhealthy". Subject Keywords
-which have descendants are referred to as "Subject
-Categories". The content_keyword object type is used to represent
-Subject Keywords (see content_keyword.sql) The
-content_keyword type inherits from
-acs_object:Subject Keywords (Categories)
Overview
Subject Keywords (Categories)
+
+Content Repository : Developer
+Guide
+
+Overview
+Data Model
+category of the user's favorite foods. The actual physical
+location of these items within the repository is irrelevant.
Subject Keywords may be nested to provide more detailed control +over categorization; for example, "My Favorite Foods" may +be further subdivided into "Healthy" and +"Unhealthy". Subject Keywords which have descendants are +referred to as "Subject Categories".
+The content_keyword object type is used to represent +Subject Keywords (see content_keyword.sql) The +content_keyword type inherits from +acs_object:
+acs_object_type.create_type ( supertype => 'acs_object', object_type => 'content_keyword', pretty_name => 'Content Keyword', pretty_plural => 'Content Keywords', table_name => 'cr_keywords', id_column => 'keyword_id', name_method => 'acs_object.default_name' );-In addition, the cr_keywords table (see -content-create.sql) contains extended attributes of + +In addition, the cr_keywords + table (see +content-create.sql +) contains extended attributes of Subject Keywords:
create table cr_keywords ( @@ -44,7 +56,9 @@ description varchar2(4000) );-In content-keyword.sql: + +In content-keyword.sql +:
attr_id := acs_attribute.create_attribute ( object_type => 'acs_object', @@ -61,11 +75,15 @@ pretty_name => 'Description', pretty_plural => 'Descriptions' ); -
Thus, each Subject Keyword has a heading, which is a -user-readable heading for the keyword, and a description, -which is a somewhat longer description of the keyword.
The cr_item_keyword_map table (see -content-create.sql) is used to relate content items to -keywords:
++
Thus, each Subject Keyword has a heading, which is a +user-readable heading for the keyword, and a +description, which is a somewhat longer description of +the keyword.
+The cr_item_keyword_map table (see +content-create.sql) is used to relate content items to +keywords:
+create table cr_item_keyword_map ( item_id integer constraint cr_item_keyword_map_item_fk @@ -80,19 +98,22 @@ constraint cr_item_keyword_map_pk primary key (item_id, keyword_id) ); -
The API used to access and modify content keywords are outlined + +
The API used to access and modify content keywords are outlined below. The function names are links that will take you to a more -detailed description of the function and its parameters.
Function/Procedure | Purpose | Description | |||
---|---|---|---|---|---|
new | Create a new Subject Keyword | This is a standard new function, used to create a new -Subject Keyword. If the parent id is specified, the new keword + | new | Create a new Subject Keyword | This is a standard new function, used to create a +new Subject Keyword. If the parent id is specified, the new keword becomes a child of the parent keyword (which may now be called a Subject Category) |
delete | Delete a Subject Keyword | This is a standard delete function, used to delete a + | delete | Delete a Subject Keyword | This is a standard delete function, used to delete a Subject Keyword |
@@ -106,25 +127,28 @@ | Assign Keywords to Items | These functions should be used to assign Subject Keywords to
content items, to unassign keywords from items, and to determine
whether a particular keyword is assigned to an item.
- The is_assigned function can be used to determine if a -keyword matches a content item, based on the recurse + The is_assigned function can be used to determine if +a keyword matches a content item, based on the recurse parameter:
|