code: public void addType(I_CmsXmlSchemaType type) throws CmsXmlException {
  
          // check if the type to add actually exists in the type manager
          CmsXmlContentTypeManager typeManager = OpenCms.getXmlContentTypeManager();
          if (type.isSimpleType() && (typeManager.getContentType(type.getTypeName()) == null)) {
              throw new CmsXmlException(Messages.get().container(Messages.ERR_UNREGISTERED_TYPE_1, type.getTypeName()));
          }
  
          // add the type to the internal type sequence and lookup table
          m_typeSequence.add(type);
          m_types.put(type.getName(), type);
  
          // store reference to the content definition in the type
          type.setContentDefinition(this);
      }
docs: Adds the given content type.<p>
  
  @param type the content type to add
  
  @throws CmsXmlException in case an unregistered type is added