code: public List<NodeTypeData> registerNodeTypes(final InputStream is, final int alreadyExistsBehaviour,
        final String contentType) throws RepositoryException
     {
        NodeTypeDataPersister serializer = null;
        if (contentType.equalsIgnoreCase(TEXT_XML))
        {
           serializer = new XmlNodeTypeDataPersister(nodeTypeConverter, is);
        }
        else if (contentType.equalsIgnoreCase(TEXT_X_JCR_CND))
        {
           serializer = new CNDNodeTypeDataPersister(is, (NamespaceRegistryImpl)namespaceRegistry);
        }
        else
        {
           throw new RepositoryException("Unsupported content type:" + contentType);
        }
        final List<NodeTypeData> nodeTypes = serializer.getAllNodeTypes();
  
        return registerListOfNodeTypes(nodeTypes, alreadyExistsBehaviour);
     }
docs: {@inheritDoc}