Package org.spdx.rdfparser.license
Class WithExceptionOperator
java.lang.Object
org.spdx.rdfparser.model.RdfModelObject
org.spdx.rdfparser.license.AnyLicenseInfo
org.spdx.rdfparser.license.WithExceptionOperator
public class WithExceptionOperator extends AnyLicenseInfo
A license that has a With exception operator (e.g. GPL-2.0 WITH Autoconf-exception-2.0)
- Author:
- Gary O'Neall
-
Field Summary
Fields inherited from class org.spdx.rdfparser.model.RdfModelObject
model, modelContainer, node, refreshOnGet, resource
-
Constructor Summary
Constructors Constructor Description WithExceptionOperator(IModelContainer modelContainer, org.apache.jena.graph.Node licenseInfoNode)
Create a WithExceptionOperator from a node in an existing RDF modelWithExceptionOperator(AnyLicenseInfo license, LicenseException exception)
-
Method Summary
Modifier and Type Method Description protected org.apache.jena.rdf.model.Resource
_createResource(org.apache.jena.rdf.model.Resource type)
AnyLicenseInfo
clone()
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 ModelLicenseException
getException()
AnyLicenseInfo
getLicense()
void
getPropertiesFromModel()
Fetch all of the properties from the model and populate the local Java propertiesorg.apache.jena.rdf.model.Resource
getType(org.apache.jena.rdf.model.Model model)
String
getUri(IModelContainer modelContainer)
Get the URI for this RDF object.int
hashCode()
void
populateModel()
Populate the RDF model from the Java propertiesvoid
setException(LicenseException exception)
void
setLicense(AnyLicenseInfo license)
String
toString()
List<String>
verify()
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, findDuplicateResource, 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
-
WithExceptionOperator
public WithExceptionOperator(IModelContainer modelContainer, org.apache.jena.graph.Node licenseInfoNode) throws InvalidSPDXAnalysisExceptionCreate a WithExceptionOperator from a node in an existing RDF model- Parameters:
modelContainer
- contains the modellicenseInfoNode
- Node which defines the WithExceptionOperator- Throws:
InvalidSPDXAnalysisException
-
WithExceptionOperator
-
-
Method Details
-
_createResource
protected org.apache.jena.rdf.model.Resource _createResource(org.apache.jena.rdf.model.Resource type) throws InvalidSPDXAnalysisException- Throws:
InvalidSPDXAnalysisException
-
getLicense
- Returns:
- the license
-
setLicense
- Parameters:
license
- the license to set- Throws:
InvalidSPDXAnalysisException
-
getException
- Returns:
- the exception
-
setException
- Parameters:
exception
- the exception to set- Throws:
InvalidSPDXAnalysisException
-
toString
- Specified by:
toString
in classAnyLicenseInfo
-
equals
- Specified by:
equals
in classAnyLicenseInfo
-
hashCode
public int hashCode()- Specified by:
hashCode
in classAnyLicenseInfo
-
verify
- Returns:
- List of validation errors for any non SPDX compliant properties.
-
clone
- Specified by:
clone
in classAnyLicenseInfo
-
equivalent
Description copied from interface:IRdfModel
Returns true if the compare object contains properties which would be equal if they were contained in the same RDF Model- Returns:
-
populateModel
Description copied from class:RdfModelObject
Populate the RDF model from the Java properties- Specified by:
populateModel
in classAnyLicenseInfo
- Throws:
InvalidSPDXAnalysisException
-
getPropertiesFromModel
Description copied from class:RdfModelObject
Fetch all of the properties from the model and populate the local Java properties- Specified by:
getPropertiesFromModel
in classRdfModelObject
- Throws:
InvalidSPDXAnalysisException
-
getUri
Description copied from class:RdfModelObject
Get the URI for this RDF object. Null if this is for an anonomous node.- Specified by:
getUri
in classRdfModelObject
- Returns:
- Throws:
InvalidSPDXAnalysisException
-
getType
public org.apache.jena.rdf.model.Resource getType(org.apache.jena.rdf.model.Model model)- Specified by:
getType
in classRdfModelObject
- Returns:
- the RDF class name for the object
-