You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Darren Hartford <dh...@ghsinc.com> on 2007/02/23 16:50:31 UTC

How to configure nodetypes without code

Hi all,
There is a list of nodetypes available here:
http://wiki.apache.org/jackrabbit/NodeTypeRegistry

However, there does not seem to be any definition of those nodetypes,
nor how to apply them.

There is 'knowledge' of nodetypes
http://jackrabbit.apache.org/doc/nodetype/index.html, but there are two
ways to define them (XML and CND), and no description of how to deploy
them (assumption is under /repository/nodetypes).

There is an example in SVN under
/applications/test/repository/nodetypes, and that one is an XML
definition.  

Is XML nodetype configuration under /repository/nodetypes the
recommended, non-coded approach to add custom properties that could then
be searched on via xpath/sql?

Thanky,
-D

Re: How to configure nodetypes without code

Posted by Peeter Piegaze <pe...@day.com>.
On 2/26/07, Michael Neale <mi...@gmail.com> wrote:
> great, I would like to give a big kiss to whomever thought up the CND format
> - it is one of the nicest config formats I use. So concise, takes about 30
> seconds to understand it, and easy to follow examples !

uhm...thanks for the kiss

-- 
Peeter Piegaze

Day Software, Inc.
67 Mowat Avenue, Suite 331
Toronto Ontario M6K 3E3
Canada

T +1 416 987 5720
M +1 647 205 2403
F +1 866 719 3988

Re: How to configure nodetypes without code

Posted by Michael Neale <mi...@gmail.com>.
great, I would like to give a big kiss to whomever thought up the CND format
- it is one of the nicest config formats I use. So concise, takes about 30
seconds to understand it, and easy to follow examples !

