jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: Locallized labels
Date Tue, 08 Aug 2006 06:46:37 GMT
Hi,

On 8/5/06, JavaJ <ponfar99@yahoo.com> wrote:
> For each node, I'd like to define properties that basically collections of
> label-locale pairs.
> [...]
> Is there a way to do this in Jackrabbit/JSR-170?  The closest I could come
> up with making the localized labels child nodes.
> [...]
> But this is kind of awkward because title and description should be
> properties on the node, not child nodes.  Has anyone come up with a better
> way on modeling this problem?

There isn't yet very much of a best practice in this area, but my
solution would most likely be to put the locale-independent metadata
in a shared parent node and to put all locale-dependent properties in
a locale-specific child node. Like this:

    [cm:MyNode] > nt:base, mix:versionable
    - cm:definitionName (string) mandatory
    - cm:model (string) mandatory
    - cm:shared (boolean) = 'false'
    + * (cm:MyLocalNode) = cm:MyLocalNode

    [cm:MyLocalNode] > nt:base
    - cm:title (string) mandatory
    - cm:description (string) mandatory

The locale names (en, de, ...) would be used as the names of the
cm:MyLocalNode child nodes.

BR,

Jukka Zitting

-- 
Yukatan - http://yukatan.fi/ - info@yukatan.fi
Software craftsmanship, JCR consulting, and Java development

Mime
View raw message