«»

JCR Deep Dive

Shareable Nodes

In JSR170, a node can only be the child node of one other node. This makes it impossible to file nodes under multiple taxonomies, i.e. defining multiple paths to get to the same node. JSR283 hence introduces the (optional) concept of shareable nodes. A shareable node is a node which can share its properties and children with other nodes. A node type is made shareable by adding the mixin mix:shareable.


Shareable Nodes in JSR283

Shareable Nodes in JSR283


It is important to note that by adding shareable nodes, the path of a node does not identify a unique node anymore. Rather, there may be different paths to reach a node, such as A/S1/Y and B/S2/Y both identify node Y in the above example. It is up to the particular implementation to define a deemed path, i.e. the default return value of Node.getPath().

«»

Comments

9 Responses to “JCR Deep Dive”

  1. Duncan Reade on January 30th, 2009 8:54 am

    First, thank you for providing this very informative site. And Secondly, just in case it has not been brought to your attention: the URI links to the http://www.jcp.org/ site are out of date (used in section 3. Defining Content).

    Regards
    Duncan Reade

  2. Thomas Einwaller on March 13th, 2009 3:20 am

    Thanks for that great post.

    It seems node type folder is missing?

  3. Yasser on June 12th, 2009 7:06 am

    Really good post.. thanks for the effort

  4. Bruno Dusausoy on October 22nd, 2009 6:50 am

    Hi, great article.
    But as Thomas said previously, it seems you forgot to put the node type “samples:folder” definition. It seems it’s a copy/paste of the “samples:content” definition instead.

  5. Patrick van Kann on October 19th, 2010 11:58 am

    Really great article.

    With regards to the missing definition for samples:folder, I believe the below works.

    [samples:folder] > samples:content
    // accept any subnodes of type samples:content
    + * (samples:content) multiple

    I adapted this from the example in the CND in a nutshell section of this blog.

  6. Jochen on October 20th, 2010 10:44 am

    Thanks! I need to spend some time updating my blog at some point :-)

  7. Serge on October 28th, 2010 12:54 pm

    Great content. Are there some good interative builder for CND Types ? Would be interesting links

  8. Jochen on October 28th, 2010 1:16 pm

    Building an interactive builder shouldn’t be that hard. Back when I worked for CoreMedia we had a tool that would take the XMI from any old UML tool and XSLT’ed it to a content definition file. Wasn’t CND but XML, but same idea.

  9. Confluence: MIS I. T. Development on September 20th, 2011 7:45 am

    Java Content Repository Deep Dive…

    I found an interesting “article” online about Java Content Repositories (JCR). I’m going to look into this further because it may be useful as a replacement to our current JPA workflow. JCR supports many features that should be useful,……

Leave a Reply




XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

-->