User's Manual

126 Chapter 11. Services Tutorials
removeChild(ACSObject object) is used to delete a mapping with a child.
http://rhea.redhat.com/documentation/api/ccm-core-
6.1.0/com/arsdigita/categorization/Category.html\
#removeChild(com.arsdigita.kernel.ACSObject)
getChildren() returns all subcategories for the given category. See CategoryCollection.
http://rhea.redhat.com/documentation/api/ccm-core-
6.1.0/com/arsdigita/categorization/Category.html\ #getChildren()
getObjects() returns all objects categorized within the instance Category.
http://rhea.redhat.com/documentation/api/ccm-core-
6.1.0/com/arsdigita/categorization/Category.html\ #getObjects()"
com.arsdigita.categorization.CategoryCollection
A collection of categories, e.g. children of the same parent category.
com.arsdigita.categorization.CategorizedCollection
A collection of (non-category) objects, e.g. child objects of a category.
com.arsdigita.categorization.CategorizedObject
http://rhea.redhat.com/documentation/api/ccm-core-
6.1.0/com/arsdigita/categorization/CategorizedObject.html
A convenience wrapper for working with the leaf nodes of a category scheme. Methods within
CategorizedObject can be used to retrieve the parent categories or default ancestors of the
object.
Other Classes
These classes work together to provide access to a Bebop Tree that can be used to display the
category tree:
com.arsdigita.categorization.CategoryTreeModelLite
http://rhea.redhat.com/documentation/api/ccm-core-
6.1.0/com/arsdigita/categorization/CategoryTreeModelLite.html
com.arsdigita.categorization.CategoryTreeNodeLite
http://rhea.redhat.com/documentation/api/ccm-core-
6.1.0/com/arsdigita/categorization/CategoryTreeNodeLite.html
These classes are not of much importance to you unless you want to change the way the tree
appears. Displaying a category hierarchy is a multiple-step process. First, create a TreeModel-
Builder that will instantiate a CategoryTreeModelLite (based either on a query or some
other external data source). This TreeModelBuilder is passed to the Tree, which uses your
builder to create its TreeModel. This process is necessary since a DataObject cannot be used
across connections.
11.2. Categorization Scenarios
11.2.1. Creating a new Category
// Creates the Movies category at the top level with a description