You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Ted Roeloffzen <te...@gmail.com> on 2006/11/23 13:27:26 UTC
defaultprimarytype doesn't work
Hi all,
In my cnd-file i add defaultprimarytypes to all my nodes, but when i add the
nodes using JackRabbit they are put in the repository as nt:unstructured.
Does anyone have an idea?
Ted
Re: defaultprimarytype doesn't work
Posted by Ted Roeloffzen <te...@gmail.com>.
2006/11/23, Tobias Bocanegra <to...@day.com>:
>
> do you have a sample CND ?
> regards, toby
<kronos = 'http://kronos.com'>
<nt = 'http://www.jcp.org/jcr/nt/1.0'>
<mix = 'http://www.jcp.org/jcr/mix/1.0'>
[kronos:user] > nt:base, mix:referenceable
-kronos:username (STRING) mandatory primary
-kronos:fullname (STRING)
-kronos:email (STRING) mandatory
-kronos:password (STRING) mandatory
-kronos:lastvisit (DATE)
-kronos:roles (REFERENCE) mandatory multiple
[kronos:role] > nt:base, mix:referenceable
-kronos:name (STRING) mandatory primary
-kronos:description (STRING)
[kronos:plugin] > nt:base, mix:referenceable
-kronos:name (STRING) mandatory primary
-kronos:published (BOOLEAN) = 'false' mandatory autocreated
-kronos:order (LONG) = '1' mandatory autocreated
-kronos:position (LONG) mandatory
-kronos:pluginType (STRING) mandatory
[kronos:configuration] > nt:base
[kronos:menuitem] > nt:base, mix:referenceable
-kronos:menuitemname (STRING) mandatory primary
-kronos:linkType(STRING)
-kronos:link (STRING)
-kronos:isAdmin (BOOLEAN)
-kronos:IDType (STRING)
-kronos:ID (STRING)
[kronos:menu] > nt:base, mix:referenceable
-kronos:menuname (STRING) mandatory primary
+kronos:menuitem(kronos:menuitem) = kronos:menuitem multiple
[kronos:menus] > nt:base, mix:referenceable
+kronos:menu(kronos:menu) = kronos:menu multiple
[kronos:contentPlugin] > nt:base, mix:referenceable
-kronos:name (STRING) mandatory primary
+kronos:item
[kronos:content] > nt:base, mix:referenceable
+kronos:plugin(kronos:contentPlugin) = kronos:contentPlugin multiple
[kronos:users] > nt:base
+kronos:user(kronos:user) = kronos:user multiple
[kronos:roles] > nt:base
+kronos:role(kronos:role) = kronos:role multiple
[kronos:plugins] > nt:base
+kronos:plugin(kronos:plugin) = kronos:plugin multiple
[kronos:cms] > nt:base
+kronos:configuration(kronos:configuration) = kronos:configuration
+kronos:plugins(kronos:plugins) = kronos:plugins
+kronos:users(kronos:users) = kronos:users
+kronos:roles(kronos:roles) = kronos:roles
+kronos:menus(kronos:menus) = kronos:menus
+kronos:content(kronos:content) = kronos:content
Ted
Re: defaultprimarytype doesn't work
Posted by Tobias Bocanegra <to...@day.com>.
do you have a sample CND ?
regards, toby
On 11/23/06, Ted Roeloffzen <te...@gmail.com> wrote:
> Hi all,
>
> In my cnd-file i add defaultprimarytypes to all my nodes, but when i add the
> nodes using JackRabbit they are put in the repository as nt:unstructured.
> Does anyone have an idea?
>
> Ted
>
>
--
-----------------------------------------< 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 >---
Re: defaultprimarytype doesn't work
Posted by Ted Roeloffzen <te...@gmail.com>.
I fixed the problem already, but thanks anyway.
Ted
2006/11/24, Stefan Guggisberg <st...@gmail.com>:
>
> On 11/23/06, Ted Roeloffzen <te...@gmail.com> wrote:
> > Hi all,
> >
> > In my cnd-file i add defaultprimarytypes to all my nodes, but when i add
> the
> > nodes using JackRabbit they are put in the repository as
> nt:unstructured.
> > Does anyone have an idea?
>
> i quickly tested with your node types, here's the code:
>
> Node cms = root.addNode("kronos:root", "kronos:cms");
> Node conf = cms.addNode("kronos:configuration");
> Node users = cms.addNode("kronos:users");
>
> dumpTree(cms, System.out);
>
> here's the output:
>
> [node] + /kronos:cms_root
> [prop] + jcr:primaryType kronos:cms
> [node] + /kronos:configuration
> [prop] + jcr:primaryType kronos:configuration
> [node] + /kronos:users
> [prop] + jcr:primaryType kronos:users
>
>
> as you can see from the output both child nodes
> (kronos:configuration & kronos:users) have the correct
> primary types.
>
> can you provide a small test case or sample code that
> demonstrates your problem?
>
> cheers
> stefan
>
> >
> > Ted
> >
> >
>
Re: defaultprimarytype doesn't work
Posted by Stefan Guggisberg <st...@gmail.com>.
On 11/23/06, Ted Roeloffzen <te...@gmail.com> wrote:
> Hi all,
>
> In my cnd-file i add defaultprimarytypes to all my nodes, but when i add the
> nodes using JackRabbit they are put in the repository as nt:unstructured.
> Does anyone have an idea?
i quickly tested with your node types, here's the code:
Node cms = root.addNode("kronos:root", "kronos:cms");
Node conf = cms.addNode("kronos:configuration");
Node users = cms.addNode("kronos:users");
dumpTree(cms, System.out);
here's the output:
[node] + /kronos:cms_root
[prop] + jcr:primaryType kronos:cms
[node] + /kronos:configuration
[prop] + jcr:primaryType kronos:configuration
[node] + /kronos:users
[prop] + jcr:primaryType kronos:users
as you can see from the output both child nodes
(kronos:configuration & kronos:users) have the correct
primary types.
can you provide a small test case or sample code that
demonstrates your problem?
cheers
stefan
>
> Ted
>
>