Package org.savantbuild.dep.domain
Class License
java.lang.Object
org.savantbuild.dep.domain.License
Domain for licenses.
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanstatic final Map<String,LicenseTextException> booleanboolean -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
CustomLicenses
-
Exceptions
-
Licenses
-
customText
public boolean customText -
detailsURL
-
exception
-
fsfLibre
public boolean fsfLibre -
identifier
-
name
-
osiApproved
public boolean osiApproved -
reference
-
seeAlso
-
text
-
-
Constructor Details
-
License
public License()For testing and JSON handling only. -
License
-
-
Method Details
-
lookupByURL
Tries to determine the license using a URL.- Parameters:
url- The URL of the license text.- Returns:
- The License if it can be found or null if it doesn't exist.
-
parse
Parses a Savant SPDX identifier to determine the type of license. Savant supports additional license types and flexible license text.- Parameters:
identifier- The Savant SPDX id.text- (Optional) The license text.- Returns:
- The license and never null
- Throws:
LicenseException- If the identifier was invalid.
-
equals
-
hashCode
public int hashCode() -
toString
-