1 Reply Latest reply on Mar 19, 2013 8:45 AM by Randall Hauch

    CND File Organization

    Oliver Zhou Newbie



      Suppose I have multiple java project, in every project, it has own nodeType cnd file (named "nodeTypes.cnd"), and then in top level web project, it has repository configuration file, in that file, how can I list the cnd file names?

        • 1. Re: CND File Organization
          Randall Hauch Master

          ModeShape does not track which CND files loaded each of the node types. When you register node types using a CND file (or stream), all ModeShape does is parse the CND and build the node type template objects (the same way that you would do it via the NodeTypeManager), and then registers all those templates.


          If you want, you can "manage" the CND files inside the repository as content. Just use a separate area, perhaps your own "system" or "metadata" area, or even a separate "metadata" workspace where all your applications can store global and/or app-specific metadata.


          Now, if you do manage the CND files in a separate area and want to know which node types are defined in each file, then I'd suggest considering our CND sequencer. Once you configure it, every time you store a new CND file in that area of the repository, the sequencer would parse the file and construct a "cnd:nodeType" node structure for each node type in the file, placing all those nodes directly underneath the file node (or wherever you configured the sequencer to place the output). These nodes are just regular content, which can be navigated or queried.