public class SpdxSnippet extends SpdxItem implements Comparable<SpdxSnippet>
annotations, comment, name, relationshipsmodel, modelContainer, node, refreshOnGet, resource| Constructor and Description |
|---|
SpdxSnippet(IModelContainer modelContainer,
org.apache.jena.graph.Node node) |
SpdxSnippet(String name,
String comment,
Annotation[] annotations,
Relationship[] relationships,
AnyLicenseInfo licenseConcluded,
AnyLicenseInfo[] licenseInfoInFile,
String copyrightText,
String licenseComment,
SpdxFile snippetFromFile,
StartEndPointer byteRange,
StartEndPointer lineRange) |
| Modifier and Type | Method and Description |
|---|---|
SpdxSnippet |
clone() |
SpdxSnippet |
clone(Map<String,SpdxElement> clonedElementIds)
Clones this element, but prevents infinite recursion by
keeping track of all elements which have been cloned
|
int |
compareTo(SpdxSnippet o) |
boolean |
equivalent(IRdfModel o)
Returns true if the compare object contains properties which would be equal if they were contained in the same RDF Model
|
boolean |
equivalent(IRdfModel o,
boolean testRelationships)
Test for equivalent
|
org.apache.jena.rdf.model.Resource |
findDuplicateResource(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.
|
StartEndPointer |
getByteRange() |
String |
getLicenseInfoFromFilesPropertyName() |
StartEndPointer |
getLineRange() |
void |
getPropertiesFromModel()
Fetch all of the properties from the model and populate the local Java properties
|
SpdxFile |
getSnippetFromFile() |
org.apache.jena.rdf.model.Resource |
getType(org.apache.jena.rdf.model.Model model) |
void |
populateModel()
Populate the RDF model from the Java properties
|
void |
setByteRange(StartEndPointer byteRange) |
void |
setLineRange(StartEndPointer lineRange) |
void |
setSnippetFromFile(SpdxFile snippetFromFile) |
String |
toString() |
List<String> |
verify() |
cloneLicenseConcluded, cloneLicenseInfosFromFiles, getCopyrightText, getLicenseComment, getLicenseComments, getLicenseConcluded, getLicenseInfoFromFiles, setCopyrightText, setLicenseComment, setLicenseComments, setLicenseConcluded, setLicenseInfosFromFilesaddAnnotation, addNameToWarnings, addRelationship, arraysEquivalent, arraysEquivalent, cloneAnnotations, cloneRelationships, equivalentConsideringNull, equivalentConsideringNull, getAnnotations, getComment, getId, getName, getNamePropertyName, getRelationships, getUri, setAnnotations, setComment, setId, setName, setRelationshipsaddPropertyUriValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, createResource, createResource, equals, findAnnotationPropertyValues, findAnyLicenseInfoPropertyValue, findAnyLicenseInfoPropertyValues, findChecksumPropertyValue, findCreationInfoPropertyValue, findElementPropertyValue, findExternalDocRefPropertyValues, findExternalDocRefPropertyValues, findExternalRefPropertyValues, findIntPropertyValue, findMultipleChecksumPropertyValues, findMultipleDoapPropertyValues, findMultipleElementPropertyValues, findMultiplePropertyValues, findReferenceTypePropertyValue, findRelationshipPropertyValues, findReviewPropertyValues, findSinglePointerPropertyValue, findSinglePropertyValue, findStartEndPointerPropertyValues, findUriPropertyValue, findUriPropertyValues, findVerificationCodePropertyValue, getNode, hashCode, 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, setSingleObjectForSameNodepublic SpdxSnippet(String name, String comment, Annotation[] annotations, Relationship[] relationships, AnyLicenseInfo licenseConcluded, AnyLicenseInfo[] licenseInfoInFile, String copyrightText, String licenseComment, SpdxFile snippetFromFile, StartEndPointer byteRange, StartEndPointer lineRange)
name - Identify a specific snippet in a human convenient mannercomment - This field provides a place for the SPDX document creator to record any general
comments about the snippet.annotations - relationships - licenseConcluded - This field contains the license the SPDX file creator has concluded as governing
the snippet or alternative values if the governing license cannot be determinedlicenseInfoInFile - copyrightText - Identify the copyright holder of the snippet, as well as any dates present.licenseComment - This field provides a place for the SPDX document creator to record any relevant
background references or analysis that went in to arriving at the Concluded License for a snippetsnippetFromFile - Uniquely identify the file in an SPDX document which this snippet is associatedbyteRange - This field defines the byte range in the original host file (in X.2) that the snippet
information applies to.lineRange - This optional field defines the line range in the original host file (in X.2) that the
snippet information applies to.public SpdxSnippet(IModelContainer modelContainer, org.apache.jena.graph.Node node) throws InvalidSPDXAnalysisException
modelContainer - node - InvalidSPDXAnalysisExceptionpublic void getPropertiesFromModel()
throws InvalidSPDXAnalysisException
RdfModelObjectgetPropertiesFromModel in class SpdxItemInvalidSPDXAnalysisExceptionpublic org.apache.jena.rdf.model.Resource findDuplicateResource(IModelContainer modelContainer, String uri) throws InvalidSPDXAnalysisException
RdfModelObjectfindDuplicateResource in class RdfModelObjectInvalidSPDXAnalysisExceptionpublic String getLicenseInfoFromFilesPropertyName()
getLicenseInfoFromFilesPropertyName in class SpdxItempublic SpdxFile getSnippetFromFile() throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionpublic void setSnippetFromFile(SpdxFile snippetFromFile) throws InvalidSPDXAnalysisException
snippetFromFile - the snippetFromFile to setInvalidSPDXAnalysisExceptionpublic StartEndPointer getByteRange() throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionpublic void setByteRange(StartEndPointer byteRange) throws InvalidSPDXAnalysisException
byteRange - the byteRange to setInvalidSPDXAnalysisExceptionpublic StartEndPointer getLineRange() throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionpublic void setLineRange(StartEndPointer lineRange) throws InvalidSPDXAnalysisException
lineRange - the lineRange to setInvalidSPDXAnalysisExceptionpublic void populateModel()
throws InvalidSPDXAnalysisException
RdfModelObjectpopulateModel in class SpdxItemInvalidSPDXAnalysisExceptionpublic org.apache.jena.rdf.model.Resource getType(org.apache.jena.rdf.model.Model model)
public boolean equivalent(IRdfModel o)
IRdfModelequivalent in interface IRdfModelequivalent in class SpdxItempublic boolean equivalent(IRdfModel o, boolean testRelationships)
SpdxElementequivalent in class SpdxItemtestRelationships - If true, test relationshipspublic SpdxSnippet clone(Map<String,SpdxElement> clonedElementIds)
SpdxElementpublic SpdxSnippet clone()
public int compareTo(SpdxSnippet o)
compareTo in interface Comparable<SpdxSnippet>public String toString()
toString in class SpdxElementCopyright © 2017 Linux Foundation. All Rights Reserved.