public class SpdxFile extends SpdxItem implements Comparable<SpdxFile>
| Modifier and Type | Class and Description |
|---|---|
static class |
SpdxFile.FileType |
| Modifier and Type | Field and Description |
|---|---|
static Map<SpdxFile.FileType,String> |
FILE_TYPE_TO_TAG
Deprecated.
|
static Map<String,SpdxFile.FileType> |
TAG_TO_FILE_TYPE
Deprecated.
|
annotations, comment, name, relationshipsmodel, modelContainer, node, refreshOnGet, resource| Constructor and Description |
|---|
SpdxFile(IModelContainer modelContainer,
org.apache.jena.graph.Node node) |
SpdxFile(String fileName,
SpdxFile.FileType[] fileTypes,
String sha1Value,
AnyLicenseInfo licenseConcluded,
AnyLicenseInfo[] licenseInfoInFiles,
String licenseComment,
String copyrightText,
DoapProject[] artifactOfs,
String fileComment) |
SpdxFile(String name,
String comment,
Annotation[] annotations,
Relationship[] relationships,
AnyLicenseInfo licenseConcluded,
AnyLicenseInfo[] licenseInfoInFile,
String copyrightText,
String licenseComment,
SpdxFile.FileType[] fileTypes,
Checksum[] checksums,
String[] fileContributors,
String noticeText,
DoapProject[] artifactOf) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChecksum(Checksum checksum)
Add a checksum
|
void |
addFileType(SpdxFile.FileType fileType)
Add a file type to this file
|
SpdxFile |
clone() |
SpdxFile |
clone(Map<String,SpdxElement> clonedElementIds)
Clones this element, but prevents infinite recursion by
keeping track of all elements which have been cloned
|
protected DoapProject[] |
cloneArtifactOf() |
protected Checksum[] |
cloneChecksum() |
SpdxFile[] |
cloneFileDependencies(Map<String,SpdxElement> clonedElementIds) |
int |
compareTo(SpdxFile file)
This method is used for sorting a list of SPDX files
|
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.
|
protected static org.apache.jena.rdf.model.Resource |
findFileResource(IModelContainer modelContainer,
SpdxFile spdxFile)
Finds the resource for an existing file in the model
|
DoapProject[] |
getArtifactOf()
Deprecated.
|
Checksum[] |
getChecksums() |
AnyLicenseInfo |
getConcludedLicenses()
Deprecated.
|
String[] |
getContributors()
Deprecated.
|
String |
getCopyright()
Deprecated.
|
String[] |
getFileContributors() |
SpdxFile[] |
getFileDependencies()
Deprecated.
|
SpdxFile.FileType[] |
getFileTypes() |
protected String |
getLicenseInfoFromFilesPropertyName() |
protected String |
getNamePropertyName() |
String |
getNoticeText() |
void |
getPropertiesFromModel()
Fetch all of the properties from the model and populate the local Java properties
|
AnyLicenseInfo[] |
getSeenLicenses()
Deprecated.
|
String |
getSha1() |
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 |
setArtifactOf(DoapProject[] artifactOf)
Deprecated.
|
void |
setChecksums(Checksum[] checksums) |
void |
setConcludedLicenses(AnyLicenseInfo concludedLicense)
Deprecated.
|
void |
setContributors(String[] contributors)
Deprecated.
|
void |
setCopyright(String copyright)
Deprecated.
|
void |
setFileContributors(String[] fileContributors) |
void |
setFileDependencies(SpdxFile[] fileDependencies)
Deprecated.
|
void |
setFileTypes(SpdxFile.FileType[] fileTypes) |
void |
setNoticeText(String noticeText) |
void |
setSeenLicenses(AnyLicenseInfo[] seenLicenses)
Deprecated.
|
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, getRelationships, getUri, setAnnotations, setComment, setId, setName, setRelationships, toStringaddPropertyUriValue, 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, setSingleObjectForSameNode@Deprecated public static final Map<SpdxFile.FileType,String> FILE_TYPE_TO_TAG
@Deprecated public static final Map<String,SpdxFile.FileType> TAG_TO_FILE_TYPE
public SpdxFile(String name, String comment, Annotation[] annotations, Relationship[] relationships, AnyLicenseInfo licenseConcluded, AnyLicenseInfo[] licenseInfoInFile, String copyrightText, String licenseComment, SpdxFile.FileType[] fileTypes, Checksum[] checksums, String[] fileContributors, String noticeText, DoapProject[] artifactOf) throws InvalidSPDXAnalysisException
name - fileNamecomment - Comment on the fileannotations - annotations for the filerelationships - Relationships to this filelicenseConcluded - licenseInfoInFile - copyrightText - licenseComment - InvalidSPDXAnalysisExceptionpublic SpdxFile(String fileName, SpdxFile.FileType[] fileTypes, String sha1Value, AnyLicenseInfo licenseConcluded, AnyLicenseInfo[] licenseInfoInFiles, String licenseComment, String copyrightText, DoapProject[] artifactOfs, String fileComment) throws InvalidSPDXAnalysisException
fileName - fileTypes - sha1Value - licenseConcluded - licenseInfoInFiles - licenseComment - copyrightText - artifactOfs - fileComment - InvalidSPDXAnalysisExceptionpublic SpdxFile(IModelContainer modelContainer, org.apache.jena.graph.Node node) throws InvalidSPDXAnalysisException
modelContainer - node - InvalidSPDXAnalysisExceptionpublic void getPropertiesFromModel()
throws InvalidSPDXAnalysisException
RdfModelObjectgetPropertiesFromModel in class SpdxItemInvalidSPDXAnalysisExceptionprotected static org.apache.jena.rdf.model.Resource findFileResource(IModelContainer modelContainer, SpdxFile spdxFile) throws InvalidSPDXAnalysisException
spdxFile - InvalidSPDXAnalysisExceptionpublic org.apache.jena.rdf.model.Resource findDuplicateResource(IModelContainer modelContainer, String uri) throws InvalidSPDXAnalysisException
RdfModelObjectfindDuplicateResource in class RdfModelObjectInvalidSPDXAnalysisExceptionpublic String getSha1()
public void populateModel()
throws InvalidSPDXAnalysisException
RdfModelObjectpopulateModel in class SpdxItemInvalidSPDXAnalysisExceptionprotected String getLicenseInfoFromFilesPropertyName()
getLicenseInfoFromFilesPropertyName in class SpdxItemprotected String getNamePropertyName()
getNamePropertyName in class SpdxElementpublic org.apache.jena.rdf.model.Resource getType(org.apache.jena.rdf.model.Model model)
public SpdxFile.FileType[] getFileTypes()
public void setFileTypes(SpdxFile.FileType[] fileTypes) throws InvalidSPDXAnalysisException
fileTypes - the fileTypes to setInvalidSPDXAnalysisExceptionpublic void addFileType(SpdxFile.FileType fileType) throws InvalidSPDXAnalysisException
fileType - InvalidSPDXAnalysisExceptionpublic Checksum[] getChecksums()
public void setChecksums(Checksum[] checksums) throws InvalidSPDXAnalysisException
checksums - the checksums to setInvalidSPDXAnalysisExceptionpublic void addChecksum(Checksum checksum) throws InvalidSPDXAnalysisException
checksum - InvalidSPDXAnalysisExceptionpublic String[] getFileContributors()
public void setFileContributors(String[] fileContributors)
fileContributors - the fileContributors to setpublic String getNoticeText()
public void setNoticeText(String noticeText)
noticeText - the noticeText to set@Deprecated public DoapProject[] getArtifactOf()
@Deprecated public void setArtifactOf(DoapProject[] artifactOf) throws InvalidSPDXAnalysisException
artifactOf - the artifactOf to setInvalidSPDXAnalysisException@Deprecated public SpdxFile[] getFileDependencies()
@Deprecated public void setFileDependencies(SpdxFile[] fileDependencies) throws InvalidSPDXAnalysisException
fileDependencies - the fileDependencies to setInvalidSPDXAnalysisExceptionpublic boolean equivalent(IRdfModel o)
IRdfModelequivalent in interface IRdfModelequivalent in class SpdxItempublic boolean equivalent(IRdfModel o, boolean testRelationships)
SpdxElementequivalent in class SpdxItemtestRelationships - If true, test relationshipsprotected Checksum[] cloneChecksum()
protected DoapProject[] cloneArtifactOf()
public SpdxFile[] cloneFileDependencies(Map<String,SpdxElement> clonedElementIds)
public SpdxFile clone(Map<String,SpdxElement> clonedElementIds)
SpdxElementpublic int compareTo(SpdxFile file)
compareTo in interface Comparable<SpdxFile>file - SPDXFile that is compared@Deprecated public String getCopyright()
@Deprecated public void setCopyright(String copyright)
copyright - @Deprecated public AnyLicenseInfo getConcludedLicenses()
@Deprecated public void setConcludedLicenses(AnyLicenseInfo concludedLicense) throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisException@Deprecated public String[] getContributors()
@Deprecated public void setContributors(String[] contributors)
@Deprecated public AnyLicenseInfo[] getSeenLicenses()
@Deprecated public void setSeenLicenses(AnyLicenseInfo[] seenLicenses) throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionCopyright © 2018 Linux Foundation. All Rights Reserved.