jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sébastien Launay <sebastien.lau...@anyware-tech.com>
Subject Re: Node Type Management Utility for JCR
Date Fri, 08 Aug 2008 12:38:51 GMT
You can find here the builtin JCR node types in XML and CND:
http://svn.eu.apache.org/repos/asf/jackrabbit/branches/1.4/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/nodetype/

As you will see a DTD is embedded in the XML.

--
Sébastien Launay

Boni Gopalan (BioImagene) a écrit :
> Hi Sébastien : thank you for the quick but detailed pointer.  Is there an XSD for this
XML document? Or an example?
>
> -----Original Message-----
> From: Sébastien Launay [mailto:sebastien.launay@anyware-tech.com] 
> Sent: 08 August 2008 14:59
> To: users@jackrabbit.apache.org
> Subject: Re: Node Type Management Utility for JCR
>
> Hi Boni,
>
> Jackrabbit offers two ways to register node type definitions XML and CND.
>
> A snippet for registered a custom node types definitions file:
> NodeTypeManagerImpl ntManager = (NodeTypeManagerImpl)
> session.getWorkspace().getNodeTypeManager();
> NodeTypeRegistry registry = ntManager.getNodeTypeRegistry();
>
> NodeTypeDefStore store = new NodeTypeDefStore();
> InputStream is =
> getClass().getResourceAsStream("/path/to/custom_nodetypes.xml");
> try {
>   store.load(is);
>   registry.registerNodeTypes(store.all());
> } finally {
>   is.close();
> }
>
> You can check the namespace existence associated with the node types
> to register the definition once.
>
> Once node types are registered, only trivial changes can be reregisterd
> otherwise an exception is thrown.
>
> For more information on how to migrate node types see:
> http://markmail.org/message/wkwhotmpg32lu2hb
> http://markmail.org/message/nzzirhb4kcfuhxuf
> http://markmail.org/message/nz7wow33xvhe5jdg
>
> --
> Sébastien Launay
>
> Boni Gopalan (BioImagene) a écrit :
>   
>> Hi,
>>
>>  
>>
>> My organization has decided to use jackrabbit as the replacement of our
>> current persistent store mechanism for the forthcoming releases of our
>> products and I am architecting this solution.  I want to know whether
>> there is any work already done on having a schema management utility for
>> JCR.  I am looking for an utility that would initially take in a xml
>> file as an input and register the NodeTypes appropriately.  From then on
>> this utility would let these node definitions be managed.
>>
>>  
>>
>> I have seen that CND is chosen as the standard.  Is there an XML
>> equivalent of CND?
>>
>>  
>>
>> thanks
>>
>>  
>>
>> Boni Gopalan
>>   
>>     

Mime
View raw message