Class SpdxListedLicense.Builder

java.lang.Object
org.spdx.library.model.license.SpdxListedLicense.Builder
Enclosing class:
SpdxListedLicense

public static class SpdxListedLicense.Builder extends Object
  • Constructor Details

    • Builder

      public Builder(String id, String name, String text)
      Parameters:
      name - License name
      id - License ID
      text - License text
  • Method Details

    • setSourceUrl

      public SpdxListedLicense.Builder setSourceUrl(Collection<String> sourceUrl)
      Parameters:
      sourceUrl - Optional URLs that reference this license
      Returns:
      this to continue the build
    • setComments

      public SpdxListedLicense.Builder setComments(String comments)
      Parameters:
      comments - Optional comments
      Returns:
      this to continue the build
    • setStandardLicenseHeader

      public SpdxListedLicense.Builder setStandardLicenseHeader(String standardLicenseHeader)
      Parameters:
      standardLicenseHeader - Optional license header
      Returns:
      this to continue the build
    • setTemplate

      public SpdxListedLicense.Builder setTemplate(String template)
      Parameters:
      template - Optional template
      Returns:
      this to continue the build
    • setOsiApproved

      public SpdxListedLicense.Builder setOsiApproved(boolean osiApproved)
      Parameters:
      osiApproved - True if this is an OSI Approved license
      Returns:
      this to continue the build
    • setFsfLibre

      public SpdxListedLicense.Builder setFsfLibre(Boolean fsfLibre)
      Parameters:
      fsfLibre - true if FSF describes the license as free / libre, false if FSF describes the license as not free / libre, null if FSF does not reference the license
      Returns:
      this to continue the build
    • setLicenseTextHtml

      public SpdxListedLicense.Builder setLicenseTextHtml(String licenseTextHtml)
      Parameters:
      licenseTextHtml - HTML version for the license text
      Returns:
      this to continue the build
    • setIsDeprecated

      public SpdxListedLicense.Builder setIsDeprecated(boolean isDeprecated)
      Parameters:
      isDeprecated - True if this license has been designated as deprecated by the SPDX legal team
      Returns:
      this to continue the build
    • setDeprecatedVersion

      public SpdxListedLicense.Builder setDeprecatedVersion(String deprecatedVersion)
      Parameters:
      deprecatedVersion - License list version when this license was first deprecated (null if not deprecated)
      Returns:
      this to continue the build
    • addCrossRefs

      public SpdxListedLicense.Builder addCrossRefs(CrossRef crossRef)