|
|
@ -9,7 +9,7 @@ from enum import Enum |
|
|
|
# should be built. |
|
|
|
# should be built. |
|
|
|
class DocumentConfig: |
|
|
|
class DocumentConfig: |
|
|
|
def __init__(self): |
|
|
|
def __init__(self): |
|
|
|
super(DocumentConfig, self).__init__() |
|
|
|
super().__init__() |
|
|
|
|
|
|
|
|
|
|
|
# name of document |
|
|
|
# name of document |
|
|
|
self.name = "" |
|
|
|
self.name = "" |
|
|
@ -27,7 +27,7 @@ class DocumentConfig: |
|
|
|
class Document: |
|
|
|
class Document: |
|
|
|
# initialize with a DocumentConfig |
|
|
|
# initialize with a DocumentConfig |
|
|
|
def __init__(self, cfg): |
|
|
|
def __init__(self, cfg): |
|
|
|
super(Document, self).__init__() |
|
|
|
super().__init__() |
|
|
|
|
|
|
|
|
|
|
|
# configuration - DocumentConfig |
|
|
|
# configuration - DocumentConfig |
|
|
|
self.cfg = cfg |
|
|
|
self.cfg = cfg |
|
|
@ -63,7 +63,7 @@ class Document: |
|
|
|
# be built. |
|
|
|
# be built. |
|
|
|
class PackageConfig: |
|
|
|
class PackageConfig: |
|
|
|
def __init__(self): |
|
|
|
def __init__(self): |
|
|
|
super(PackageConfig, self).__init__() |
|
|
|
super().__init__() |
|
|
|
|
|
|
|
|
|
|
|
# package name |
|
|
|
# package name |
|
|
|
self.name = "" |
|
|
|
self.name = "" |
|
|
@ -106,7 +106,7 @@ class Package: |
|
|
|
# 1) PackageConfig |
|
|
|
# 1) PackageConfig |
|
|
|
# 2) the Document that owns this Package |
|
|
|
# 2) the Document that owns this Package |
|
|
|
def __init__(self, cfg, doc): |
|
|
|
def __init__(self, cfg, doc): |
|
|
|
super(Package, self).__init__() |
|
|
|
super().__init__() |
|
|
|
|
|
|
|
|
|
|
|
# configuration - PackageConfig |
|
|
|
# configuration - PackageConfig |
|
|
|
self.cfg = cfg |
|
|
|
self.cfg = cfg |
|
|
@ -153,7 +153,7 @@ class RelationshipDataElementType(Enum): |
|
|
|
# Relationship after we have organized the SPDX Package and File data. |
|
|
|
# Relationship after we have organized the SPDX Package and File data. |
|
|
|
class RelationshipData: |
|
|
|
class RelationshipData: |
|
|
|
def __init__(self): |
|
|
|
def __init__(self): |
|
|
|
super(RelationshipData, self).__init__() |
|
|
|
super().__init__() |
|
|
|
|
|
|
|
|
|
|
|
# for the "owner" element (e.g., the left side of the Relationship), |
|
|
|
# for the "owner" element (e.g., the left side of the Relationship), |
|
|
|
# is it a filename or a target name (e.g., a Package in the build doc) |
|
|
|
# is it a filename or a target name (e.g., a Package in the build doc) |
|
|
@ -191,7 +191,7 @@ class RelationshipData: |
|
|
|
# Document's context. |
|
|
|
# Document's context. |
|
|
|
class Relationship: |
|
|
|
class Relationship: |
|
|
|
def __init__(self): |
|
|
|
def __init__(self): |
|
|
|
super(Relationship, self).__init__() |
|
|
|
super().__init__() |
|
|
|
|
|
|
|
|
|
|
|
# SPDX ID for left side of relationship |
|
|
|
# SPDX ID for left side of relationship |
|
|
|
# including "SPDXRef-" as well as "DocumentRef-" if needed |
|
|
|
# including "SPDXRef-" as well as "DocumentRef-" if needed |
|
|
@ -213,7 +213,7 @@ class File: |
|
|
|
# 1) Document containing this File |
|
|
|
# 1) Document containing this File |
|
|
|
# 2) Package containing this File |
|
|
|
# 2) Package containing this File |
|
|
|
def __init__(self, doc, pkg): |
|
|
|
def __init__(self, doc, pkg): |
|
|
|
super(File, self).__init__() |
|
|
|
super().__init__() |
|
|
|
|
|
|
|
|
|
|
|
# absolute path to this file on disk |
|
|
|
# absolute path to this file on disk |
|
|
|
self.abspath = "" |
|
|
|
self.abspath = "" |
|
|
|