public class SPDXFile extends Object implements Comparable<SPDXFile>
| Modifier and Type | Field and Description |
|---|---|
static HashMap<String,String> |
FILE_TYPE_TO_RESOURCE |
static HashMap<String,String> |
RESOURCE_TO_FILE_TYPE |
| Constructor and Description |
|---|
SPDXFile(com.hp.hpl.jena.rdf.model.Model model,
com.hp.hpl.jena.graph.Node fileNode)
Construct an SPDX File form the fileNode
|
SPDXFile(String name,
String type,
String sha1,
SPDXLicenseInfo concludedLicenses,
SPDXLicenseInfo[] seenLicenses,
String licenseComments,
String copyright,
DOAPProject[] artifactOf) |
SPDXFile(String name,
String type,
String sha1,
SPDXLicenseInfo concludedLicenses,
SPDXLicenseInfo[] seenLicenses,
String licenseComments,
String copyright,
DOAPProject[] artifactOf,
String comment) |
SPDXFile(String name,
String type,
String sha1,
SPDXLicenseInfo concludedLicenses,
SPDXLicenseInfo[] seenLicenses,
String licenseComments,
String copyright,
DOAPProject[] artifactOf,
String comment,
SPDXFile[] fileDependencies,
String[] contributors,
String noticeText) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(SPDXFile file)
This method is used for sorting a list of SPDX files
|
protected static com.hp.hpl.jena.rdf.model.Resource |
convertToResource(com.hp.hpl.jena.rdf.model.Model cmodel,
com.hp.hpl.jena.graph.Node cnode)
Convert a node to a resource
|
com.hp.hpl.jena.rdf.model.Resource |
createResource(com.hp.hpl.jena.rdf.model.Model model) |
boolean |
equals(Object o) |
static String |
fileTypeResourceToString(com.hp.hpl.jena.rdf.model.Resource fileTypeResource) |
static com.hp.hpl.jena.rdf.model.Resource |
fileTypeStringToTypeResource(String fileType,
com.hp.hpl.jena.rdf.model.Model model)
Converts a string file type to an RDF resource
|
protected static com.hp.hpl.jena.rdf.model.Resource |
findFileResource(com.hp.hpl.jena.rdf.model.Model model,
SPDXFile spdxFile)
Finds the resource for an existing file in the model
|
DOAPProject[] |
getArtifactOf() |
String |
getComment() |
SPDXLicenseInfo |
getConcludedLicenses() |
String[] |
getContributors() |
String |
getCopyright() |
SPDXFile[] |
getFileDependencies() |
String |
getLicenseComments() |
String |
getName() |
String |
getNoticeText() |
protected com.hp.hpl.jena.rdf.model.Resource |
getResource() |
SPDXLicenseInfo[] |
getSeenLicenses() |
String |
getSha1() |
String |
getType() |
void |
setArtifactOf(DOAPProject[] artifactOf) |
void |
setComment(String comment) |
void |
setConcludedLicenses(SPDXLicenseInfo fileLicenses) |
void |
setContributors(String[] contributors)
Set the contributors to the file
|
void |
setCopyright(String copyright) |
void |
setFileDependencies(SPDXFile[] fileDependencies)
Set the file dependencies for this file
|
void |
setLicenseComments(String licenseComments) |
void |
setName(String name) |
void |
setNoticeText(String noticeText) |
void |
setSeenLicenses(SPDXLicenseInfo[] seenLicenses) |
void |
setSha1(String sha1) |
void |
setType(String type) |
ArrayList<String> |
verify() |
public SPDXFile(com.hp.hpl.jena.rdf.model.Model model,
com.hp.hpl.jena.graph.Node fileNode)
throws InvalidSPDXAnalysisException
fileNode - RDF Graph node representing the SPDX FileInvalidSPDXAnalysisExceptionpublic SPDXFile(String name, String type, String sha1, SPDXLicenseInfo concludedLicenses, SPDXLicenseInfo[] seenLicenses, String licenseComments, String copyright, DOAPProject[] artifactOf, String comment, SPDXFile[] fileDependencies, String[] contributors, String noticeText)
public SPDXFile(String name, String type, String sha1, SPDXLicenseInfo concludedLicenses, SPDXLicenseInfo[] seenLicenses, String licenseComments, String copyright, DOAPProject[] artifactOf)
public SPDXFile(String name, String type, String sha1, SPDXLicenseInfo concludedLicenses, SPDXLicenseInfo[] seenLicenses, String licenseComments, String copyright, DOAPProject[] artifactOf, String comment)
protected static com.hp.hpl.jena.rdf.model.Resource convertToResource(com.hp.hpl.jena.rdf.model.Model cmodel,
com.hp.hpl.jena.graph.Node cnode)
throws InvalidSPDXAnalysisException
cmodel - cnode - InvalidSPDXAnalysisExceptionpublic com.hp.hpl.jena.rdf.model.Resource createResource(com.hp.hpl.jena.rdf.model.Model model)
throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionprotected static com.hp.hpl.jena.rdf.model.Resource findFileResource(com.hp.hpl.jena.rdf.model.Model model,
SPDXFile spdxFile)
throws InvalidSPDXAnalysisException
spdxFile - InvalidSPDXAnalysisExceptionpublic SPDXLicenseInfo[] getSeenLicenses()
InvalidSPDXAnalysisExceptionpublic void setSeenLicenses(SPDXLicenseInfo[] seenLicenses)
seenLicenses - the seenLicenses to setpublic String getLicenseComments()
public void setLicenseComments(String licenseComments)
licenseComments - the licenseComments to setpublic String getNoticeText()
public void setNoticeText(String noticeText)
noticeTexgt - the noticeText to setpublic String getComment()
public void setComment(String comment)
public String getCopyright()
public void setCopyright(String copyright)
copyright - the copyright to setpublic String getName()
public void setName(String name)
name - the name to setpublic SPDXLicenseInfo getConcludedLicenses()
InvalidSPDXAnalysisExceptionpublic void setConcludedLicenses(SPDXLicenseInfo fileLicenses)
fileLicenses - the fileLicenses to setpublic String getSha1()
InvalidSPDXAnalysisExceptionpublic void setSha1(String sha1)
sha1 - the sha1 to setpublic String getType()
InvalidSPDXAnalysisExceptionpublic void setType(String type) throws InvalidSPDXAnalysisException
type - the type to setInvalidSPDXAnalysisExceptionpublic static com.hp.hpl.jena.rdf.model.Resource fileTypeStringToTypeResource(String fileType, com.hp.hpl.jena.rdf.model.Model model) throws InvalidSPDXAnalysisException
fileType - InvalidSPDXAnalysisExceptionpublic static String fileTypeResourceToString(com.hp.hpl.jena.rdf.model.Resource fileTypeResource) throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionpublic DOAPProject[] getArtifactOf()
InvalidSPDXAnalysisExceptionpublic void setArtifactOf(DOAPProject[] artifactOf)
artifactOf - the artifactOf to setpublic SPDXFile[] getFileDependencies()
InvalidSPDXAnalysisExceptionpublic void setFileDependencies(SPDXFile[] fileDependencies) throws InvalidSPDXAnalysisException
fileDependencies - InvalidSPDXAnalysisExceptionprotected com.hp.hpl.jena.rdf.model.Resource getResource()
public String[] getContributors()
public void setContributors(String[] contributors)
contributors - public int compareTo(SPDXFile file)
compareTo in interface Comparable<SPDXFile>file - SPDXFile that is comparedCopyright © 2014 Linux Foundation. All Rights Reserved.