Package org.spdx.rdfparser.license
Class ExtractedLicenseInfo
java.lang.Object
org.spdx.rdfparser.model.RdfModelObject
org.spdx.rdfparser.license.AnyLicenseInfo
org.spdx.rdfparser.license.SimpleLicensingInfo
org.spdx.rdfparser.license.ExtractedLicenseInfo
- All Implemented Interfaces:
Cloneable,Comparable<ExtractedLicenseInfo>,IRdfModel
public class ExtractedLicenseInfo extends SimpleLicensingInfo implements Comparable<ExtractedLicenseInfo>
An ExtractedLicensingInfo represents a license or licensing notice that was found in the package.
Any license text that is recognized as a license may be represented as a License
rather than an ExtractedLicensingInfo.
- Author:
- Gary O'Neall
-
Field Summary
Fields 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 ExtractedLicenseInfo(String licenseID, String licenseText)ExtractedLicenseInfo(String id, String text, String licenseName, String[] crossReferenceUrls, String comment)ExtractedLicenseInfo(IModelContainer modelContainer, org.apache.jena.graph.Node licenseInfoNode) -
Method Summary
Modifier and Type Method Description AnyLicenseInfoclone()intcompareTo(ExtractedLicenseInfo o)booleanequals(Object o)booleanequivalent(IRdfModel compare)Returns true if the compare object contains properties which would be equal if they were contained in the same RDF ModelStringgetExtractedText()voidgetPropertiesFromModel()Fetch all of the properties from the model and populate the local Java propertiesorg.apache.jena.rdf.model.ResourcegetType(org.apache.jena.rdf.model.Model model)inthashCode()voidpopulateModel()Populate the RDF model from the Java propertiesvoidsetExtractedText(String text)StringtoString()List<String>verify()Methods inherited from class org.spdx.rdfparser.license.SimpleLicensingInfo
findDuplicateResource, getComment, getCrossRef, getLicenseId, getName, getSeeAlso, getUri, 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
-
ExtractedLicenseInfo
public ExtractedLicenseInfo(IModelContainer modelContainer, org.apache.jena.graph.Node licenseInfoNode) throws InvalidSPDXAnalysisException- Parameters:
modelContainer- container which includes the licenselicenseInfoNode- Node that defines the ExtractedLicenseInfo- Throws:
InvalidSPDXAnalysisException
-
ExtractedLicenseInfo
public ExtractedLicenseInfo(String id, String text, String licenseName, String[] crossReferenceUrls, String comment)- Parameters:
id- licenseIDtext- license textlicenseName- license namecrossReferenceUrls- Optional URL's that refer to the same licensecomment- optional comment
-
ExtractedLicenseInfo
- Parameters:
licenseID-licenseText-
-
-
Method Details
-
getPropertiesFromModel
Description copied from class:RdfModelObjectFetch all of the properties from the model and populate the local Java properties- Overrides:
getPropertiesFromModelin classSimpleLicensingInfo- Throws:
InvalidSPDXAnalysisException
-
populateModel
Description copied from class:RdfModelObjectPopulate the RDF model from the Java properties- Overrides:
populateModelin classSimpleLicensingInfo- Throws:
InvalidSPDXAnalysisException
-
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
-
toString
- Specified by:
toStringin classAnyLicenseInfo
-
getExtractedText
- Returns:
- the text
-
setExtractedText
- Parameters:
text- the text to set
-
hashCode
public int hashCode()- Overrides:
hashCodein classSimpleLicensingInfo
-
equals
- Overrides:
equalsin classSimpleLicensingInfo
-
verify
-
clone
- Specified by:
clonein classAnyLicenseInfo
-
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 classSimpleLicensingInfo- Returns:
-
compareTo
- Specified by:
compareToin interfaceComparable<ExtractedLicenseInfo>
-