[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lenya-dev
Subject:    [Lenya Wiki] Update of "JcrContentModelTranslations" by AndreasHartmann
From:       Apache Wiki <wikidiffs () apache ! org>
Date:       2008-06-26 17:07:09
Message-ID: 20080626170709.21867.18917 () eos ! apache ! org
[Download RAW message or body]

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lenya Wiki" for change \
notification.

The following page has been changed by AndreasHartmann:
http://wiki.apache.org/lenya/JcrContentModelTranslations

New page:
See also:

 * http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200703.mbox/%3CC20DC699.40CA%25brdavis@bea.com%3E


Options:

=== Shared UUID ===

Advantages:

 * Referencing a node without specifying the language is possible (e.g., fallback to \
the default language if a translation doesn't exist)

Issues:
 
 * JCR allows only one node with a particular UUID
  * Either use a referenceable language-independent node
  * Or don't use JCR UUIDs for references, but custom String-value properties
 * With JCR UUIDs and a common referenceable parent node, structures like \
/en/welcome, /de/willkommen are not possible (would require separating the content \
hierarchy from the URI structure)

=== Non-Shared UUID ===

Advantages:

 * JCR UUIDs could be used
 * Arbitrary content hierarchies / URI structures
 * Automatic referencial integrity check with respect to language version (i.e., \
/foo_de can't be removed if /bar_de points to it)

Issues:

 * References can only point to a particular translation
 * A. Common parent node or artificial node
  * Influences content hierarchy (and maybe URL structure)
  * Obtain all translations of an artificial common node using \
                {{{Node.getReferences()}}}
 * B. No common parent node: relations between translations have to be maintained (or \
                is this optional?)
  * B.1. via multi-value reference property at each translation
  * B.2. via language-independent node
  * In either case, translations are not self-contained anymore 

Examples:

Non-shared UUID, arbitrary structure

{{{
/de
  /willkommen
    /jcr:uuid = 1
    /jcr:language = "de"
    /lenya:translations = { 2 }
/en
  /welcome
    /jcr:uuid = 2
    /jcr:language = "en"
    /lenya:translations = { 1 }
}}}

Non-shared UUID, arbitrary structure, explicit translation references

{{{
/welcome_de
  /jcr:uuid = 1
  /jcr:language = "de"
  /lenya:translations = { 2 }
/welcome_en
  /jcr:uuid = 2
  /jcr:language = "en"
  /lenya:translations = { 1 }
}}}

Non-shared UUID, arbitrary structure, implicit translation references via URL \
structure (String operations)

{{{
/welcome_de
  /jcr:uuid = 1
  /jcr:language = "de"
/welcome_en
  /jcr:uuid = 2
  /jcr:language = "en"
}}}

Non-shared UUID, common parent node

{{{
/welcome
  /de
    /jcr:uuid = 1
    /jcr:language = "de"
  /en
    /jcr:uuid = 2
    /jcr:language = "en"
}}}

Shared UUID, common parent node

{{{
/welcome
  /jcr:uuid = 1
  /de
    /jcr:language = "de"
  /en
    /jcr:language = "en"
}}}

Shared UUID, artificial shared node

{{{
/de
  /willkommen
    /lenya:sharedDocumentNode = 1
    /jcr:language = "de"
/en
  /welcome
    /lenya:sharedDocumentNode = 1
    /jcr:language = "en"
/lenya:sharedDocumentNodes
  /welcome
    /jcr:uuid = 1
}}}

Shared UUID, default language node is referenceable

 * Optional node type mix:referenceable assigned only to default-language nodes
 * Default-language node must exist

{{{
/de
  /willkommen
    /lenya:defaultLanguageNode = 1
    /jcr:language = "de"
/en
  /welcome
    /jcr:uuid = 1
    /jcr:language = "en"
}}}

Shared custom UUIDs

{{{
/welcome_de
  /lenya:uuid = 1
  /jcr:language = "de"
/welcome_en
  /lenya:uuid = 1
  /jcr:language = "en"
}}}

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic