Package org.spdx.rdfparser.license
Class SpdxListedLicense
java.lang.Object
org.spdx.rdfparser.model.RdfModelObject
org.spdx.rdfparser.license.AnyLicenseInfo
org.spdx.rdfparser.license.SimpleLicensingInfo
org.spdx.rdfparser.license.License
org.spdx.rdfparser.license.SpdxListedLicense
public class SpdxListedLicense extends License
Listed license for SPDX as listed at spdx.org/licenses
- Author:
- Gary O'Neall
-
Field Summary
Fields inherited from class org.spdx.rdfparser.license.License
deprecated, fsfLibre, licenseText, osiApproved, standardLicenseHeader, standardLicenseTemplateFields inherited from class org.spdx.rdfparser.license.SimpleLicensingInfo
comment, crossRef, licenseId, name, seeAlsoFields inherited from class org.spdx.rdfparser.model.RdfModelObject
model, modelContainer, node, refreshOnGet, resource -
Constructor Summary
Constructors Constructor Description SpdxListedLicense(String name, String id, String text, String[] sourceUrl, String comments, String standardLicenseHeader, String template, boolean osiApproved)SpdxListedLicense(String name, String id, String text, String[] sourceUrl, String comments, String standardLicenseHeader, String template, boolean osiApproved, boolean fsfLibre)SpdxListedLicense(String name, String id, String text, String[] sourceUrl, String comments, String standardLicenseHeader, String template, boolean osiApproved, Boolean fsfLibre, String licenseTextHtml, boolean isDeprecated, String deprecatedVersion)SpdxListedLicense(String name, String id, String text, String[] sourceUrl, String comments, String standardLicenseHeader, String template, boolean osiApproved, String licenseTextHtml)SpdxListedLicense(String name, String id, String text, String[] sourceUrl, String comments, String standardLicenseHeader, String template, String licenseHeaderTemplate, boolean osiApproved, boolean fsfLibre, String licenseTextHtml, String licenseHeaderHtml)SpdxListedLicense(String name, String id, String text, String[] sourceUrl, String comments, String standardLicenseHeader, String template, String licenseHeaderTemplate, boolean osiApproved, Boolean fsfLibre)SpdxListedLicense(String name, String id, String text, String[] sourceUrl, CrossRef[] sourceUrlDetails, String comments, String standardLicenseHeader, String template, String licenseHeaderTemplate, boolean osiApproved, Boolean fsfLibre)SpdxListedLicense(IModelContainer modelContainer, org.apache.jena.graph.Node licenseNode)Constructs an SPDX License from the licenseNode -
Method Summary
Modifier and Type Method Description booleanequivalent(IRdfModel compare)Returns true if the compare object contains properties which would be equal if they were contained in the same RDF ModelStringgetDeprecatedVersion()StringgetLicenseHeaderHtml()StringgetLicenseTextHtml()org.apache.jena.rdf.model.ResourcegetType(org.apache.jena.rdf.model.Model model)StringgetUri(IModelContainer modelContainer)Get the URI for this RDF object.voidsetDeprecatedVersion(String deprecatedVersion)voidsetLicenseHeaderHtml(String licenseHeaderHtml)Set the licenseHeaderTemplateHtmlvoidsetLicenseTextHtml(String licenseTextHtml)Set the licenseTextHtmlList<String>verify()Methods inherited from class org.spdx.rdfparser.license.License
clone, copyFrom, equals, getFsfLibre, getLicenseText, getNotes, getPropertiesFromModel, getStandardLicenseHeader, getStandardLicenseHeaderTemplate, getStandardLicenseTemplate, hashCode, isDeprecated, isFsfLibre, isNotFsfLibre, isOsiApproved, populateModel, setDeprecated, setFsfLibre, setLicenseText, setNotes, setOsiApproved, setStandardLicenseHeader, setStandardLicenseHeaderTemplate, setStandardLicenseTemplate, toStringMethods inherited from class org.spdx.rdfparser.license.SimpleLicensingInfo
findDuplicateResource, getComment, getCrossRef, getLicenseId, getName, getSeeAlso, setComment, setCrossRef, setLicenseId, setName, setSeeAlsoMethods inherited from class org.spdx.rdfparser.model.RdfModelObject
addPropertyUriValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, arraysEquivalent, createResource, createResource, equivalentConsideringNull, findAnnotationPropertyValues, findAnyLicenseInfoPropertyValue, findAnyLicenseInfoPropertyValues, findChecksumPropertyValue, findCreationInfoPropertyValue, findElementPropertyValue, findExternalDocRefPropertyValues, findExternalDocRefPropertyValues, findExternalRefPropertyValues, findIntPropertyValue, findMultipleChecksumPropertyValues, findMultipleCrossRefPropertyValues, findMultipleDoapPropertyValues, findMultipleElementPropertyValues, findMultiplePropertyValues, findReferenceTypePropertyValue, findRelationshipPropertyValues, findReviewPropertyValues, findSinglePointerPropertyValue, findSinglePropertyValue, findStartEndPointerPropertyValues, findUriPropertyValue, findUriPropertyValues, findVerificationCodePropertyValue, getNode, isRefreshOnGet, removePropertyValue, resourcesEqual, setMultipleObjectsForSameNode, setPropertyUriValue, setPropertyUriValues, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, SetPropertyValue, setPropertyValues, setPropertyValues, setPropertyValues, setPropertyValues, setPropertyValues, setPropertyValues, setSingleObjectForSameNode
-
Constructor Details
-
SpdxListedLicense
public SpdxListedLicense(String name, String id, String text, String[] sourceUrl, String comments, String standardLicenseHeader, String template, boolean osiApproved, Boolean fsfLibre, String licenseTextHtml, boolean isDeprecated, String deprecatedVersion) throws InvalidSPDXAnalysisException- Parameters:
name- License nameid- License IDtext- License textsourceUrl- Optional URLs that reference this licensecomments- Optional commentsstandardLicenseHeader- Optional license headertemplate- Optional templateosiApproved- True if this is an OSI Approved licensefsfLibre- 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 licenselicenseTextHtml- HTML version for the license textisDeprecated- True if this license has been designated as deprecated by the SPDX legal teamdeprecatedVersion- License list version when this license was first deprecated (null if not deprecated)- Throws:
InvalidSPDXAnalysisException
-
SpdxListedLicense
public SpdxListedLicense(String name, String id, String text, String[] sourceUrl, String comments, String standardLicenseHeader, String template, boolean osiApproved, String licenseTextHtml) throws InvalidSPDXAnalysisException- Parameters:
name- License nameid- License IDtext- License textsourceUrl- Optional URLs that reference this licensecomments- Optional commentsstandardLicenseHeader- Optional license headertemplate- Optional templateosiApproved- True if this is an OSI Approved licenselicenseTextHtml- HTML version for the license text- Throws:
InvalidSPDXAnalysisException
-
SpdxListedLicense
public SpdxListedLicense(String name, String id, String text, String[] sourceUrl, String comments, String standardLicenseHeader, String template, boolean osiApproved, boolean fsfLibre) throws InvalidSPDXAnalysisException- Parameters:
name- License nameid- License IDtext- License textsourceUrl- Optional URLs that reference this licensecomments- Optional commentsstandardLicenseHeader- Optional license headertemplate- Optional templateosiApproved- True if this is an OSI Approvied licensefsfLibre- True if the license is listed by the Free Software Foundation as free / libre- Throws:
InvalidSPDXAnalysisException
-
SpdxListedLicense
public SpdxListedLicense(String name, String id, String text, String[] sourceUrl, String comments, String standardLicenseHeader, String template, boolean osiApproved) throws InvalidSPDXAnalysisException- Parameters:
name- License nameid- License IDtext- License textsourceUrl- Optional URLs that reference this licensecomments- Optional commentsstandardLicenseHeader- Optional license headertemplate- Optional templateosiApproved- True if this is an OSI Approvied license- Throws:
InvalidSPDXAnalysisException
-
SpdxListedLicense
public SpdxListedLicense(IModelContainer modelContainer, org.apache.jena.graph.Node licenseNode) throws InvalidSPDXAnalysisExceptionConstructs an SPDX License from the licenseNode- Parameters:
modelContainer- container which includes the licenselicenseNode- RDF graph node representing the SPDX License- Throws:
InvalidSPDXAnalysisException
-
SpdxListedLicense
public SpdxListedLicense(String name, String id, String text, String[] sourceUrl, String comments, String standardLicenseHeader, String template, String licenseHeaderTemplate, boolean osiApproved, boolean fsfLibre, String licenseTextHtml, String licenseHeaderHtml) throws InvalidSPDXAnalysisException- Parameters:
name- License nameid- License IDtext- License textsourceUrl- Optional URLs that reference this licensecomments- Optional commentsstandardLicenseHeader- Optional license headertemplate- Optional templatelicenseHeaderTemplate- optional template for the standard license headerosiApproved- True if this is an OSI Approved licensefsfLibre- True if the license is listed by the Free Software Foundation as free / librelicenseTextHtml- HTML version for the license textlicenseHeaderHtml- HTML version for the standard license header- Throws:
InvalidSPDXAnalysisException
-
SpdxListedLicense
public SpdxListedLicense(String name, String id, String text, String[] sourceUrl, String comments, String standardLicenseHeader, String template, String licenseHeaderTemplate, boolean osiApproved, Boolean fsfLibre) throws InvalidSPDXAnalysisException- Parameters:
name- License nameid- License IDtext- License textsourceUrl- Optional URLs that reference this licensecomments- Optional commentsstandardLicenseHeader- Optional license headertemplate- Optional templatelicenseHeaderTemplate- optional template for the standard license headerosiApproved- True if this is an OSI Approved licensefsfLibre- True if the license is listed by the Free Software Foundation as free / libre- Throws:
InvalidSPDXAnalysisException
-
SpdxListedLicense
public SpdxListedLicense(String name, String id, String text, String[] sourceUrl, CrossRef[] sourceUrlDetails, String comments, String standardLicenseHeader, String template, String licenseHeaderTemplate, boolean osiApproved, Boolean fsfLibre) throws InvalidSPDXAnalysisException- Parameters:
name- License nameid- License IDtext- License textsourceUrl- Optional URLs that reference this licensesourceUrlDetails- Optional URLs that reference this licensecomments- Optional commentsstandardLicenseHeader- Optional license headertemplate- Optional templatelicenseHeaderTemplate- optional template for the standard license headerosiApproved- True if this is an OSI Approved licensefsfLibre- True if the license is listed by the Free Software Foundation as free / libre- Throws:
InvalidSPDXAnalysisException
-
-
Method Details
-
verify
-
getType
public org.apache.jena.rdf.model.Resource getType(org.apache.jena.rdf.model.Model model)- Specified by:
getTypein classRdfModelObject- Returns:
- the RDF class name for the object
-
getUri
Description copied from class:RdfModelObjectGet the URI for this RDF object. Null if this is for an anonomous node.- Overrides:
getUriin classSimpleLicensingInfo- Returns:
- Throws:
InvalidSPDXAnalysisException
-
equivalent
Description copied from interface:IRdfModelReturns true if the compare object contains properties which would be equal if they were contained in the same RDF Model- Specified by:
equivalentin interfaceIRdfModel- Overrides:
equivalentin classLicense- Returns:
-
getLicenseTextHtml
- Returns:
- HTML fragment containing the License Text
- Throws:
InvalidLicenseTemplateException
-
setLicenseTextHtml
Set the licenseTextHtml- Parameters:
licenseTextHtml- HTML fragment representing the license text
-
getLicenseHeaderHtml
- Returns:
- HTML fragment containing the License standard header text
- Throws:
InvalidLicenseTemplateException
-
setLicenseHeaderHtml
Set the licenseHeaderTemplateHtml- Parameters:
licenseHeaderHtml- HTML fragment representing the license standard header text
-
getDeprecatedVersion
- Returns:
- the deprecatedVersion
-
setDeprecatedVersion
- Parameters:
deprecatedVersion- the deprecatedVersion to set
-