* onParentVersion="VERSION" protected="false" sameNameSiblings="false"> <requiredPrimaryTypes>
* <requiredPrimaryType>nt:base</requiredPrimaryType> </requiredPrimaryTypes>
* </childNodeDefinition> </childNodeDefinitions> </nodeType>
*/
ExtendedNodeTypeManager manager = repository.getNodeTypeManager();
NodeTypeValue exoTaxonomy = new NodeTypeValue();
exoTaxonomy.setName("exo:taxonomy");
exoTaxonomy.setMixin(false);
exoTaxonomy.setOrderableChild(false);
exoTaxonomy.setPrimaryItemName("");
List<String> superTypeNames = new ArrayList<String>();
superTypeNames.add("nt:base");
exoTaxonomy.setDeclaredSupertypeNames(superTypeNames);
NodeDefinitionValue childNodeDefinitionValue = new NodeDefinitionValue();
childNodeDefinitionValue.setName("*");
childNodeDefinitionValue.setDefaultNodeTypeName("");
childNodeDefinitionValue.setMandatory(false);
childNodeDefinitionValue.setAutoCreate(false);
childNodeDefinitionValue.setRequiredNodeTypeNames(superTypeNames);
childNodeDefinitionValue.setSameNameSiblings(false);
List<NodeDefinitionValue> childNodeDefinitions = new ArrayList<NodeDefinitionValue>();
childNodeDefinitions.add(childNodeDefinitionValue);
childNodeDefinitionValue.setOnVersion(OnParentVersionAction.VERSION);
exoTaxonomy.setDeclaredChildNodeDefinitionValues(childNodeDefinitions);
manager.registerNodeType(exoTaxonomy, ExtendedNodeTypeManager.IGNORE_IF_EXISTS);
}