public abstract class License extends SimpleLicensingInfo
| Modifier and Type | Field and Description |
|---|---|
protected String |
licenseText |
protected boolean |
osiApproved |
protected String |
standardLicenseHeader |
protected String |
standardLicenseTemplate |
comment, licenseId, name, seeAlsomodel, modelContainer, node, refreshOnGet, resource| Constructor and Description |
|---|
License(IModelContainer modelContainer,
org.apache.jena.graph.Node licenseNode)
Constructs an SPDX License from the licenseNode
|
License(String name,
String id,
String text,
String[] sourceUrl,
String comments,
String standardLicenseHeader,
String template,
boolean osiApproved) |
| Modifier and Type | Method and Description |
|---|---|
AnyLicenseInfo |
clone() |
void |
copyFrom(License license)
Copy all of the parameters from another license
|
boolean |
equals(Object o) |
boolean |
equivalent(IRdfModel compare)
Returns true if the compare object contains properties which would be equal if they were contained in the same RDF Model
|
String |
getLicenseText() |
String |
getNotes()
Deprecated.
|
void |
getPropertiesFromModel()
Fetch all of the properties from the model and populate the local Java properties
|
String |
getStandardLicenseHeader() |
String |
getStandardLicenseTemplate() |
int |
hashCode() |
boolean |
isOsiApproved() |
void |
populateModel()
Populate the RDF model from the Java properties
|
void |
setLicenseText(String text) |
void |
setNotes(String notes)
Deprecated.
|
void |
setOsiApproved(boolean osiApproved) |
void |
setStandardLicenseHeader(String standardLicenseHeader) |
void |
setStandardLicenseTemplate(String template) |
String |
toString() |
List<String> |
verify() |
findDuplicateResource, getComment, getLicenseId, getName, getSeeAlso, getUri, setComment, setLicenseId, setName, setSeeAlsogetResourceaddPropertyUriValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, arraysEquivalent, createResource, createResource, equivalentConsideringNull, findAnnotationPropertyValues, findAnyLicenseInfoPropertyValue, findAnyLicenseInfoPropertyValues, findChecksumPropertyValue, findCreationInfoPropertyValue, findElementPropertyValue, findExternalDocRefPropertyValues, findExternalDocRefPropertyValues, findExternalRefPropertyValues, findIntPropertyValue, findMultipleChecksumPropertyValues, findMultipleDoapPropertyValues, findMultipleElementPropertyValues, findMultiplePropertyValues, findReferenceTypePropertyValue, findRelationshipPropertyValues, findReviewPropertyValues, findSinglePointerPropertyValue, findSinglePropertyValue, findStartEndPointerPropertyValues, findUriPropertyValue, findUriPropertyValues, findVerificationCodePropertyValue, getNode, getType, isRefreshOnGet, removePropertyValue, resourcesEqual, setMultipleObjectsForSameNode, setPropertyUriValue, setPropertyUriValues, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValues, setPropertyValues, setPropertyValues, setPropertyValues, setPropertyValues, setPropertyValues, setSingleObjectForSameNodeprotected String standardLicenseHeader
protected String standardLicenseTemplate
protected String licenseText
protected boolean osiApproved
public License(String name, String id, String text, String[] sourceUrl, String comments, String standardLicenseHeader, String template, boolean osiApproved) throws InvalidSPDXAnalysisException
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 licenseInvalidSPDXAnalysisExceptionpublic License(IModelContainer modelContainer, org.apache.jena.graph.Node licenseNode) throws InvalidSPDXAnalysisException
modelContainer - container which includes the licenselicenseNode - RDF graph node representing the SPDX LicenseInvalidSPDXAnalysisExceptionpublic void getPropertiesFromModel()
throws InvalidSPDXAnalysisException
RdfModelObjectgetPropertiesFromModel in class SimpleLicensingInfoInvalidSPDXAnalysisExceptionpublic void populateModel()
throws InvalidSPDXAnalysisException
RdfModelObjectpopulateModel in class SimpleLicensingInfoInvalidSPDXAnalysisExceptionpublic String getLicenseText()
public void setLicenseText(String text)
text - the license text to set@Deprecated public String getNotes()
@Deprecated public void setNotes(String notes)
public String getStandardLicenseHeader()
public void setStandardLicenseHeader(String standardLicenseHeader)
standardLicenseHeader - the standardLicenseHeader to setpublic String getStandardLicenseTemplate()
public void setStandardLicenseTemplate(String template)
template - the template to setpublic String toString()
toString in class AnyLicenseInfopublic int hashCode()
hashCode in class SimpleLicensingInfopublic boolean equals(Object o)
equals in class SimpleLicensingInfopublic List<String> verify()
public boolean isOsiApproved()
public void setOsiApproved(boolean osiApproved)
public AnyLicenseInfo clone()
clone in class AnyLicenseInfopublic void copyFrom(License license)
license - public boolean equivalent(IRdfModel compare)
IRdfModelequivalent in interface IRdfModelequivalent in class SimpleLicensingInfocompare - Copyright © 2017 Linux Foundation. All Rights Reserved.