jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra" <tobias.bocane...@day.com>
Subject Re: Problems disallowing same name siblings
Date Wed, 20 Feb 2008 23:14:40 GMT
hi,
the SNS works on the defining node, not on the child. i.e. your
galaxy:workspace must have the SNS=false, not the artifact.

regards, toby

On 2/20/08, Dan Diephouse <dan.diephouse@mulesource.com> wrote:
> I'm trying to disallow same name siblings. We have the concept of
>  workspaces which hold artifacts and other workspaces. Very similar to a
>  file system (we chose not to go with the built in file node types though
>  as they didn't fit our application). We've defined our node types like this:
>
>  <nodeTypes xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
>   xmlns:jcr="http://www.jcp.org/jcr/1.0"
>   xmlns:galaxy="http://galaxy.mule.org"
>   xmlns:mix="http://www.jcp.org/jcr/mix/1.0">
>
>   <nodeType name="galaxy:workspace"
>     isMixin="false"
>     hasOrderableChildNodes="false"
>     primaryItemName="">
>
>     <supertypes>
>       <supertype>nt:unstructured</supertype>
>     </supertypes>
>     <childNodeDefinition name="galaxy:artifact" onParentVersion="COPY"
>  sameNameSiblings="false" />
>   </nodeType>
>
>  </nodeTypes>
>
>  When I dump the type registry I get this:
>
>  {http://galaxy.mule.org}workspace
>     Supertypes
>         {http://www.jcp.org/jcr/nt/1.0}unstructured
>     Mixin    false
>     OrderableChildNodes    false
>     PrimaryItemName    <null>
>     NodeDefinition (declared in {http://galaxy.mule.org}workspace)
>  id=801081333
>         Name        {http://galaxy.mule.org}artifact
>         RequiredPrimaryType    {http://www.jcp.org/jcr/nt/1.0}base
>         AutoCreated    false
>         Mandatory    false
>         OnVersion    COPY
>         Protected    false
>         AllowsSameNameSiblings    false
>
>  But I'm still able to add multiple galaxy:artifact nodes with the same
>  name as you see from this repository dump:
>
>  /workspaces/Default Workspace
>  /workspaces/Default Workspace/updated = 2008-02-20T11:17:21.920-08:00
>  /workspaces/Default Workspace/jcr:primaryType = galaxy:workspace
>  /workspaces/Default Workspace/jcr:mixinTypes = mix:referenceable
>  /workspaces/Default Workspace/jcr:uuid =
>  de38a3e0-9bc1-4406-9618-5d9ccde3883d
>  /workspaces/Default Workspace/name = Default Workspace
>  /workspaces/Default Workspace/hello_world.wsdl
>  /workspaces/Default Workspace/hello_world.wsdl/lifecycle = Default
>  /workspaces/Default Workspace/hello_world.wsdl/updated =
>  2008-02-20T11:17:23.434-08:00
>  /workspaces/Default Workspace/hello_world.wsdl/phase = Created
>  /workspaces/Default Workspace/hello_world.wsdl/contentType =
>  application/wsdl+xml
>  /workspaces/Default Workspace/hello_world.wsdl/jcr:primaryType =
>  galaxy:artifact
>  /workspaces/Default Workspace/hello_world.wsdl/jcr:mixinTypes =
>  mix:referenceable
>  /workspaces/Default Workspace/hello_world.wsdl/jcr:uuid =
>  492fbb9f-ee45-4910-8907-8db107895bad
>  /workspaces/Default Workspace/hello_world.wsdl/name = hello_world.wsdl
>  /workspaces/Default Workspace/hello_world.wsdl/documentType =
>  {http://schemas.xmlsoap.org/wsdl/}definitions
>  /workspaces/Default Workspace/hello_world.wsdl[2]
>  /workspaces/Default Workspace/hello_world.wsdl[2]/lifecycle = Default
>  /workspaces/Default Workspace/hello_world.wsdl[2]/updated =
>  2008-02-20T11:17:24.130-08:00
>  /workspaces/Default Workspace/hello_world.wsdl[2]/phase = Created
>  /workspaces/Default Workspace/hello_world.wsdl[2]/contentType =
>  application/wsdl+xml
>  /workspaces/Default Workspace/hello_world.wsdl[2]/jcr:primaryType =
>  galaxy:artifact
>  /workspaces/Default Workspace/hello_world.wsdl[2]/jcr:mixinTypes =
>  mix:referenceable
>  /workspaces/Default Workspace/hello_world.wsdl[2]/jcr:uuid =
>  e21883eb-4f98-46b4-8868-1ce80355a1a9
>  /workspaces/Default Workspace/hello_world.wsdl[2]/name = hello_world.wsdl
>  /workspaces/Default Workspace/hello_world.wsdl[2]/documentType =
>  {http://schemas.xmlsoap.org/wsdl/}definitions
>
>  As you can see, I have a parent node which is a galaxy:workspace and
>  multiple nodes with the same name :(. Any ideas what in the world I'm
>  doing wrong?
>
>  Also, as this is one of the best practices for JCR integration, it'd be
>  great if the first hops guide detailed how to do this. Am I missing some
>  obvious piece of documentation which explains all this?
>
>  Thanks
>  - Dan
>
>
>  --
>  Dan Diephouse
>  MuleSource
>  http://mulesource.com | http://netzooid.com/blog
>
>


-- 
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---

Mime
View raw message