jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Thompson" <elephant...@gmail.com>
Subject Object/Node Modeling problem
Date Tue, 27 Mar 2007 14:49:00 GMT
Hey list!

In my web application project, I'm trying to build in support for multiple
logical "sites" that all get served from the same instance of my app
(similar to how Apache httpd can serve multiple sites).

Two things that I'm associating with each site are
* a set of locales
* a set of themes

Locale will be used to I18N-enable pages in the project, and themes will
refer to sets of files (mainly CSS, but javascript files, jsp decorators,
and Velocity templates may also show up) in the application.

My first-draft Site node looks like

[my:Site] > nt:unstructured
        orderable
        - site:name (string) primary mandatory
        - site:theme (string) multiple
        - site:defaultTheme (string) mandatory
        - site:defaultLocale (string) = 'en' mandatory autocreated
        - site:locales (string) mandatory multiple


I'm trying to build in a way to optionally associate a theme with a locale
(for example, an Arabic locale will need a theme to apply right-to-left text
direction).  So far, I've come up with

* Add a "- site:themeLocale (string) multiple" property to my:Site with the
theme and locale names are put together in a string
* Instead of having theme and locale as properties, make a set of child
nodes for themes and locales, then have a child node for each theme-locale
association with a reference to the relevant theme or locale node.

The former option seems inelegant - I don't like the thought of needing to
use checker code in the application itself to enforce referential integrity
- but the latter option seems cumbersome with the number of extra nodes it
will create.

Does anyone have some ideas on how to best model this situation within
Jackrabbit?

Thanks!

-Brian

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message