On 2/24/07, Stefan Guggisberg <st...@gmail.com> wrote:
>
> On 2/24/07, Michael Neale <mi...@gmail.com> wrote:
> > I heard rumours the this CND notation is being considered as the
> standard
> > for JCR2 spec?
> >
> > Any news on this?
>
> right, the CND notation is used throughout the current draft of the
> jsr 283 spec.
>
> cheers
> stefan
>
> >
> > Michael.
> >
> > On 2/24/07, Stefan Guggisberg <st...@gmail.com> wrote:
> > >
> > > hi darren,
> > >
> > > On 2/23/07, Darren Hartford <dh...@ghsinc.com> wrote:
> > > > Hi all,
> > > > There is a list of nodetypes available here:
> > > > http://wiki.apache.org/jackrabbit/NodeTypeRegistry
> > > >
> > > > However, there does not seem to be any definition of those
> nodetypes,
> > > > nor how to apply them.
> > >
> > > the page you're refering to contains descriptions of some wellknown
> > > node types, the built-in node types defined by jsr 170,  node types
> used
> > > by jackrabbit internally and some application specific node types.
> > >
> > > those node types are usually pre-installed, there's no need to
> 'deploy'
> > > them.
> > >
> > > >
> > > > There is 'knowledge' of nodetypes
> > > > http://jackrabbit.apache.org/doc/nodetype/index.html, but there are
> two
> > > > ways to define them (XML and CND), and no description of how to
> deploy
> > > > them (assumption is under /repository/nodetypes).
> > >
> > > the assumption is wrong ;-) you can either build node type definitions
> > > programmatically using jackrabbit api methods or define them in
> > > either xml or cnd format. you have to register your node type
> definitions
> > > programmatically, e.g.
> > >
> > >                 JackrabbitNodeTypeManager ntMgr =
> > >                         (JackrabbitNodeTypeManager)
> wsp.getNodeTypeManager
> > > ();
> > >                 ntMgr.registerNodeTypes(new
> > > FileInputStream("/foo/mytypes.cnd"),
> > >                         JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
> > >
> > > >
> > > > There is an example in SVN under
> > > > /applications/test/repository/nodetypes, and that one is an XML
> > > > definition.
> > > >
> > > > Is XML nodetype configuration under /repository/nodetypes the
> > > > recommended, non-coded approach to add custom properties that could
> then
> > > > be searched on via xpath/sql?
> > >
> > > quite the contrary, manipulating those files directly is strictly
> > > discouraged!
> > > the only recommended approach unfortunately involves a minimal amount
> of
> > > coding, see above example.
> > >
> > > cheers
> > > stefan
> > >
> > > >
> > > > Thanky,
> > > > -D
> > > >
> > >
> >
>

Re: How to configure nodetypes without code

Posted by Stefan Guggisberg <st...@gmail.com>.
On 2/24/07, Michael Neale <mi...@gmail.com> wrote:
> I heard rumours the this CND notation is being considered as the standard
> for JCR2 spec?
>
> Any news on this?

right, the CND notation is used throughout the current draft of the
jsr 283 spec.

cheers
stefan

>
> Michael.
>
> On 2/24/07, Stefan Guggisberg <st...@gmail.com> wrote:
> >
> > hi darren,
> >
> > On 2/23/07, Darren Hartford <dh...@ghsinc.com> wrote:
> > > Hi all,
> > > There is a list of nodetypes available here:
> > > http://wiki.apache.org/jackrabbit/NodeTypeRegistry
> > >
> > > However, there does not seem to be any definition of those nodetypes,
> > > nor how to apply them.
> >
> > the page you're refering to contains descriptions of some wellknown
> > node types, the built-in node types defined by jsr 170,  node types used
> > by jackrabbit internally and some application specific node types.
> >
> > those node types are usually pre-installed, there's no need to 'deploy'
> > them.
> >
> > >
> > > There is 'knowledge' of nodetypes
> > > http://jackrabbit.apache.org/doc/nodetype/index.html, but there are two
> > > ways to define them (XML and CND), and no description of how to deploy
> > > them (assumption is under /repository/nodetypes).
> >
> > the assumption is wrong ;-) you can either build node type definitions
> > programmatically using jackrabbit api methods or define them in
> > either xml or cnd format. you have to register your node type definitions
> > programmatically, e.g.
> >
> >                 JackrabbitNodeTypeManager ntMgr =
> >                         (JackrabbitNodeTypeManager) wsp.getNodeTypeManager
> > ();
> >                 ntMgr.registerNodeTypes(new
> > FileInputStream("/foo/mytypes.cnd"),
> >                         JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
> >
> > >
> > > There is an example in SVN under
> > > /applications/test/repository/nodetypes, and that one is an XML
> > > definition.
> > >
> > > Is XML nodetype configuration under /repository/nodetypes the
> > > recommended, non-coded approach to add custom properties that could then
> > > be searched on via xpath/sql?
> >
> > quite the contrary, manipulating those files directly is strictly
> > discouraged!
> > the only recommended approach unfortunately involves a minimal amount of
> > coding, see above example.
> >
> > cheers
> > stefan
> >
> > >
> > > Thanky,
> > > -D
> > >
> >
>

Re: How to configure nodetypes without code

Posted by Michael Neale <mi...@gmail.com>.
I heard rumours the this CND notation is being considered as the standard
for JCR2 spec?

Any news on this?

Michael.

On 2/24/07, Stefan Guggisberg <st...@gmail.com> wrote:
>
> hi darren,
>
> On 2/23/07, Darren Hartford <dh...@ghsinc.com> wrote:
> > Hi all,
> > There is a list of nodetypes available here:
> > http://wiki.apache.org/jackrabbit/NodeTypeRegistry
> >
> > However, there does not seem to be any definition of those nodetypes,
> > nor how to apply them.
>
> the page you're refering to contains descriptions of some wellknown
> node types, the built-in node types defined by jsr 170,  node types used
> by jackrabbit internally and some application specific node types.
>
> those node types are usually pre-installed, there's no need to 'deploy'
> them.
>
> >
> > There is 'knowledge' of nodetypes
> > http://jackrabbit.apache.org/doc/nodetype/index.html, but there are two
> > ways to define them (XML and CND), and no description of how to deploy
> > them (assumption is under /repository/nodetypes).
>
> the assumption is wrong ;-) you can either build node type definitions
> programmatically using jackrabbit api methods or define them in
> either xml or cnd format. you have to register your node type definitions
> programmatically, e.g.
>
>                 JackrabbitNodeTypeManager ntMgr =
>                         (JackrabbitNodeTypeManager) wsp.getNodeTypeManager
> ();
>                 ntMgr.registerNodeTypes(new
> FileInputStream("/foo/mytypes.cnd"),
>                         JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
>
> >
> > There is an example in SVN under
> > /applications/test/repository/nodetypes, and that one is an XML
> > definition.
> >
> > Is XML nodetype configuration under /repository/nodetypes the
> > recommended, non-coded approach to add custom properties that could then
> > be searched on via xpath/sql?
>
> quite the contrary, manipulating those files directly is strictly
> discouraged!
> the only recommended approach unfortunately involves a minimal amount of
> coding, see above example.
>
> cheers
> stefan
>
> >
> > Thanky,
> > -D
> >
>

Re: How to configure nodetypes without code

Posted by Stefan Guggisberg <st...@gmail.com>.
hi darren,

On 2/23/07, Darren Hartford <dh...@ghsinc.com> wrote:
> Hi all,
> There is a list of nodetypes available here:
> http://wiki.apache.org/jackrabbit/NodeTypeRegistry
>
> However, there does not seem to be any definition of those nodetypes,
> nor how to apply them.

the page you're refering to contains descriptions of some wellknown
node types, the built-in node types defined by jsr 170,  node types used
by jackrabbit internally and some application specific node types.

those node types are usually pre-installed, there's no need to 'deploy' them.

>
> There is 'knowledge' of nodetypes
> http://jackrabbit.apache.org/doc/nodetype/index.html, but there are two
> ways to define them (XML and CND), and no description of how to deploy
> them (assumption is under /repository/nodetypes).

the assumption is wrong ;-) you can either build node type definitions
programmatically using jackrabbit api methods or define them in
either xml or cnd format. you have to register your node type definitions
programmatically, e.g.

                JackrabbitNodeTypeManager ntMgr =
                        (JackrabbitNodeTypeManager) wsp.getNodeTypeManager();
                ntMgr.registerNodeTypes(new FileInputStream("/foo/mytypes.cnd"),
                        JackrabbitNodeTypeManager.TEXT_X_JCR_CND);

>
> There is an example in SVN under
> /applications/test/repository/nodetypes, and that one is an XML
> definition.
>
> Is XML nodetype configuration under /repository/nodetypes the
> recommended, non-coded approach to add custom properties that could then
> be searched on via xpath/sql?

quite the contrary, manipulating those files directly is strictly discouraged!
the only recommended approach unfortunately involves a minimal amount of
coding, see above example.

cheers
stefan

>
> Thanky,
> -D
>