You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Estelle Carr <es...@gmail.com> on 2007/06/05 16:42:02 UTC

Content Categorization in Jackrabbit?

According to the JSR-170 request (http://jcp.org/en/jsr/detail?id=170#2):

'A content repository implements "content services" such as: author based
versioning, full textual searching, fine grained access control, content
categorization and content event monitoring.'

Does anyone know if Jackrabbit supports content categorization, and if so,
how is this achieved?

Many thanks.

Re: Content Categorization in Jackrabbit?

Posted by Christoph Kiehl <ch...@sulu3000.de>.
Jukka Zitting wrote:

> 2) Use referenceable category nodes and have the categorized content
> nodes reference the category nodes. This approach is similar to the
> one above, but allows you to better control the available categories
> and to express category metadata and hierarchies.
> 
>    [my:category] > mix:referenceable
> 
>    [my:type]
>    - my:categories (REFERENCE) multiple < my:category

We actually use this solution. But there is one caveat: if you have got more 
than 2000 nodes that reference the _same_ category you should use STRING instead 
of REFERENCE properties to store the reference. This sounds bad on the first 
sight because you loose referential integrity but with Jackrabbits current 
implementation you will run into performance problems because the references are 
stored in the categories item state which makes adding new references a costly 
operation.

Cheers,
Chris


Re: Content Categorization in Jackrabbit?

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 6/5/07, Estelle Carr <es...@gmail.com> wrote:
> According to the JSR-170 request (http://jcp.org/en/jsr/detail?id=170#2):
>
> 'A content repository implements "content services" such as: author based
> versioning, full textual searching, fine grained access control, content
> categorization and content event monitoring.'
>
> Does anyone know if Jackrabbit supports content categorization, and if so,
> how is this achieved?

There are many different ways to categorize content. Common
approaches, all supported by Jackrabbit, are:

1) Use a multivalued string property for the categories. In this
approach you can attach any number of strings labels to a node.

    [my:type]
    - my:categories (STRING) multiple

2) Use referenceable category nodes and have the categorized content
nodes reference the category nodes. This approach is similar to the
one above, but allows you to better control the available categories
and to express category metadata and hierarchies.

    [my:category] > mix:referenceable

    [my:type]
    - my:categories (REFERENCE) multiple < my:category

3) Use mixin types for categorization. This is a slightly different
approach that allows you to express constraints like "all nodes in
category C should have properties X and Y".

    [category:C] mixin
    - X (STRING)
    - Y (STRING)

BR,

Jukka Zitting