code: private void importTypes( List<Tree<ObjectType>> types,
                                NodeTypeManager typeManager,
                                NamespaceRegistry registry ) throws RepositoryException {
          for (Tree<ObjectType> tree : types) {
              importType(tree.getItem(), typeManager, registry);
              importTypes(tree.getChildren(), typeManager, registry);
          }
      }
docs: Import CMIS types to JCR repository.
  
  @param types CMIS types
  @param typeManager JCR type manager
  @param registry
  @throws RepositoryException if there is a problem importing the types