def add_license(
        self,
        url=None,
        license=None,
        material=None,
        imposing=None
    ):
        """Add license.

        :param url: url for the description of the license
        :type url: string

        :param license: license type
        :type license: string

        :param material: material type
        :type material: string

        :param imposing: imposing type
        :type imposing: string
        """
        hep_license = {}

        try:
            license_from_url = get_license_from_url(url)
            if license_from_url is not None:
                license = license_from_url
        except ValueError:
            pass

        for key in ('url', 'license', 'material', 'imposing'):
            if locals()[key] is not None:
                hep_license[key] = locals()[key]

        self._append_to('license', hep_license)