Package org.spdx.rdfparser.license
Class SimpleLicensingInfo
java.lang.Object
org.spdx.rdfparser.model.RdfModelObject
org.spdx.rdfparser.license.AnyLicenseInfo
org.spdx.rdfparser.license.SimpleLicensingInfo
- Direct Known Subclasses:
ExtractedLicenseInfo,License
public abstract class SimpleLicensingInfo extends AnyLicenseInfo
The SimpleLicenseInfo class includes all resources that represent
simple, atomic, licensing information.
- Author:
- Gary O'Neall
-
Field Summary
Fields Modifier and Type Field Description protected Stringcommentprotected CrossRef[]crossRefprotected StringlicenseIdprotected Stringnameprotected String[]seeAlsoFields inherited from class org.spdx.rdfparser.model.RdfModelObject
model, modelContainer, node, refreshOnGet, resource -
Method Summary
Modifier and Type Method Description booleanequals(Object comp)booleanequivalent(IRdfModel compare)Returns true if the compare object contains properties which would be equal if they were contained in the same RDF Modelorg.apache.jena.rdf.model.ResourcefindDuplicateResource(IModelContainer modelContainer, String uri)Search the model to see if there is a duplicate resource either based on the URI or based on other information.StringgetComment()CrossRef[]getCrossRef()StringgetLicenseId()StringgetName()voidgetPropertiesFromModel()Fetch all of the properties from the model and populate the local Java propertiesString[]getSeeAlso()StringgetUri(IModelContainer modelContainer)Get the URI for this RDF object.inthashCode()voidpopulateModel()Populate the RDF model from the Java propertiesvoidsetComment(String comment)voidsetCrossRef(CrossRef[] seeAlsoUrl)voidsetLicenseId(String id)voidsetName(String name)voidsetSeeAlso(String[] seeAlsoUrl)Methods 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, getType, 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
-
Field Details
-
Method Details
-
getPropertiesFromModel
Description copied from class:RdfModelObjectFetch all of the properties from the model and populate the local Java properties- Specified by:
getPropertiesFromModelin classRdfModelObject- Throws:
InvalidSPDXAnalysisException
-
getLicenseId
- Returns:
- the id
-
setLicenseId
- Parameters:
id- the id to set
-
getName
- Returns:
- the name
-
setName
- Parameters:
name- the name to set
-
getComment
- Returns:
- the comments
-
setComment
- Parameters:
comment- the comment to set
-
getSeeAlso
- Returns:
- the urls which reference the same license information
-
setSeeAlso
- Parameters:
seeAlsoUrl- the urls which are references to the same license to set
-
getCrossRef
- Returns:
- the urls which reference the same license information
- Throws:
InvalidSPDXAnalysisException
-
setCrossRef
- Parameters:
seeAlsoUrl- the urls which are references to the same license to set- Throws:
InvalidSPDXAnalysisException
-
findDuplicateResource
public org.apache.jena.rdf.model.Resource findDuplicateResource(IModelContainer modelContainer, String uri) throws InvalidSPDXAnalysisExceptionDescription copied from class:RdfModelObjectSearch the model to see if there is a duplicate resource either based on the URI or based on other information. Subclasses may choose to override this method to prevent duplicate resource from being created with the same properties.- Overrides:
findDuplicateResourcein classRdfModelObject- Returns:
- Any duplicate resource found. Null if no duplicate resource was found.
- Throws:
InvalidSPDXAnalysisException
-
populateModel
Description copied from class:RdfModelObjectPopulate the RDF model from the Java properties- Specified by:
populateModelin classAnyLicenseInfo- Throws:
InvalidSPDXAnalysisException
-
hashCode
public int hashCode()- Specified by:
hashCodein classAnyLicenseInfo
-
equals
- Specified by:
equalsin 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- Returns:
-
getUri
Description copied from class:RdfModelObjectGet the URI for this RDF object. Null if this is for an anonomous node.- Specified by:
getUriin classRdfModelObject- Returns:
- Throws:
InvalidSPDXAnalysisException
-