Taxonomies

Taxonomies are a way of organizing and aggregating content.

Overview #

Traditionally in Liferay you have only one vocabulary with tags that you can use to classify your contents later search and aggregate them using this tags.

With the new taxonomy system implemented from Liferay Portal 5.2 you can have more than one vocabulary. You can create category trees vocabularies in order to tag your contents and classify them. The Tags Admin portlet has been redesigned and extended in order to support the hierarchical categories concept and now you can create taxonomies or folksonomies inside Liferay.

Taxonomies versus folksonomies #

The main difference between taxonomies and folksonomies is that in taxonomies a closed set of tags, which in Liferay are called "categories" are created and organized in a hierarchical way by the site administrator. Folksonomies are an open set of tags, which in Liferay are called "tags", that could be extended by the end user.

In order to support taxonomies when you create a new vocabulary you must specify if it is a folksonomy or not using the correct editor mode in Tags Admin portlet. The mode is selected using the buttons in the upper left corner just under the search field. For folksonomy, select the "Tag Sets" button, for taxonomy, select the "Categories" button.

In the next screenshot you can see a folksonomy created for tagging photos.

and in this other capture you can see how we have created a partial taxonomy with hierarchical categories to classify the different olympic games sports.

In order to build the tree you need to add categories and then you can drag and drop them to the correct parent category.

Using taxonomies in your portlets #

The taglibs used for folksonomies, have been extended with a new boolean folksonomy param. To display the tags with which users have classified their contents, set this param to true. As an example, to show folksonomy for a particular WebContent journal article, you could use

 
<liferay-ui:tags-summary className="<%= JournalArticle.class.getName() %>" classPK="<%=article.getResourcePrimKey()%>" folksonomy="true" /> }}}

in java code, you can get an array of user defined tags for a particular article with

String[] tagsEntries = TagsEntryLocalServiceUtil.getEntryNames(
  JournalArticle.class.getName(),
  article.getResourcePrimaryKey(),true);

Taxonomies (tags and categories) have permission settings and will not be accessible from portlet code if permissions are not set correctly.

Current limitations #

Right now the system does not support the searching using the full category tree (including the parents of the searched category). Also, it does not support hierarchies with more than one parent for a child node.

Related documents #

2 添付ファイル
59058 参照数
平均 (1 投票)
平均評価は3.0星中の5です。
コメント
コメント 作成者 日時
Im very interested in this feature. I thing... Rocco Russo 2008/10/29 3:16
Good point! It would be nice to support a... Jonas Yuan 2009/08/26 12:30
Can you expand on the "param" concept in the... Chris Rocco 2008/12/30 9:07
I am also confused,can anybodu explain "param"... Archi Madhu 2010/01/17 21:34
I updated the entry with an example using the... Tim McGuire 2010/05/14 9:40
Just a simple comment. This explains how to... Iñaki Paz Rey 2009/02/23 2:33
There is something missing here. "So if you... Susan Lacis 2009/05/14 15:46
Or is the word "the" a mistake? The sentence... Juha J 2009/11/10 11:13
Can someone define vocabulary in the context of... Samuel Liu 2010/07/12 16:11
Hello. I'm looking for the same answers. But I... Paulo Pacheco 2011/02/03 12:03
thanks for this, i also read the docs in drupal... Don Baonguis 2011/04/20 15:53
Hi. I've tried to add a property which value... Marcus Alves 2011/11/01 10:06

Im very interested in this feature. I thing that Tags are only the first step to approach a sematic clasification of the contents. I'd like to kwon if in future will be possible to build a complete ontology. In this way all contents can be classified as instance and their properties can be used to navigate through the concept declared in the ontology.
投稿日時:08/10/29 3:16
Can you expand on the "param" concept in the "using taxonomies in your portlets" section above?

Will this allow me to expose/select category tags via Asset Publisher? I can create Categories and Vocabularies, but can not select them via the asset publisher for display.

Q2: Are their any plans to deprecate the "Type" field in Journal and replace it with Category selection?

Thanks,
Chris
投稿日時:08/12/30 9:07
Just a simple comment.
This explains how to create taxonomies, etc. but there is something I miss. What are the properties? How are they used?
Thanks,
Iñaki
投稿日時:09/02/23 2:33
There is something missing here.

"So if you want the (WORD MISSING) to use categories for classifying your contents, you must use this param in order to show the use the correct visual component."
投稿日時:09/05/14 15:46
Good point! It would be nice to support a sematic clasification of assets and to build a complete ontology, based on tags and taxonomies. Looking forward to seeing this feature, too.
Rocky Russianへのコメント。投稿日時:09/08/26 12:30
Or is the word "the" a mistake? The sentence would make sense without it: "So if you want to use categories for classifying your contents, you must use this param in order to show the use the correct visual component."
Susan L Lacisへのコメント。投稿日時:09/11/10 11:13
I am also confused,can anybodu explain "param" part?
Also these categories are used in only web contents?I mean can we use it for document library for classificaton?
Chris Roccoへのコメント。投稿日時:10/01/17 21:34
I updated the entry with an example using the folksonomy param. I looked in the liferay source code in TagsSummaryTag.java
Archi Madhuへのコメント。投稿日時:10/05/14 9:40
Can someone define vocabulary in the context of Liferay? What exactly is a vocabulary and what does it do? This isn't very well explained -- when I go to the category page and see "Add Vocabulary" as well as "Add Category," I ask two questions

1) What is a vocabulary? I haven't heard this used in the context of websites before.
2) What does it have to do with categories? I know what categories are, on the other hand.
投稿日時:10/07/12 16:11
Hello.
I'm looking for the same answers. But I found nothing about it in my studies or the Wiki isn't easy to understand. I found some answers in the Drupal's forum. Here is the address: http://drupal.org/documentation/modules/taxonomy
Samuel Liuへのコメント。投稿日時:11/02/03 12:03
thanks for this, i also read the docs in drupal site.. but STILL i dont know what is the purpose of the key/value pairs for the categories in liferay? :-(
Paulo Blaschke Pachecoへのコメント。投稿日時:11/04/20 15:53
Hi. I've tried to add a property which value was a URL (sample: URL - www.brasil.gov.br ), but Liferay did not accept this. Anyone knows why this occurred? Thanks in advance.
投稿日時:11/11/01 10:06