Nodetype visualization
This page explains an easy way to make a visualization of the primary nodetypes and their relations found on a server by using standard features in the JCR. The original idea comes from
this page and was adapted a little bit.
1 Requirements
First of all you will need the following software:
- Graphiz : Graph Visualization Software
- Saxon : XSLT Processor
- A running eXo server
2 How it works
The JCR standard has a buildin function in the session object to serialize a node recursively and save it into an XML file. Let's do this from the location where the nodetypes are stored:
session.exportSystemView("/jcr:system/jcr:nodetypes", bufferedOutputStream, false, false);
The result is a file like
this example, build from the eXo JCR 1.1 release.
Once you have this system view export, run the whole xml file through a
xslt transformation to create the input for the dot command, part of graphiz, that will render it into an svg file:
saxon jcr-export-jcr-1.1-formatted.xml jcr-nodetypes-to-dot.xslt > jcr-export-jcr-1.1.dot
dot jcr-export-jcr-1.1.dot -Tsvg -o jcr-export-jcr-1.1.svg
That's it!
3 Result
Download full svg file