What is a Taxonomy

Overview

Taxonomies are used to sort documents in order to ease the search when browsing documents online. The main idea behing that concept is to provide a multi dimentional set of paths to find a document. The best example is when you browse Yahoo news. In many cases, you can get to your content using different category paths. Therefore, after creating a document somewhere in the repository, it is possible to categorize it by adding several taxonomy references. Then by browsing the taxonomy tree, it will be possible to find the referencing article and display them as if they were children of the taxonomy nodes. As you can imagine, toxonomies are stored in the JCR itself and we are using the JCR Reference functionnality to provide that advanced ECM feature.

Managing the tree of taxonomies is very simple, you can copy/cut nodes and paste them. Of course you can add and remove taxonomies from the tree. Once a taxonomy has been added, any user that has access to the "Manage Categories" icons from their views can then browse the taxonomy tree and reference one of its node from the created document.

Manage categories service

Note : The file describes below is located at /portal/WEB-INF/conf/ecm/ecm-categories-configuration.xml

<component>
    <key>org.exoplatform.services.cms.categories.CategoriesService</key>  
    <type>org.exoplatform.services.cms.categories.impl.CategoriesServiceImpl</type>
    ..............
  </component>

The service accept plugins that can define new taxonomies

<component-plugin>
      <name>predefinedTaxonomyPlugin</name>
      <set-method>addTaxonomyPlugin</set-method>
      <type>org.exoplatform.services.cms.categories.impl.TaxonomyPlugin</type>
      ...............

Here we can find the syntax for the plugin parameters:

<init-params>
            <object-param>
              <name>taxonomy.configuration</name>
              <description>configuration predefined taxonomies to inject in jcr</description>
              <object type="org.exoplatform.services.cms.categories.impl.TaxonomyConfig">
                <field  name="taxonomies">
                  <collection type="java.util.ArrayList">
                    <value>
                      <object type="org.exoplatform.services.cms.categories.impl.TaxonomyConfig$Taxonomy">
                        <field  name="name"><string>cmsTaxonomy</string></field>                                 
                        <field  name="path"><string>/cms</string></field>                       
                      </object>
                    </value>
                    <value>  
                      <object type="org.exoplatform.services.cms.categories.impl.TaxonomyConfig$Taxonomy">
                        <field  name="name"><string>newsTaxonomy</string></field>              
                        <field  name="path"><string>/cms/news</string></field>             
                      </object>
                    </value>
                    <value>
                      <object type="org.exoplatform.services.cms.categories.impl.TaxonomyConfig$Taxonomy">
                        <field  name="name"><string>sportsTaxonomy</string></field>              
                        <field  name="path"><string>/cms/sports</string></field>              
                      </object>
                    </value>
                    <value>
                      <object type="org.exoplatform.services.cms.categories.impl.TaxonomyConfig$Taxonomy">
                        <field  name="name"><string>worldTaxonomy</string></field>              
                        <field  name="path"><string>/cms/news/world</string></field>                
                      </object>
                    </value>
                    <value>
                      <object type="org.exoplatform.services.cms.categories.impl.TaxonomyConfig$Taxonomy">
                        <field  name="name"><string>economyTaxonomy</string></field>             
                        <field  name="path"><string>/cms/news/economy</string></field>             
                      </object>
                    </value>
                    <value>
                      <object type="org.exoplatform.services.cms.categories.impl.TaxonomyConfig$Taxonomy">
                        <field  name="name"><string>footballTaxonomy</string></field>              
                        <field  name="path"><string>/cms/sports/football</string></field>                                             
                      </object>
                    </value>
                    <value>
                      <object type="org.exoplatform.services.cms.categories.impl.TaxonomyConfig$Taxonomy">
                        <field  name="name"><string>champions-leagueTaxonomy</string></field>            
                        <field  name="path"><string>/cms/sports/football/champions-league</string></field>                                    
                      </object>
                    </value>
                    <value>
                      <object type="org.exoplatform.services.cms.categories.impl.TaxonomyConfig$Taxonomy">
                        <field  name="name"><string>uefaTaxonomy</string></field>                                      
                        <field  name="path"><string>/cms/sports/football/uefa</string></field>                                                            
                      </object>
                    </value>
                  </collection>
                </field>                      
              </object>
          </object-param>
          </init-params>

How is it working

The taxonomy is stored in the JCR at the path /jcr:system/exo:ecm/exo:taxonomies. All the node of the taxonomy is of type exo:taxonomy. The name of the category is the path to this category so for example /cms/sports/football/champions-league.

A categorized document has the mixin exo:categorized and in the property exo:category contains the list of reference to the taxonomy tree.


Creator: Administrator on 2007/05/22 17:48
Copyright (c) 2000-2009. Allright reserved - eXo platform SAS
1.6.13286