On Tue, Sep 8, 2009 at 23:12, Michael Shoener<[email protected]> wrote:
> I have been working with jackrabbit 1.6.0 and have the following questions
> regarding custom nodes:
>
>        1. Where exactly do I define the custom node types and what should
> the file be named?

Normally, you'd use the jackrabbit api to load your node types. See
http://jackrabbit.apache.org/node-types.html (code at the bottom).

>        2. In what format should the file be in? (XML, CND notation)

The Jackrabbit API allows for both formats, but I'd use CND, as JCR
2.0 will only use CND and it's much easier to edit and read.

>        3. Will the "RepositoryStartup" load the file for me or do I have to
> manually load it, and if so how to load it.

See above. You would manually load it in your startup code (and eg.
ignore any node type already exists exception).

>        3. I would like to be able to allow any number of property names for
> my custom node type (run-time definable).

Sure, just define so-called residual properties, using a wildcard (*).
But it's good practice to extend from nt:unstructured, which has the
same result. You can still define specific properties, that won't be
enforced anymore, but can act as a template / guide for all kinds of
jcr tools.

See also http://jackrabbit.apache.org/node-type-notation.html

Regards,
Alex

-- 
Alexander Klimetschek
[email protected]

Reply via email to