The Categorization service provides an infrastructure for developers to categorize arbitrary content within the system.
Categories are organized hierarchically. A (parent) category may have related subcategories. A subcategory may have more than one parent. One of these parents may be designated as the default parent (see {@link com.arsdigita.categorization.Category#setDefaultParentCategory(Category)}). Categories are usually organized as a tree where each category except one has a default parent. The single category with no parents is called the root category.
In the above example, the "Televised events" is the only one that has two parents. Its default parent is "TV Shows", and the other parent "Sports". Whether or not a category is the default parent of another category influences operation of many methods. See, for example, {@link com.arsdigita.categorization.Category#deleteCategorySubtree()}.
You can categorize an object by adding it to a category via the {@link com.arsdigita.categorization.Category#addChild(ACSObject)} method. An object can belong to more than one category.
The above example shows three categorized objects. The movie Jaws and the show Iron Chef are categorized under a single category each, whereas The Natural is categorized under two.
An application may have more than one category tree. These separate category trees are distinguished by tying their roots to selected anchor objects. Say, you have a content section. Within the content section, you want to make use of three different category trees: one for your Human Resources department, another one for Legal, and the third one for Marketing. This can be achieved via {@link com.arsdigita.categorization.Category#setRootForObject(ACSObject, Category, String)}, by using your content section object as the anchor and by mapping each of the respective category roots to it, with diffrent use contexts.
The {@link com.arsdigita.categorization.Category} class is the central class in this package and an entry point to most of the functionality provided by the categorization service. The {@link com.arsdigita.categorization.Categorization} class provides a number of (static) utility methods.