jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Diephouse <dan.diepho...@mulesource.com>
Subject Re: Problems disallowing same name siblings
Date Thu, 21 Feb 2008 00:11:36 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Sorry, I didn't include the whole thing, but I changed it so it does:<br>
<br>
&nbsp; &lt;nodeType name="galaxy:workspace" <br>
&nbsp;&nbsp;&nbsp; isMixin="false" <br>
&nbsp;&nbsp;&nbsp; hasOrderableChildNodes="false"<br>
&nbsp;&nbsp;&nbsp; primaryItemName="" <br>
&nbsp;&nbsp;&nbsp; sameNameSiblings="false"&gt;<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; &lt;supertypes&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;supertype&gt;nt:unstructured&lt;/supertype&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/supertypes&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;childNodeDefinition name="galaxy:artifact"
onParentVersion="COPY" sameNameSiblings="false" /&gt;<br>
&nbsp; &lt;/nodeType&gt;<br>
<br>
&nbsp; &lt;nodeType name="galaxy:artifact" <br>
&nbsp;&nbsp;&nbsp; isMixin="false" <br>
&nbsp;&nbsp;&nbsp; hasOrderableChildNodes="false"<br>
&nbsp;&nbsp;&nbsp; primaryItemName=""<br>
&nbsp;&nbsp;&nbsp; sameNameSiblings="false"<br>
&nbsp;&nbsp;&nbsp; allowSameNameSiblings="false"&gt;<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; &lt;supertypes&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;supertype&gt;nt:unstructured&lt;/supertype&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;/supertypes&gt;<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp; &lt;/nodeType&gt;<br>
<br>
- Dan<br>
<br>
Tobias Bocanegra wrote:
<blockquote
 cite="mid:ffd6aaa90802201546j54fdf72fh7d92ea75387a5acc@mail.gmail.com"
 type="cite">
  <pre wrap="">as i said, the workspace nodetype must have SNS=false
regards, toby

On 2/20/08, Dan Diephouse <a class="moz-txt-link-rfc2396E" href="mailto:dan.diephouse@mulesource.com">&lt;dan.diephouse@mulesource.com&gt;</a>
wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap=""> Hmmm... This doesn't seem to work either:

   &lt;nodeType name="galaxy:artifact"
     isMixin="false"
     hasOrderableChildNodes="false"
     primaryItemName=""
     sameNameSiblings="false"&gt;

     &lt;supertypes&gt;
       &lt;supertype&gt;nt:unstructured&lt;/supertype&gt;
     &lt;/supertypes&gt;

   &lt;/nodeType&gt;

 I'm guessing I'm doing something stupid. :-)
 - Dan


 Tobias Bocanegra wrote:
 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 <a class="moz-txt-link-rfc2396E" href="mailto:dan.diephouse@mulesource.com">&lt;dan.diephouse@mulesource.com&gt;</a>
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:

 &lt;nodeTypes xmlns:nt=<a class="moz-txt-link-rfc2396E" href="http://www.jcp.org/jcr/nt/1.0">"http://www.jcp.org/jcr/nt/1.0"</a>
 xmlns:jcr=<a class="moz-txt-link-rfc2396E" href="http://www.jcp.org/jcr/1.0">"http://www.jcp.org/jcr/1.0"</a>
 xmlns:galaxy=<a class="moz-txt-link-rfc2396E" href="http://galaxy.mule.org">"http://galaxy.mule.org"</a>
 xmlns:mix=<a class="moz-txt-link-rfc2396E" href="http://www.jcp.org/jcr/mix/1.0">"http://www.jcp.org/jcr/mix/1.0"</a>&gt;

 &lt;nodeType name="galaxy:workspace"
 isMixin="false"
 hasOrderableChildNodes="false"
 primaryItemName=""&gt;

 &lt;supertypes&gt;
 &lt;supertype&gt;nt:unstructured&lt;/supertype&gt;
 &lt;/supertypes&gt;
 &lt;childNodeDefinition name="galaxy:artifact" onParentVersion="COPY"
 sameNameSiblings="false" /&gt;
 &lt;/nodeType&gt;

 &lt;/nodeTypes&gt;

 When I dump the type registry I get this:

 {<a class="moz-txt-link-freetext" href="http://galaxy.mule.org">http://galaxy.mule.org</a>}workspace
 Supertypes
 {<a class="moz-txt-link-freetext" href="http://www.jcp.org/jcr/nt/1.0">http://www.jcp.org/jcr/nt/1.0</a>}unstructured
 Mixin false
 OrderableChildNodes false
 PrimaryItemName &lt;null&gt;
 NodeDefinition (declared in {<a class="moz-txt-link-freetext" href="http://galaxy.mule.org">http://galaxy.mule.org</a>}workspace)
 id=801081333
 Name {<a class="moz-txt-link-freetext" href="http://galaxy.mule.org">http://galaxy.mule.org</a>}artifact
 RequiredPrimaryType {<a class="moz-txt-link-freetext" href="http://www.jcp.org/jcr/nt/1.0">http://www.jcp.org/jcr/nt/1.0</a>}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 =
 {<a class="moz-txt-link-freetext" href="http://schemas.xmlsoap.org/wsdl/">http://schemas.xmlsoap.org/wsdl/</a>}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 =
 {<a class="moz-txt-link-freetext" href="http://schemas.xmlsoap.org/wsdl/">http://schemas.xmlsoap.org/wsdl/</a>}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
 <a class="moz-txt-link-freetext" href="http://mulesource.com">http://mulesource.com</a>
| <a class="moz-txt-link-freetext" href="http://netzooid.com/blog">http://netzooid.com/blog</a>







 --
Dan Diephouse
MuleSource
<a class="moz-txt-link-freetext" href="http://mulesource.com">http://mulesource.com</a>
| <a class="moz-txt-link-freetext" href="http://netzooid.com/blog">http://netzooid.com/blog</a>

    </pre>
  </blockquote>
  <pre wrap=""><!---->

  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
Dan Diephouse
MuleSource
<a class="moz-txt-link-freetext" href="http://mulesource.com">http://mulesource.com</a>
| <a class="moz-txt-link-freetext" href="http://netzooid.com/blog">http://netzooid.com/blog</a></pre>
</body>
</html>

Mime
View raw message