@Deprecated public class SPDXDocument extends Object implements SpdxRdfConstants, IModelContainer
addNonStandardLicense(licenseText) can be called to
create a new unique Non-Standard License.
This class is provided for compatibility with version 1.2 of the libraries - it has been
replaced with SpdxDocumentContainer in version 2.0 and above.| Modifier and Type | Class and Description |
|---|---|
class |
SPDXDocument.SPDXPackage
Deprecated.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
CURRENT_IMPLEMENTATION_VERSION
Deprecated.
|
static String |
CURRENT_SPDX_VERSION
Deprecated.
|
static String |
ONE_DOT_ONE_SPDX_VERSION
Deprecated.
|
static String |
ONE_DOT_TWO_SPDX_VERSION
Deprecated.
|
static String |
ONE_DOT_ZERO_SPDX_VERSION
Deprecated.
|
static String |
POINT_EIGHT_SPDX_VERSION
Deprecated.
|
static String |
POINT_NINE_SPDX_VERSION
Deprecated.
|
static String |
TWO_DOT_ZERO_DOT_ZERO_VERSION
Deprecated.
|
ALGORITHM_SHA1, CLASS_ANNOTATION, CLASS_DOAP_PROJECT, CLASS_EXTERNAL_DOC_REF, CLASS_OR_LATER_OPERATOR, CLASS_POINTER_BYTE_OFFSET_POINTER, CLASS_POINTER_LINE_CHAR_POINTER, CLASS_POINTER_START_END_POINTER, CLASS_RELATIONSHIP, CLASS_SPDX_ANY_LICENSE_INFO, CLASS_SPDX_CHECKSUM, CLASS_SPDX_CONJUNCTIVE_LICENSE_SET, CLASS_SPDX_CREATION_INFO, CLASS_SPDX_DISJUNCTIVE_LICENSE_SET, CLASS_SPDX_DOCUMENT, CLASS_SPDX_ELEMENT, CLASS_SPDX_EXTERNAL_REFERENCE, CLASS_SPDX_EXTRACTED_LICENSING_INFO, CLASS_SPDX_FILE, CLASS_SPDX_ITEM, CLASS_SPDX_LICENSE, CLASS_SPDX_LICENSE_EXCEPTION, CLASS_SPDX_PACKAGE, CLASS_SPDX_REFERENCE_TYPE, CLASS_SPDX_REVIEW, CLASS_SPDX_SIMPLE_LICENSE_INFO, CLASS_SPDX_SNIPPET, CLASS_SPDX_VERIFICATIONCODE, CLASS_WITH_EXCEPTION_OPERATOR, CREATOR_PREFIX_ORGANIZATION, CREATOR_PREFIX_PERSON, CREATOR_PREFIX_TOOL, DOAP_NAMESPACE, EXTERNAL_DOC_REF_PATTERN, EXTERNAL_DOC_REF_PRENUM, EXTERNAL_ELEMENT_REF_PATTERN, FILE_TYPE_ARCHIVE, FILE_TYPE_BINARY, FILE_TYPE_OTHER, FILE_TYPE_SOURCE, LICENSE_ID_PATTERN, LICENSE_ID_PATTERN_NUMERIC, LICENSEXML_ATTRIBUTE_ALT_MATCH, LICENSEXML_ATTRIBUTE_ALT_NAME, LICENSEXML_ATTRIBUTE_DEPRECATED, LICENSEXML_ATTRIBUTE_DEPRECATED_VERSION, LICENSEXML_ATTRIBUTE_FSF_LIBRE, LICENSEXML_ATTRIBUTE_ID, LICENSEXML_ATTRIBUTE_LIST_VERSION_ADDED, LICENSEXML_ATTRIBUTE_NAME, LICENSEXML_ATTRIBUTE_OSI_APPROVED, LICENSEXML_ELEMENT_ALT, LICENSEXML_ELEMENT_BREAK, LICENSEXML_ELEMENT_BULLET, LICENSEXML_ELEMENT_COPYRIGHT_TEXT, LICENSEXML_ELEMENT_CROSS_REF, LICENSEXML_ELEMENT_CROSS_REFS, LICENSEXML_ELEMENT_EXCEPTION, LICENSEXML_ELEMENT_ITEM, LICENSEXML_ELEMENT_LICENSE, LICENSEXML_ELEMENT_LICENSE_COLLECTION, LICENSEXML_ELEMENT_LIST, LICENSEXML_ELEMENT_NOTES, LICENSEXML_ELEMENT_OPTIONAL, LICENSEXML_ELEMENT_PARAGRAPH, LICENSEXML_ELEMENT_STANDARD_LICENSE_HEADER, LICENSEXML_ELEMENT_TEXT, LICENSEXML_ELEMENT_TITLE_TEXT, LICENSEXML_URI, NOASSERTION_VALUE, NON_STD_LICENSE_ID_PRENUM, NONE_VALUE, OWL_NAMESPACE, PROP_ANNOTATION, PROP_ANNOTATION_DATE, PROP_ANNOTATION_TYPE, PROP_ANNOTATOR, PROP_CHECKSUM_ALGORITHM, PROP_CHECKSUM_ALGORITHM_SHA1, PROP_CHECKSUM_VALUE, PROP_COPYRIGHT_TEXT, PROP_CREATION_CREATED, PROP_CREATION_CREATOR, PROP_EXAMPLE, PROP_EXCEPTION_TEMPLATE, PROP_EXCEPTION_TEXT, PROP_EXTERNAL_DOC_CHECKSUM, PROP_EXTERNAL_DOC_ID, PROP_EXTERNAL_REF, PROP_EXTERNAL_SPDX_DOCUMENT, PROP_EXTRACTED_TEXT, PROP_FILE_ARTIFACTOF, PROP_FILE_CHECKSUM, PROP_FILE_CONTRIBUTOR, PROP_FILE_COPYRIGHT, PROP_FILE_FILE_DEPENDENCY, PROP_FILE_LIC_COMMENTS, PROP_FILE_LICENSE, PROP_FILE_NAME, PROP_FILE_NOTICE, PROP_FILE_SEEN_LICENSE, PROP_FILE_TYPE, PROP_FILE_TYPE_ARCHIVE, PROP_FILE_TYPE_BINARY, PROP_FILE_TYPE_OTHER, PROP_FILE_TYPE_SOURCE, PROP_LIC_COMMENTS, PROP_LIC_ID_DEPRECATED, PROP_LICENSE_CONCLUDED, PROP_LICENSE_DECLARED, PROP_LICENSE_EXCEPTION, PROP_LICENSE_EXCEPTION_ID, PROP_LICENSE_ID, PROP_LICENSE_INFO_FROM_SNIPPETS, PROP_LICENSE_LIST_VERSION, PROP_LICENSE_NAME, PROP_LICENSE_SET_MEMEBER, PROP_LICENSE_TEXT, PROP_NAME, PROP_OWL_SAME_AS, PROP_PACKAGE_CHECKSUM, PROP_PACKAGE_CONCLUDED_LICENSE, PROP_PACKAGE_DECLARED_COPYRIGHT, PROP_PACKAGE_DECLARED_LICENSE, PROP_PACKAGE_DECLARED_NAME, PROP_PACKAGE_DESCRIPTION, PROP_PACKAGE_DOWNLOAD_URL, PROP_PACKAGE_FILE, PROP_PACKAGE_FILE_NAME, PROP_PACKAGE_FILES_ANALYZED, PROP_PACKAGE_LICENSE_COMMENT, PROP_PACKAGE_LICENSE_INFO_FROM_FILES, PROP_PACKAGE_ORIGINATOR, PROP_PACKAGE_SHORT_DESC, PROP_PACKAGE_SOURCE_INFO, PROP_PACKAGE_SUPPLIER, PROP_PACKAGE_VERIFICATION_CODE, PROP_PACKAGE_VERSION_INFO, PROP_POINTER_END_POINTER, PROP_POINTER_LINE_NUMBER, PROP_POINTER_OFFSET, PROP_POINTER_REFERENCE, PROP_POINTER_START_POINTER, PROP_PROJECT_HOMEPAGE, PROP_PROJECT_NAME, PROP_REFERENCE_CATEGORY, PROP_REFERENCE_LOCATOR, PROP_REFERENCE_TYPE, PROP_RELATED_SPDX_ELEMENT, PROP_RELATIONSHIP, PROP_RELATIONSHIP_TYPE, PROP_REVIEW_DATE, PROP_REVIEW_REVIEWER, PROP_SNIPPET_FROM_FILE, PROP_SNIPPET_RANGE, PROP_SPDX_CREATION_INFO, PROP_SPDX_DATA_LICENSE, PROP_SPDX_EXTERNAL_DOC_REF, PROP_SPDX_EXTRACTED_LICENSES, PROP_SPDX_FILE_REFERENCE, PROP_SPDX_PACKAGE, PROP_SPDX_REVIEWED_BY, PROP_SPDX_VERSION, PROP_STD_LICENSE_FSF_LIBRE, PROP_STD_LICENSE_HEADER_TEMPLATE, PROP_STD_LICENSE_HEADER_VERSION_1, PROP_STD_LICENSE_NAME, PROP_STD_LICENSE_NAME_VERSION_1, PROP_STD_LICENSE_NOTES_VERSION_1, PROP_STD_LICENSE_NOTICE, PROP_STD_LICENSE_OSI_APPROVED, PROP_STD_LICENSE_OSI_APPROVED_VERSION_1, PROP_STD_LICENSE_TEMPLATE, PROP_STD_LICENSE_TEMPLATE_VERSION_1, PROP_STD_LICENSE_URL_VERSION_1, PROP_VALUE_NOASSERTION, PROP_VALUE_NONE, PROP_VERIFICATIONCODE_IGNORED_FILES, PROP_VERIFICATIONCODE_VALUE, RDF_NAMESPACE, RDF_POINTER_NAMESPACE, RDF_PROP_RESOURCE, RDF_PROP_TYPE, RDFS_NAMESPACE, RDFS_PROP_COMMENT, RDFS_PROP_LABEL, RDFS_PROP_SEE_ALSO, SPDX_DATA_LICENSE_ID, SPDX_DATA_LICENSE_ID_VERSION_1_0, SPDX_DATE_FORMAT, SPDX_DOCUMENT_ID, SPDX_ELEMENT_REF_PATTERN, SPDX_ELEMENT_REF_PRENUM, SPDX_LISTED_REFERENCE_TYPES_PREFIX, SPDX_NAMESPACE, SPDX_VERSION_PATTERN, STANDARD_LICENSE_URL, TERM_LICENSE_NOASSERTION, TERM_LICENSE_NONE, URI_VALUE_NOASSERTION, URI_VALUE_NONE| Constructor and Description |
|---|
SPDXDocument(org.apache.jena.rdf.model.Model model)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addCheckNodeObject(org.apache.jena.graph.Node node,
IRdfModel rdfModelObject)
Deprecated.
Add a node object to the container.
|
void |
addNewExtractedLicenseInfo(ExtractedLicenseInfo license)
Deprecated.
Adds the license as a new ExtractedLicenseInfo
|
ExtractedLicenseInfo |
addNewExtractedLicenseInfo(String licenseText)
Deprecated.
Adds a new non-standard license containing the text provided.
|
void |
addSpdxElementRef(String elementRef)
Deprecated.
Notifies the model container that a new element ref is in use.
|
org.apache.jena.rdf.model.Resource |
createResource(org.apache.jena.rdf.model.Resource duplicate,
String uri,
org.apache.jena.rdf.model.Resource type,
IRdfModel modelObject)
Deprecated.
Create a resource in the model
|
void |
createSpdxAnalysis(String uri)
Deprecated.
Creates a new empty SPDX Document with the current SPDX document version.
|
void |
createSpdxAnalysis(String uri,
String spdxVersion)
Deprecated.
Creates a new empty SPDX Document.
|
void |
createSpdxPackage()
Deprecated.
|
SPDXDocument.SPDXPackage |
createSpdxPackage(String uri)
Deprecated.
Creates an empty SPDX package
|
String |
documentNamespaceToId(String externalNamespace)
Deprecated.
Translate an external document namespace URI to an external document ID
|
String |
externalDocumentIdToNamespace(String docId)
Deprecated.
Translate an external document ID to the external document's namespace
|
protected boolean |
extractedLicenseExists(String id)
Deprecated.
|
static String |
formNonStandardLicenseID(int idNum)
Deprecated.
|
static String |
formSpdxElementRef(int refNum)
Deprecated.
|
String |
getCreated()
Deprecated.
|
String |
getCreatorComment()
Deprecated.
|
SPDXCreatorInformation |
getCreatorInfo()
Deprecated.
|
String[] |
getCreators()
Deprecated.
|
SpdxListedLicense |
getDataLicense()
Deprecated.
|
protected SPDXDocument |
getDocument()
Deprecated.
|
String |
getDocumentComment()
Deprecated.
|
String |
getDocumentNamespace()
Deprecated.
|
static int |
getElementRefNumber(String elementReference)
Deprecated.
Parses out the reference number for an SPDX element reference
|
ExtractedLicenseInfo[] |
getExtractedLicenseInfos()
Deprecated.
|
SPDXFile[] |
getFileReferences()
Deprecated.
|
int |
getLicenseRefNum(String licenseID)
Deprecated.
Parses a license ID and return the integer representing the ID number (e.g.
|
org.apache.jena.rdf.model.Model |
getModel()
Deprecated.
|
String |
getNextLicenseRef()
Deprecated.
|
String |
getNextSpdxElementRef()
Deprecated.
|
SPDXReview[] |
getReviewers()
Deprecated.
|
SPDXDocument |
getSpdxDocument()
Deprecated.
|
String |
getSpdxDocUri()
Deprecated.
|
SPDXDocument.SPDXPackage |
getSpdxPackage()
Deprecated.
|
String |
getSpdxVersion()
Deprecated.
|
protected void |
initializeNextLicenseRef()
Deprecated.
Initialize the next license reference by scanning all of the existing non-standard licenses
|
protected void |
initializeNextLicenseRef(ExtractedLicenseInfo[] existingLicenses)
Deprecated.
|
void |
setCreationInfo(SPDXCreatorInformation creator)
Deprecated.
|
void |
setDataLicense(SpdxListedLicense dataLicense)
Deprecated.
|
void |
setDocumentComment(String comment)
Deprecated.
|
void |
setExtractedLicenseInfos(ExtractedLicenseInfo[] nonStandardLicenses)
Deprecated.
Resets all ExtractedLicenseInfos to nonStandardLicenses.
|
void |
setModel(org.apache.jena.rdf.model.Model model)
Deprecated.
|
void |
setReviewers(SPDXReview[] reviewers)
Deprecated.
|
void |
setSpdxVersion(String spdxVersion)
Deprecated.
|
boolean |
spdxElementRefExists(String elementRef)
Deprecated.
Returns true if the element reference already exists in the model
|
List<String> |
verify()
Deprecated.
Verifies the spdx document
|
String |
verifySpdxVersion(String spdxVersion)
Deprecated.
|
public static final String POINT_EIGHT_SPDX_VERSION
public static final String POINT_NINE_SPDX_VERSION
public static final String ONE_DOT_ZERO_SPDX_VERSION
public static final String ONE_DOT_ONE_SPDX_VERSION
public static final String ONE_DOT_TWO_SPDX_VERSION
public static final String TWO_DOT_ZERO_DOT_ZERO_VERSION
public static final String CURRENT_SPDX_VERSION
public static final String CURRENT_IMPLEMENTATION_VERSION
public SPDXDocument(org.apache.jena.rdf.model.Model model)
throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionpublic static int getElementRefNumber(String elementReference)
elementReference - Element reference to parseprotected void initializeNextLicenseRef()
throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionprotected void initializeNextLicenseRef(ExtractedLicenseInfo[] existingLicenses) throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionpublic int getLicenseRefNum(String licenseID) throws NonNumericLicenseIdException
licenseID - NonNumericLicenseIdException - If the non-standard license ID is not of the form LicenseRef-NNpublic static String formNonStandardLicenseID(int idNum)
public List<String> verify()
public String getSpdxVersion() throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionpublic void setDocumentComment(String comment) throws InvalidSPDXAnalysisException
comment - the documentComment to setInvalidSPDXAnalysisExceptionpublic String getDocumentComment() throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionpublic void setSpdxVersion(String spdxVersion) throws InvalidSPDXAnalysisException
spdxVersion - the spdxVersion to setInvalidSPDXAnalysisExceptionpublic SpdxListedLicense getDataLicense() throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionpublic void setDataLicense(SpdxListedLicense dataLicense) throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionpublic SPDXFile[] getFileReferences() throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisException@Deprecated public String[] getCreators() throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionpublic SPDXCreatorInformation getCreatorInfo() throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionpublic void setCreationInfo(SPDXCreatorInformation creator) throws InvalidSPDXAnalysisException
creators - the creators of the analysisInvalidSPDXDocExceptionInvalidSPDXAnalysisException@Deprecated public String getCreatorComment() throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionpublic SPDXReview[] getReviewers() throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionpublic void setReviewers(SPDXReview[] reviewers) throws InvalidSPDXAnalysisException
reviewers - the reviewers to setInvalidSPDXAnalysisException@Deprecated public String getCreated() throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionpublic SPDXDocument.SPDXPackage getSpdxPackage() throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionpublic SPDXDocument.SPDXPackage createSpdxPackage(String uri) throws InvalidSPDXAnalysisException
uri - Unique URI representing the SPDX packageInvalidSPDXAnalysisExceptionpublic void createSpdxPackage()
throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionpublic ExtractedLicenseInfo[] getExtractedLicenseInfos() throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionpublic void setExtractedLicenseInfos(ExtractedLicenseInfo[] nonStandardLicenses) throws InvalidSPDXAnalysisException
nonStandardLicenses - the nonStandardLicenses to setInvalidSPDXAnalysisExceptionpublic ExtractedLicenseInfo addNewExtractedLicenseInfo(String licenseText) throws InvalidSPDXAnalysisException
licenseText - InvalidSPDXAnalysisExceptionpublic void addNewExtractedLicenseInfo(ExtractedLicenseInfo license) throws InvalidSPDXAnalysisException
license - InvalidSPDXAnalysisExceptionprotected boolean extractedLicenseExists(String id) throws InvalidSPDXAnalysisException
id - InvalidSPDXAnalysisExceptionpublic String getNextLicenseRef()
public String getNextSpdxElementRef()
getNextSpdxElementRef in interface IModelContainerpublic static String formSpdxElementRef(int refNum)
public String getSpdxDocUri()
public org.apache.jena.rdf.model.Model getModel()
getModel in interface IModelContainerpublic void setModel(org.apache.jena.rdf.model.Model model)
throws InvalidSPDXAnalysisException
model - the model to setInvalidSPDXAnalysisExceptionpublic void createSpdxAnalysis(String uri) throws InvalidSPDXAnalysisException
uri - URI for the SPDX DocumentInvalidSPDXAnalysisExceptionpublic void createSpdxAnalysis(String uri, String spdxVersion) throws InvalidSPDXAnalysisException
uri - URI for the SPDX DocumentspdxVersion - The version of SPDX analysis to create (impacts the data license for some versions)InvalidSPDXAnalysisExceptionpublic String getDocumentNamespace()
getDocumentNamespace in interface IModelContainerprotected SPDXDocument getDocument()
public SPDXDocument getSpdxDocument()
public boolean spdxElementRefExists(String elementRef)
IModelContainerspdxElementRefExists in interface IModelContainerpublic void addSpdxElementRef(String elementRef) throws InvalidSPDXAnalysisException
IModelContaineraddSpdxElementRef in interface IModelContainerInvalidSPDXAnalysisExceptionpublic String documentNamespaceToId(String externalNamespace)
IModelContainerdocumentNamespaceToId in interface IModelContainerpublic String externalDocumentIdToNamespace(String docId)
IModelContainerexternalDocumentIdToNamespace in interface IModelContainerpublic org.apache.jena.rdf.model.Resource createResource(org.apache.jena.rdf.model.Resource duplicate,
String uri,
org.apache.jena.rdf.model.Resource type,
IRdfModel modelObject)
IModelContainercreateResource in interface IModelContainerduplicate - A duplicate resource who's node and resource should be returneduri - If not null, the URI for the resource - if null, an anonomous resource will be usedtype - Type of the resourcemodelObject - the object representing this nodepublic boolean addCheckNodeObject(org.apache.jena.graph.Node node,
IRdfModel rdfModelObject)
IModelContaineraddCheckNodeObject in interface IModelContainerCopyright © 2018 Linux Foundation. All Rights Reserved.