diff --git a/data/SPDXJsonExample.json b/data/SPDXJsonExample.json
index 6e456d602..6e6cc2613 100644
--- a/data/SPDXJsonExample.json
+++ b/data/SPDXJsonExample.json
@@ -33,7 +33,7 @@
}
],
"fileTypes": [
- "fileType_archive"
+ "ARCHIVE"
],
"SPDXID": "SPDXRef-File1"
}
@@ -54,7 +54,7 @@
}
],
"fileTypes": [
- "fileType_source"
+ "SOURCE"
],
"SPDXID": "SPDXRef-File2"
}
@@ -187,7 +187,7 @@
"name": "from linux kernel",
"copyrightText": "Copyright 2008-2010 John Smith",
"licenseConcluded": "Apache-2.0",
- "licenseInfoFromSnippet": [
+ "licenseInfoInSnippet": [
"Apache-2.0"
],
"licenseComments": "The concluded license was taken from package xyz, from which the snippet was copied into the current file. The concluded license information was found in the COPYING.txt file in package xyz.",
diff --git a/data/SPDXXmlExample.xml b/data/SPDXXmlExample.xml
index 9707b9832..c00eefba5 100644
--- a/data/SPDXXmlExample.xml
+++ b/data/SPDXXmlExample.xml
@@ -240,7 +240,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from linux kernel
Copyright 2008-2010 John Smith
Apache-2.0
- Apache-2.0
+ Apache-2.0
The concluded license was taken from package xyz, from which the snippet was copied into the current file. The concluded license information was found in the COPYING.txt file in package xyz.
SPDXRef-Snippet
SPDXRef-DoapSource
diff --git a/data/SPDXYamlExample.yaml b/data/SPDXYamlExample.yaml
index e8a42c8de..203b283b3 100644
--- a/data/SPDXYamlExample.yaml
+++ b/data/SPDXYamlExample.yaml
@@ -231,7 +231,7 @@ Document:
the snippet was copied into the current file. The concluded license information
was found in the COPYING.txt file in package xyz.
licenseConcluded: Apache-2.0
- licenseInfoFromSnippet:
+ licenseInfoInSnippet:
- Apache-2.0
name: from linux kernel
spdxVersion: SPDX-2.1
diff --git a/spdx/annotation.py b/spdx/annotation.py
index d9cd32675..e720751dd 100644
--- a/spdx/annotation.py
+++ b/spdx/annotation.py
@@ -98,5 +98,5 @@ def validate_annotation_type(self, messages):
messages.append("Annotation missing annotation type.")
def validate_spdx_id(self, messages):
- if self.spdx_id is None:
+ if self.spdx_id is not None and type(self.spdx_id) != str :
messages.append("Annotation missing SPDX Identifier Reference.")
diff --git a/spdx/checksum.py b/spdx/checksum.py
index d770f5a84..229795ba7 100644
--- a/spdx/checksum.py
+++ b/spdx/checksum.py
@@ -9,11 +9,46 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+"""
+list of checksum algorithms from SPDX spec part 8.4.1 "Description".
+SHA1, SHA224, SHA256, SHA384, SHA512, SHA3-256, SHA3-384, SHA3-512,
+BLAKE2b-256, BLAKE2b-384, BLAKE2b-512, BLAKE3,
+MD2, MD4, MD5, MD6, ADLER32
+"""
+CHECKSUM_ALGORITHM_TO_XML_DICT = {
+ 'ADLER32': 'checksumAlgorithm_adler32',
+ 'BLAKE2b-256': 'checksumAlgorithm_blake2b-256',
+ 'BLAKE2b-384': 'checksumAlgorithm_blake2b-384',
+ 'BLAKE2b-512': 'checksumAlgorithm_blake2b-512',
+ 'BLAKE3': 'checksumAlgorithm_blake3',
+ 'MD2': 'checksumAlgorithm_md2',
+ 'MD4': 'checksumAlgorithm_md4',
+ 'MD5': 'checksumAlgorithm_md5',
+ 'MD6': 'checksumAlgorithm_md6',
+ 'SHA1': 'checksumAlgorithm_sha1',
+ 'SHA224': 'checksumAlgorithm_sha224',
+ 'SHA256': 'checksumAlgorithm_sha256',
+ 'SHA384': 'checksumAlgorithm_sha384',
+ 'SHA512': 'checksumAlgorithm_sha512',
+ 'SHA3-256': 'checksumAlgorithm_sha3-256',
+ 'SHA3-384': 'checksumAlgorithm_sha3-384',
+ 'SHA3-512': 'checksumAlgorithm_sha3-512',
+}
+CHECKSUM_ALGORITHMS = [k for k in CHECKSUM_ALGORITHM_TO_XML_DICT]
+CHECKSUM_ALGORITHM_FROM_XML_DICT = {}
+for k, v in CHECKSUM_ALGORITHM_TO_XML_DICT.items():
+ CHECKSUM_ALGORITHM_FROM_XML_DICT[v] = k
+
+# regex parses algorithm:value from string
+CHECKSUM_REGEX = '({}):\\s*([a-f0-9]*)'.format('|'.join(CHECKSUM_ALGORITHMS))
+
class Algorithm(object):
"""Generic checksum algorithm."""
def __init__(self, identifier, value):
+ if identifier not in CHECKSUM_ALGORITHMS:
+ raise ValueError('checksum algorithm {} is not supported'.format(identifier))
self.identifier = identifier
self.value = value
diff --git a/spdx/cli_tools/parser.py b/spdx/cli_tools/parser.py
index 182ca2db0..0e19a3a17 100755
--- a/spdx/cli_tools/parser.py
+++ b/spdx/cli_tools/parser.py
@@ -50,8 +50,6 @@ def main(file, force):
"Package Download Location: {0}".format(doc.package.download_location)
)
print("Package Homepage: {0}".format(doc.package.homepage))
- if doc.package.check_sum:
- print("Package Checksum: {0}".format(doc.package.check_sum.value))
print("Package Attribution Text: {0}".format(doc.package.attribution_text))
print("Package verification code: {0}".format(doc.package.verif_code))
print(
diff --git a/spdx/creationinfo.py b/spdx/creationinfo.py
index 1545a8ab7..54a99e9d3 100644
--- a/spdx/creationinfo.py
+++ b/spdx/creationinfo.py
@@ -44,7 +44,7 @@ class Organization(Creator):
- email: Org's email address. Optional. Type: str.
"""
- def __init__(self, name, email):
+ def __init__(self, name, email=None):
super(Organization, self).__init__(name)
self.email = email
@@ -80,7 +80,7 @@ class Person(Creator):
- email: person's email address. Optional. Type: str.
"""
- def __init__(self, name, email):
+ def __init__(self, name, email=None):
super(Person, self).__init__(name)
self.email = email
diff --git a/spdx/document.py b/spdx/document.py
index e0232d7cc..12acff17d 100644
--- a/spdx/document.py
+++ b/spdx/document.py
@@ -316,6 +316,8 @@ def __init__(
self.packages = []
if package is not None:
self.packages.append(package)
+ self.files = []
+ self.describes = []
self.extracted_licenses = []
self.reviews = []
self.annotations = []
@@ -350,8 +352,8 @@ def add_package(self, package):
@property
def package(self):
- warnings.warn('document.package and document.files are deprecated; '
- 'use document.packages instead',
+ warnings.warn('document.package and document.file are deprecated; '
+ 'use document.packages or document.files instead',
DeprecationWarning)
if len(self.packages) == 0:
return None
@@ -368,13 +370,14 @@ def package(self, value):
else:
self.packages[0] = value
- @property
- def files(self):
- return self.package.files
+ def get_files(self):
+ return self.files
+
+ def set_files(self, value):
+ self.files = value
- @files.setter
- def files(self, value):
- self.package.files = value
+ def add_file(self, fil):
+ self.files.append(fil)
@property
def has_comment(self):
diff --git a/spdx/file.py b/spdx/file.py
index f35a7e2aa..d6a6ea98b 100644
--- a/spdx/file.py
+++ b/spdx/file.py
@@ -8,7 +8,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
+import enum
from functools import total_ordering
import hashlib
@@ -17,7 +17,7 @@
from spdx import utils
-class FileType(object):
+class FileType(enum.IntEnum):
SOURCE = 1
BINARY = 2
ARCHIVE = 3
@@ -26,9 +26,21 @@ class FileType(object):
AUDIO = 6
IMAGE = 7
TEXT = 8
- VIDEO = 9
DOCUMENTATION = 9
SPDX = 10
+ VIDEO = 11
+
+ @classmethod
+ def by_name(cls, name):
+ return FileType.__getitem__(name)
+
+
+FILE_TYPE_TO_XML_DICT = {}
+FILE_TYPE_FROM_XML_DICT = {}
+for ft in list(FileType):
+ xml_name = 'fileType_{}'.format(ft.name.lower())
+ FILE_TYPE_TO_XML_DICT[ft] = xml_name
+ FILE_TYPE_FROM_XML_DICT[xml_name] = ft
@total_ordering
@@ -40,9 +52,8 @@ class File(object):
- spdx_id: Uniquely identify any element in an SPDX document which may be
referenced by other elements. Mandatory, one. Type: str.
- comment: File comment str, Optional zero or one.
- - type: one of FileType.SOURCE, FileType.BINARY, FileType.ARCHIVE
- and FileType.OTHER, optional zero or one.
- - chk_sum: SHA1, Mandatory one.
+ - file_types: list of file types. cardinality 0..#FILE_TYPES
+ - checksums: list of checksums, there must be a SHA1 hash, at least.
- conc_lics: Mandatory one. document.License or utils.NoAssert or utils.SPDXNone.
- licenses_in_file: list of licenses found in file, mandatory one or more.
document.License or utils.SPDXNone or utils.NoAssert.
@@ -58,12 +69,12 @@ class File(object):
-attribution_text: optional string.
"""
- def __init__(self, name, spdx_id=None, chk_sum=None):
+ def __init__(self, name, spdx_id=None):
self.name = name
self.spdx_id = spdx_id
self.comment = None
- self.type = None
- self.chk_sum = chk_sum
+ self.file_types = []
+ self.checksums = {}
self.conc_lics = None
self.licenses_in_file = []
self.license_comment = None
@@ -75,6 +86,7 @@ def __init__(self, name, spdx_id=None, chk_sum=None):
self.artifact_of_project_name = []
self.artifact_of_project_home = []
self.artifact_of_project_uri = []
+ self.annotations = []
def __eq__(self, other):
return isinstance(other, File) and self.name == other.name
@@ -82,6 +94,26 @@ def __eq__(self, other):
def __lt__(self, other):
return self.name < other.name
+ @property
+ def chk_sum(self):
+ """
+ Backwards compatibility, return the SHA1 checksum.
+ note that this is deprecated, use get_checksum
+ """
+ return self.get_checksum('SHA1')
+
+ @chk_sum.setter
+ def chk_sum(self, value):
+ """
+ backwards compatability, deprecated, please use set_checksum
+ """
+ if isinstance(value, str):
+ self.set_checksum(checksum.Algorithm('SHA1', value))
+ elif isinstance(value, checksum.Algorithm):
+ self.set_checksum(value)
+ else:
+ raise ValueError('cannot call chk_sum with value of type {}.'.format(type(value)))
+
def add_lics(self, lics):
self.licenses_in_file.append(lics)
@@ -106,7 +138,6 @@ def validate(self, messages):
"""
messages.push_context(self.name)
self.validate_concluded_license(messages)
- self.validate_type(messages)
self.validate_checksum(messages)
self.validate_licenses_in_file(messages)
self.validate_copyright(messages)
@@ -162,44 +193,36 @@ def validate_concluded_license(self, messages):
return messages
- def validate_type(self, messages):
- if self.type not in [
- None,
- FileType.SOURCE,
- FileType.OTHER,
- FileType.BINARY,
- FileType.ARCHIVE,
- ]:
- messages.append(
- "File type must be one of the constants defined in "
- "class spdx.file.FileType"
- )
-
- return messages
-
def validate_checksum(self, messages):
- if not isinstance(self.chk_sum, checksum.Algorithm):
- messages.append(
- "File checksum must be instance of spdx.checksum.Algorithm"
- )
- else:
- if not self.chk_sum.identifier == "SHA1":
- messages.append("File checksum algorithm must be SHA1")
-
+ if self.get_checksum() is None:
+ messages.append("At least one file checksum algorithm must be SHA1")
return messages
- def calc_chksum(self):
+ def calculate_checksum(self, hash_algorithm='SHA1'):
+ if hash_algorithm not in checksum.CHECKSUM_ALGORITHMS:
+ raise ValueError('checksum algorithm {} is not supported'.format(hash_algorithm))
BUFFER_SIZE = 65536
- file_sha1 = hashlib.sha1()
+ file_hash = hashlib.new(hash_algorithm.lower())
with open(self.name, "rb") as file_handle:
while True:
data = file_handle.read(BUFFER_SIZE)
if not data:
break
- file_sha1.update(data)
+ file_hash.update(data)
+
+ return file_hash.hexdigest()
+
+ def get_checksum(self, hash_algorithm='SHA1'):
+ if hash_algorithm not in checksum.CHECKSUM_ALGORITHMS:
+ raise ValueError('checksum algorithm {} is not supported'.format(hash_algorithm))
+ return self.checksums.get(hash_algorithm)
- return file_sha1.hexdigest()
+ def set_checksum(self, chk_sum):
+ if isinstance(chk_sum, checksum.Algorithm):
+ if chk_sum.identifier not in checksum.CHECKSUM_ALGORITHMS:
+ raise ValueError('checksum algorithm {} is not supported'.format(chk_sum.identifier))
+ self.checksums[chk_sum.identifier] = chk_sum.value
def has_optional_field(self, field):
return getattr(self, field, None) is not None
diff --git a/spdx/package.py b/spdx/package.py
index 32279d2d5..e2a40097c 100644
--- a/spdx/package.py
+++ b/spdx/package.py
@@ -9,6 +9,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import enum
import hashlib
from functools import reduce
@@ -19,6 +20,38 @@
from spdx import utils
+class PackagePrimaryPurpose(enum.IntEnum):
+ APPLICATION = 1
+ FRAMEWORK = 2
+ LIBRARY = 3
+ CONTAINER = 4
+ OPERATINGSYSTEM = 5
+ DEVICE = 6
+ FIRMWARE = 7
+ SOURCE = 8
+ ARCHIVE = 9
+ FILE = 10
+ INSTALL = 11
+ OTHER = 12
+
+ @classmethod
+ def by_name(cls, lookup):
+ if lookup.lower() == 'operating-system':
+ lookup = 'operatingsystem'
+ return PackagePrimaryPurpose.__getitem__(lookup)
+
+
+PKG_PURPOSE_TO_XML_DICT = {}
+PKG_PURPOSE_FROM_XML_DICT = {}
+for ppp in list(PackagePrimaryPurpose):
+ name = ppp.name.lower()
+ if name == 'operatingsystem': # so this is a little weird.
+ name = 'operating-system'
+ xml_name = 'packagePurpose_{}'.format(ppp.name.lower())
+ PKG_PURPOSE_TO_XML_DICT[ppp] = xml_name
+ PKG_PURPOSE_FROM_XML_DICT[xml_name] = ppp
+
+
class Package(object):
"""
@@ -36,12 +69,12 @@ class Package(object):
been available for or subjected to analysis when creating the SPDX
document. If "false" indicates packages that represent metadata or URI
references to a project, product, artifact, distribution or a component.
- If set to "false", the package must not contain any files.
+ If set to "false", the package must not contain any has_files.
Optional, boolean.
- homepage: Optional, URL as string or NONE or NO_ASSERTION.
- verif_code: string. Mandatory if files_analyzed is True or None (omitted)
Must be None (omitted) if files_analyzed is False
- - check_sum: Optional , spdx.checksum.Algorithm.
+ - checksums: Optional, dict of values keyed by algorithm name
- source_info: Optional string.
- conc_lics: Mandatory spdx.document.License or spdx.utils.SPDXNone or
- spdx.utils.NoAssert.
@@ -55,7 +88,7 @@ class Package(object):
- description: Optional str.
- comment: Comments about the package being described, optional one.
Type: str
- - files: List of files in package, atleast one.
+ - has_files: List SPDXIDs of files in package, 0..n or missing
- verif_exc_files : list of file names excluded from verification code or None.
- ext_pkg_refs : External references referenced within the given package.
Optional, one or many. Type: ExternalPackageRef
@@ -82,7 +115,7 @@ def __init__(
self.files_analyzed = None
self.homepage = None
self.verif_code = None
- self.check_sum = None
+ self.checksums = {}
self.source_info = None
self.conc_lics = None
self.license_declared = None
@@ -93,18 +126,38 @@ def __init__(
self.description = None
self.comment = None
self.attribution_text = None
- self.files = []
+ self.has_files = []
self.verif_exc_files = []
- self.pkg_ext_refs = []
+ self.external_references = []
+ self.annotations = []
+ self.primary_purpose = []
+ self.built_date = None
+ self.release_date = None
+ self.valid_until_date = None
@property
- def are_files_analyzed(self):
- return self.files_analyzed is not False
- # as default None Value is False, previous line is simplification of
- # return self.files_analyzed or self.files_analyzed is None
+ def check_sum(self):
+ """
+ Backwards compatibility, return first checksum.
+ deprecated, use get_checksum()
+ """
+ return self.get_checksum('SHA1')
- def add_file(self, fil):
- self.files.append(fil)
+ @check_sum.setter
+ def check_sum(self, value):
+ if isinstance(value, str):
+ self.set_checksum(checksum.Algorithm('SHA1', value))
+ elif isinstance(value, checksum.Algorithm):
+ self.set_checksum(value)
+ else:
+ raise ValueError('cannot call check_sum with value of type {}.'.format(type(value)))
+
+ @property
+ def are_files_analyzed(self):
+ if self.files_analyzed is None:
+ return True # default is True
+ else:
+ return self.files_analyzed
def add_lics_from_file(self, lics):
self.licenses_from_files.append(lics)
@@ -112,8 +165,11 @@ def add_lics_from_file(self, lics):
def add_exc_file(self, filename):
self.verif_exc_files.append(filename)
- def add_pkg_ext_refs(self, pkg_ext_ref):
- self.pkg_ext_refs.append(pkg_ext_ref)
+ def add_external_references(self, pkg_ext_ref):
+ if isinstance(pkg_ext_ref, ExternalPackageRef):
+ self.external_references.append(pkg_ext_ref)
+ else:
+ raise ValueError('cannot add external reference of type {}'.format(type(pkg_ext_ref)))
def validate(self, messages):
"""
@@ -125,8 +181,8 @@ def validate(self, messages):
self.validate_checksum(messages)
self.validate_optional_str_fields(messages)
self.validate_mandatory_str_fields(messages)
- self.validate_files(messages)
- self.validate_pkg_ext_refs(messages)
+ self.validate_has_files(messages)
+ self.validate_external_references(messages)
self.validate_mandatory_fields(messages)
self.validate_optional_fields(messages)
messages.pop_context()
@@ -134,7 +190,7 @@ def validate(self, messages):
return messages
def validate_files_analyzed(self, messages):
- if self.files_analyzed not in [ True, False, None ]:
+ if self.files_analyzed not in [True, False, None]:
messages.append(
'Package files_analyzed must be True or False or None (omitted)'
)
@@ -164,8 +220,8 @@ def validate_optional_fields(self, messages):
return messages
- def validate_pkg_ext_refs(self, messages):
- for ref in self.pkg_ext_refs:
+ def validate_external_references(self, messages):
+ for ref in self.external_references:
if isinstance(ref, ExternalPackageRef):
messages = ref.validate(messages)
else:
@@ -211,16 +267,10 @@ def validate_mandatory_fields(self, messages):
return messages
- def validate_files(self, messages):
+ def validate_has_files(self, messages):
if self.are_files_analyzed:
- if not self.files:
- messages.append(
- "Package must have at least one file."
- )
- else:
- for f in self.files:
- messages = f.validate(messages)
-
+ if self.has_files is None or len(self.has_files) == 0:
+ messages.append('Package must have at least one has_file.')
return messages
def validate_optional_str_fields(self, messages):
@@ -245,7 +295,7 @@ def validate_mandatory_str_fields(self, messages):
"""Fields marked as Mandatory and of type string in class
docstring must be of a type that provides __str__ method.
"""
- FIELDS = ["name", "spdx_id", "download_location", "cr_text"]
+ FIELDS = ["name", "spdx_id", "download_location"]
if self.are_files_analyzed:
FIELDS = FIELDS + ["verif_code"]
self.validate_str_fields(FIELDS, False, messages)
@@ -266,37 +316,61 @@ def validate_str_fields(self, fields, optional, messages):
)
# Continue checking.
elif not optional:
+ pass
messages.append("Package {0} can not be None.".format(field_str))
return messages
def validate_checksum(self, messages):
- if self.check_sum is not None:
- if not isinstance(self.check_sum, checksum.Algorithm):
- messages.append(
- "Package checksum must be instance of spdx.checksum.Algorithm"
- )
-
+ if self.checksums is not None and len(self.checksums) > 0:
+ found_sha1 = False
+ for algo, value in self.checksums.items():
+ if algo not in checksum.CHECKSUM_ALGORITHMS:
+ messages.append('Unknown package checksum algorithm {}'.format(algo))
+ if algo == 'SHA1':
+ found_sha1 = True
+ if not found_sha1:
+ messages.append('At least one package checksum algorithm must be SHA1')
return messages
- def calc_verif_code(self):
- hashes = []
-
- for file_entry in self.files:
- if (
- isinstance(file_entry.chk_sum, checksum.Algorithm)
- and file_entry.chk_sum.identifier == "SHA1"
- ):
- sha1 = file_entry.chk_sum.value
- else:
- sha1 = file_entry.calc_chksum()
- hashes.append(sha1)
-
- hashes.sort()
-
- sha1 = hashlib.sha1()
- sha1.update("".join(hashes).encode("utf-8"))
- return sha1.hexdigest()
+ def calc_verif_code(self, document):
+ """
+ calculate the new package hash code using related document
+ """
+ list_of_file_hashes = []
+ hash_algo_name = "SHA1"
+ for spdx_id in self.has_files:
+ for f in document.files:
+ if f.spdx_id == spdx_id:
+ file_chksum = f.get_checksum(hash_algo_name)
+ if file_chksum is not None:
+ file_ch = file_chksum.value
+ else:
+ file_ch = f.calculate_checksum(hash_algo_name)
+ list_of_file_hashes.append(file_ch)
+
+ list_of_file_hashes.sort()
+
+ hasher = hashlib.new(hash_algo_name.lower())
+ hasher.update("".join(list_of_file_hashes).encode("utf-8"))
+ return hasher.hexdigest()
+
+ def get_checksum(self, hash_algorithm='SHA1'):
+ if hash_algorithm not in checksum.CHECKSUM_ALGORITHMS:
+ raise ValueError('checksum algorithm {} is not supported'.format(hash_algorithm))
+ value = self.checksums.get(hash_algorithm)
+ if value is not None:
+ return checksum.Algorithm(hash_algorithm, value)
+ else:
+ return None
+
+ def set_checksum(self, chk_sum):
+ if isinstance(chk_sum, checksum.Algorithm):
+ if chk_sum.identifier not in checksum.CHECKSUM_ALGORITHMS:
+ raise ValueError('checksum algorithm {} is not supported'.format(chk_sum.identifier))
+ self.checksums[chk_sum.identifier] = chk_sum.value
+ else:
+ raise ValueError('unknown chk_sum object type {}'.format(type(chk_sum)))
def has_optional_field(self, field):
return getattr(self, field, None) is not None
diff --git a/spdx/parsers/jsonyamlxml.py b/spdx/parsers/jsonyamlxml.py
index b4f254240..cc342623e 100644
--- a/spdx/parsers/jsonyamlxml.py
+++ b/spdx/parsers/jsonyamlxml.py
@@ -9,6 +9,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+from spdx.annotation import Annotation
from spdx import document
from spdx.document import LicenseConjunction
from spdx.document import LicenseDisjunction
@@ -22,10 +23,22 @@
ERROR_MESSAGES = rdf.ERROR_MESSAGES
+def dict_to_annotation(ad):
+ annotator = ad.get('annotator')
+ spdx_id = ad.get('spdx_id')
+ annotation_date = ad.get('annotationDate')
+ annotation_type = ad.get('annotationType')
+ comment = ad.get('comment')
+ return Annotation(annotator, annotation_date, comment, annotation_type, spdx_id)
+
+
class BaseParser(object):
def __init__(self, builder, logger):
self.builder = builder
self.logger = logger
+ self.error = False
+ self.document = None
+ self.doc_object = None
def order_error(self, first_tag, second_tag):
"""
@@ -105,7 +118,6 @@ def parse_creation_info_lic_list_version(self, license_list_version):
self.document, license_list_version
)
except SPDXValueError:
- raise
self.value_error("LL_VALUE", license_list_version)
except CardinalityError:
self.more_than_one_error("CreationInfo licenseListVersion")
@@ -230,7 +242,7 @@ def parse_extracted_license_info(self, extracted_license_info):
self.parse_ext_lic_name(extracted_license.get("name"))
self.parse_ext_lic_comment(extracted_license.get("comment"))
self.parse_ext_lic_text(extracted_license.get("extractedText"))
- self.parse_ext_lic_cross_refs(extracted_license.get("seeAlso"))
+ self.parse_ext_lic_cross_refs(extracted_license.get("seeAlsos"))
else:
self.value_error("EXTR_LIC", extracted_license)
@@ -333,21 +345,31 @@ class AnnotationParser(BaseParser):
def __init__(self, builder, logger):
super(AnnotationParser, self).__init__(builder, logger)
- def parse_annotations(self, annotations):
+ def parse_pkg_annotations(self, annotation_dicts):
+ if annotation_dicts is not None:
+ for ad in annotation_dicts:
+ annotation = dict_to_annotation(ad)
+ self.document.packages[-1].annotations.append(annotation)
+
+ def parse_doc_annotations(self, annotation_dicts):
"""
Parse Annotation Information fields
- - annotations: Python list with Annotation Information dicts in it
- """
- if isinstance(annotations, list):
- for annotation in annotations:
- if isinstance(annotation, dict):
- if self.parse_annotation_annotator(annotation.get("annotator")):
- self.parse_annotation_date(annotation.get("annotationDate"))
- self.parse_annotation_comment(annotation.get("comment"))
- self.parse_annotation_type(annotation.get("annotationType"))
- self.parse_annotation_id(annotation.get("SPDXID"))
+ - annotations: Python list with Annotation Information dicts in it, or a dict
+ """
+ if isinstance(annotation_dicts, dict):
+ annotation = dict_to_annotation(annotation_dicts)
+ self.document.annotations.append(annotation)
+ elif isinstance(annotation_dicts, list):
+ for ad in annotation_dicts:
+ if isinstance(ad, dict):
+ annotation = dict_to_annotation(ad)
+ self.document.annotations.append(annotation)
else:
- self.value_error("ANNOTATION", annotation)
+ self.value_error("ANNOTATION", ad)
+ elif isinstance(annotation_dicts, Annotation):
+ self.document.annotations.append(annotation_dicts)
+ else:
+ self.value_error('ANNOTATION', annotation_dicts)
def parse_annotation_annotator(self, annotator):
"""
@@ -417,6 +439,8 @@ def parse_annotation_id(self, annotation_id):
Parse Annotation id
- annotation_id: Python str/unicode
"""
+ if annotation_id is None:
+ return # cardinality 0:1
if isinstance(annotation_id, str):
try:
return self.builder.set_annotation_spdx_id(self.document, annotation_id)
@@ -490,6 +514,8 @@ def parse_snippets(self, snippets):
Parse Snippet Information fields
- snippets: Python list with Snippet Information dicts in it
"""
+ if isinstance(snippets, dict):
+ snippets = [snippets]
if isinstance(snippets, list):
for snippet in snippets:
if isinstance(snippet, dict):
@@ -497,19 +523,12 @@ def parse_snippets(self, snippets):
self.parse_snippet_name(snippet.get("name"))
self.parse_snippet_comment(snippet.get("comment"))
self.parse_snippet_copyright(snippet.get("copyrightText"))
- self.parse_snippet_license_comment(
- snippet.get("licenseComments")
- )
- self.parse_snippet_file_spdxid(snippet.get("fileId"))
- self.parse_snippet_concluded_license(
- snippet.get("licenseConcluded")
- )
- self.parse_snippet_attribution_text(
- snippet.get("attributionTexts")
- )
- self.parse_snippet_license_info_from_snippet(
- snippet.get("licenseInfoFromSnippet")
- )
+ self.parse_snippet_license_comment(snippet.get("licenseComments"))
+ self.parse_snippet_file_spdxid(snippet.get("snippetFromFile"))
+ self.parse_snippet_concluded_license(snippet.get("licenseConcluded"))
+ self.parse_snippet_attribution_text(snippet.get("attributionTexts"))
+ self.parse_snippet_license_info_in_snippet(snippet.get("licenseInfoInSnippets"))
+ self.parse_snippet_ranges(snippet.get('ranges'))
else:
self.value_error("SNIPPET", snippet)
@@ -605,6 +624,9 @@ def parse_snippet_file_spdxid(self, file_spdxid):
Parse Snippet file id
- file_spdxid: Python str/unicode
"""
+ if file_spdxid is None:
+ return
+
if isinstance(file_spdxid, str):
try:
return self.builder.set_snip_from_file_spdxid(
@@ -637,7 +659,7 @@ def parse_snippet_concluded_license(self, concluded_license):
else:
self.value_error("SNIPPET_SINGLE_LICS", concluded_license)
- def parse_snippet_license_info_from_snippet(self, license_info_from_snippet):
+ def parse_snippet_license_info_in_snippet(self, license_info_from_snippet):
"""
Parse Snippet license information from snippet
- license_info_from_snippet: Python list of licenses information from snippet (str/unicode)
@@ -661,6 +683,26 @@ def parse_snippet_license_info_from_snippet(self, license_info_from_snippet):
else:
self.value_error("SNIPPET_LIC_INFO_FIELD", license_info_from_snippet)
+ def parse_snippet_ranges(self, ranges):
+ if ranges is None:
+ return
+ if isinstance(ranges, list):
+ for ranje in ranges:
+ if isinstance(ranje, dict):
+ end_pointer = ranje.get('endPointer')
+ start_pointer = ranje.get('startPointer')
+ if start_pointer is not None and end_pointer is not None:
+ try:
+ self.builder.set_snippet_range(self.document, ranje)
+ except SPDXValueError:
+ self.value_error('SNIPPET_RANGE', ranje)
+ else:
+ self.value_error('SNIPPET_RANGE', ranje)
+ else:
+ self.value_error('SNIPPET_RANGE', ranje)
+ else:
+ self.value_error('SNIPPET_RANGES', ranges)
+
class ReviewParser(BaseParser):
def __init__(self, builder, logger):
@@ -737,11 +779,11 @@ def parse_file(self, file):
- file: Python dict with File Information fields in it
"""
if isinstance(file, dict):
- self.parse_file_name(file.get("name"))
+ self.parse_file_name(file.get("fileName"))
self.parse_file_id(file.get("SPDXID"))
self.parse_file_types(file.get("fileTypes"))
- self.parse_file_concluded_license(file.get("licenseConcluded"))
- self.parse_file_license_info_from_files(file.get("licenseInfoFromFiles"))
+ self.parse_file_concluded_license(file.get("licenseConcluded", "None"))
+ self.parse_file_license_info_in_files(file.get("licenseInfoInFiles"))
self.parse_file_license_comments(file.get("licenseComments"))
self.parse_file_copyright_text(file.get("copyrightText"))
self.parse_file_artifacts(file.get("artifactOf"))
@@ -750,11 +792,24 @@ def parse_file(self, file):
self.parse_file_contributors(file.get("fileContributors"))
self.parse_file_attribution_text(file.get("fileAttributeTexts"))
self.parse_file_dependencies(file.get("fileDependencies"))
- self.parse_annotations(file.get("annotations"))
- self.parse_file_chksum(file.get("sha1"))
+ self.parse_file_annotations(file.get("annotations"))
+ self.parse_file_checksums(file.get("checksums"))
else:
self.value_error("FILE", file)
+ def parse_file_annotations(self, annotation_dicts):
+ if annotation_dicts is None:
+ return
+ if isinstance(annotation_dicts, dict):
+ annotation = dict_to_annotation(annotation_dicts)
+ self.document.files[-1].annotations.append(annotation)
+ elif isinstance(annotation_dicts, list):
+ for ad in annotation_dicts:
+ annotation = dict_to_annotation(ad)
+ self.document.files[-1].annotations.append(annotation)
+ else:
+ self.value_error('FILE_ANNOTATIONS', annotation_dicts)
+
def parse_file_name(self, file_name):
"""
Parse File name
@@ -809,8 +864,6 @@ def parse_file_type(self, file_type):
return self.builder.set_file_type(self.document, file_type)
except SPDXValueError:
self.value_error("FILE_TYPE", file_type)
- except CardinalityError:
- self.more_than_one_error("FILE_TYPE")
except OrderError:
self.order_error("FILE_TYPE", "FILE_NAME")
else:
@@ -836,31 +889,33 @@ def parse_file_concluded_license(self, concluded_license):
else:
self.value_error("FILE_SINGLE_LICS", concluded_license)
- def parse_file_license_info_from_files(self, license_info_from_files):
+ def parse_file_license_info_in_files(self, license_info_in_files):
"""
Parse File license information from files
- license_info_from_files: Python list of licenses information from files (str/unicode)
"""
- if isinstance(license_info_from_files, list):
- for license_info_from_file in license_info_from_files:
- if isinstance(license_info_from_file, str):
+ if license_info_in_files is None:
+ return
+ if isinstance(license_info_in_files, list):
+ for license_info_in_file in license_info_in_files:
+ if isinstance(license_info_in_file, str):
lic_parser = utils.LicenseListParser()
lic_parser.build(write_tables=0, debug=0)
license_object = self.replace_license(
- lic_parser.parse(license_info_from_file)
+ lic_parser.parse(license_info_in_file)
)
try:
self.builder.set_file_license_in_file(
self.document, license_object
)
except SPDXValueError:
- self.value_error("FILE_LIC_FRM_FILES", license_info_from_file)
+ self.value_error("FILE_LIC_FRM_FILES", license_info_in_file)
except OrderError:
self.order_error("FILE_LIC_FRM_FILES", "FILE_NAME")
else:
- self.value_error("FILE_LIC_FRM_FILES", license_info_from_file)
+ self.value_error("FILE_LIC_FRM_FILES", license_info_in_file)
else:
- self.value_error("FILE_LIC_FRM_FILES_FIELD", license_info_from_files)
+ self.value_error("FILE_LIC_FRM_FILES_FIELD", license_info_in_files)
def parse_file_license_comments(self, license_comments):
"""
@@ -904,6 +959,8 @@ def parse_file_copyright_text(self, copyright_text):
Parse File copyright text
- copyright_text: Python str/unicode
"""
+ if copyright_text is None:
+ return
if isinstance(copyright_text, str):
try:
return self.builder.set_file_copyright(self.document, copyright_text)
@@ -1015,20 +1072,24 @@ def _handle_file_dependency(self, file_dependency):
return None
return None
- def parse_file_chksum(self, file_chksum):
+ def parse_file_checksums(self, file_checksums):
"""
- Parse File checksum
- - file_chksum: Python str/unicode
+ Parse File checksums
+ - file_checksums: Python str/unicode
"""
- if isinstance(file_chksum, str):
+ if isinstance(file_checksums, list):
+ for chk_sum in file_checksums:
+ self.builder.set_file_chksum(self.document, chk_sum)
+ return True
+ if isinstance(file_checksums, str):
try:
- return self.builder.set_file_chksum(self.document, file_chksum)
+ return self.builder.set_file_chksum(self.document, file_checksums)
except CardinalityError:
self.more_than_one_error("FILE_CHECKSUM")
except OrderError:
self.order_error("FILE_CHECKSUM", "FILE_NAME")
else:
- self.value_error("FILE_CHECKSUM", file_chksum)
+ self.value_error("FILE_CHECKSUM", file_checksums)
class PackageParser(BaseParser):
@@ -1048,28 +1109,32 @@ def parse_package(self, package):
if isinstance(package, dict):
# The builder has the notion of current package, here, we force to start a new one
self.builder.reset_package()
- self.parse_pkg_name(package.get("name"))
+ self.parse_pkg_name(package.get("name")) # parse_pkg_name is magic; it creates the package.
self.parse_pkg_id(package.get("SPDXID"))
+ self.parse_pkg_annotations(package.get("annotations"))
+ self.parse_pkg_attribution_text(package.get("attributionTexts"))
+ self.parse_pkg_built_date(package.get('builtDate'))
+ self.parse_pkg_checksums(package.get("checksums"))
+ self.parse_pkg_copyright_text(package.get("copyrightText"))
+ self.parse_pkg_description(package.get("description"))
+ self.parse_pkg_down_location(package.get("downloadLocation"))
+ self.parse_pkg_ext_refs(package.get('externalRefs'))
self.parse_pkg_files_analyzed(package.get("filesAnalyzed"))
- self.parse_pkg_version(package.get("versionInfo"))
+ self.parse_pkg_homepage(package.get("homepage"))
+ self.parse_pkg_license_comment(package.get("licenseComments"))
+ self.parse_pkg_concluded_license(package.get("licenseConcluded"))
+ self.parse_pkg_declared_license(package.get("licenseDeclared"))
+ self.parse_pkg_license_info_from_files(package.get("licenseInfoFromFiles"))
+ # name is first because it is magical
+ self.parse_pkg_originator(package.get("originator"))
self.parse_pkg_file_name(package.get("packageFileName"))
+ self.parse_pkg_purpose(package.get("primaryPackagePurpose"))
+ self.parse_pkg_version(package.get("versionInfo"))
self.parse_pkg_supplier(package.get("supplier"))
- self.parse_pkg_originator(package.get("originator"))
- self.parse_pkg_down_location(package.get("downloadLocation"))
self.parse_pkg_verif_code_field(package.get("packageVerificationCode"))
- self.parse_pkg_homepage(package.get("homepage"))
self.parse_pkg_source_info(package.get("sourceInfo"))
- self.parse_pkg_concluded_license(package.get("licenseConcluded"))
- self.parse_pkg_license_info_from_files(package.get("licenseInfoFromFiles"))
- self.parse_pkg_declared_license(package.get("licenseDeclared"))
- self.parse_pkg_license_comment(package.get("licenseComments"))
- self.parse_pkg_copyright_text(package.get("copyrightText"))
self.parse_pkg_summary(package.get("summary"))
- self.parse_pkg_description(package.get("description"))
- self.parse_annotations(package.get("annotations"))
- self.parse_pkg_attribution_text(package.get("attributionTexts"))
- self.parse_pkg_files(package.get("files"))
- self.parse_pkg_chksum(package.get("sha1"))
+ self.parse_pkg_has_files(package.get("hasFiles"))
else:
self.value_error("PACKAGE", package)
@@ -1086,6 +1151,21 @@ def parse_pkg_name(self, pkg_name):
# would be added to the package previously added.
# Another approach is to skip the whole package itself
+ def parse_pkg_built_date(self, built_date):
+ """
+ parse the built date
+ - built_date: str
+ """
+ if built_date is None:
+ return
+ if isinstance(built_date, str):
+ try:
+ return self.builder.set_pkg_built_date(self.document, built_date)
+ except CardinalityError:
+ self.more_than_one_error("PKG_BUILT_DATE")
+ else:
+ self.value_error("PKG_BUILT_DATE", built_date)
+
def parse_pkg_id(self, pkg_id):
"""
Parse Package id
@@ -1131,6 +1211,21 @@ def parse_pkg_file_name(self, pkg_file_name):
elif pkg_file_name is not None:
self.value_error("PKG_FILE_NAME", pkg_file_name)
+ def parse_pkg_purpose(self, pkg_purpose):
+ """
+ parse the package primary purpose
+ - pkg_purpose: str
+ """
+ if pkg_purpose is None:
+ return True
+ if isinstance(pkg_purpose, str):
+ self.builder.set_pkg_primary_purpose(self.document, pkg_purpose)
+ elif isinstance(pkg_purpose, list):
+ for purpose in pkg_purpose:
+ self.builder.set_pkg_primary_purpose(self.document, purpose)
+ else:
+ self.value_error('PKG_PRIMARY_PURPOSE', pkg_purpose)
+
def parse_pkg_supplier(self, pkg_supplier):
"""
Parse Package supplier
@@ -1184,14 +1279,24 @@ def parse_pkg_down_location(self, pkg_down_location):
else:
self.value_error("PKG_DOWN_LOC", pkg_down_location)
+ def parse_pkg_ext_refs(self, pkg_ext_refs):
+ if pkg_ext_refs is None:
+ return
+ if isinstance(pkg_ext_refs, list):
+ for pkg_ext_ref in pkg_ext_refs:
+ self.builder.set_pkg_ext_ref(self.document, pkg_ext_ref)
+ else:
+ self.value_error("PKG_EXT_REFS", pkg_ext_refs)
+ pass
+
def parse_pkg_files_analyzed(self, pkg_files_analyzed):
"""
Parse Package files analyzed
- pkg_files_analyzed: Python boolean
"""
- # Files Analyzed optional
+ # Files Analyzed optional, but True when not set
if pkg_files_analyzed is None:
- return
+ pkg_files_analyzed = True
if isinstance(pkg_files_analyzed, bool):
try:
return self.builder.set_pkg_files_analyzed(
@@ -1207,10 +1312,13 @@ def parse_pkg_verif_code_field(self, pkg_verif_code_field):
Parse Package verification code dict
- pkg_verif_code_field: Python dict('value':str/unicode, 'excludedFilesNames':list)
"""
+ if pkg_verif_code_field is None or len(pkg_verif_code_field) == 0:
+ return
+
if not self.package.are_files_analyzed:
- if pkg_verif_code_field is not None:
+ if pkg_verif_code_field is not None and len(pkg_verif_code_field) == 0:
self.value_error("PKG_VERIF_CODE_FIELD", pkg_verif_code_field)
- return
+ return
if isinstance(pkg_verif_code_field, dict):
self.parse_pkg_verif_exc_files(
@@ -1296,6 +1404,10 @@ def parse_pkg_concluded_license(self, pkg_concluded_license):
Parse Package concluded license
- pkg_concluded_license: Python str/unicode
"""
+ if pkg_concluded_license is None:
+ return self.builder.set_pkg_licenses_concluded(self.document, None)
+ if isinstance(pkg_concluded_license, utils.SPDXNone):
+ return self.builder.set_pkg_licenses_concluded(self.document, None)
if isinstance(pkg_concluded_license, str):
lic_parser = utils.LicenseListParser()
lic_parser.build(write_tables=0, debug=0)
@@ -1370,6 +1482,8 @@ def parse_pkg_declared_license(self, pkg_declared_license):
Parse Package license declared
- pkg_declared_license: Python str/unicode
"""
+ if pkg_declared_license is None:
+ return self.builder.set_pkg_license_declared(self.document, utils.SPDXNone())
if isinstance(pkg_declared_license, str):
lic_parser = utils.LicenseListParser()
lic_parser.build(write_tables=0, debug=0)
@@ -1411,6 +1525,8 @@ def parse_pkg_copyright_text(self, pkg_copyright_text):
Parse Package copyright text
- pkg_copyright_text: Python str/unicode
"""
+ if pkg_copyright_text is None:
+ return self.builder.set_pkg_cr_text(self.document, None)
if isinstance(pkg_copyright_text, str):
try:
return self.builder.set_pkg_cr_text(self.document, pkg_copyright_text)
@@ -1451,39 +1567,40 @@ def parse_pkg_description(self, pkg_description):
elif pkg_description is not None:
self.value_error("PKG_DESCRIPTION", pkg_description)
- def parse_pkg_files(self, pkg_files):
+ def parse_pkg_has_files(self, pkg_has_files):
"""
Parse Package files
- - pkg_files: Python list of dicts as in FileParser.parse_file
+ - pkg_has: Python list of SPDX ID strings
"""
if not self.package.are_files_analyzed:
- if pkg_files is not None:
- self.value_error("PKG_FILES", pkg_files)
+ if pkg_has_files is not None and len(pkg_has_files) > 0:
+ self.value_error("PKG_HAS_FILES", pkg_has_files)
return
- if isinstance(pkg_files, list):
- for pkg_file in pkg_files:
- if isinstance(pkg_file, dict):
- self.parse_file(pkg_file.get("File"))
- else:
- self.value_error("PKG_FILE", pkg_file)
+ if isinstance(pkg_has_files, list):
+ return self.builder.set_pkg_has_files(self.document, pkg_has_files)
else:
- self.value_error("PKG_FILES", pkg_files)
+ self.value_error("PKG_HAS_FILES", pkg_has_files)
- def parse_pkg_chksum(self, pkg_chksum):
+ def parse_pkg_checksums(self, pkg_checksums):
"""
Parse Package checksum
- pkg_chksum: Python str/unicode
"""
- if isinstance(pkg_chksum, str):
+ if pkg_checksums is None:
+ return
+ if isinstance(pkg_checksums, list):
+ for chk_sum in pkg_checksums:
+ self.builder.set_pkg_chk_sum(self.document, chk_sum)
+ elif isinstance(pkg_checksums, str): # left for backwards compatability.
try:
- return self.builder.set_pkg_chk_sum(self.document, pkg_chksum)
+ return self.builder.set_pkg_chk_sum(self.document, pkg_checksums)
except CardinalityError:
self.more_than_one_error("PKG_CHECKSUM")
except OrderError:
self.order_error("PKG_CHECKSUM", "PKG_NAME")
- elif pkg_chksum is not None:
- self.value_error("PKG_CHECKSUM", pkg_chksum)
+ elif pkg_checksums is not None:
+ self.value_error("PKG_CHECKSUM", pkg_checksums)
class Parser(
@@ -1531,18 +1648,18 @@ def parse(self):
self.parse_extracted_license_info(
self.document_object.get("hasExtractedLicensingInfos")
)
- self.parse_annotations(self.document_object.get("annotations"))
+ self.parse_doc_annotations(self.document_object.get("annotations"))
self.parse_relationships(self.document_object.get("relationships"))
self.parse_reviews(self.document_object.get("reviewers"))
- self.parse_snippets(self.document_object.get("snippets"))
-
self.parse_packages(self.document_object.get("packages"))
+ self.parse_files(self.document_object.get("files"))
+ self.parse_snippets(self.document_object.get("snippets"))
self.parse_doc_described_objects(self.document_object.get("documentDescribes"))
validation_messages = ErrorMessages()
# Report extra errors if self.error is False otherwise there will be
- # redundent messages
+ # redundant messages
validation_messages = self.document.validate(validation_messages)
if not self.error:
if validation_messages:
@@ -1637,30 +1754,15 @@ def parse_doc_comment(self, doc_comment):
def parse_doc_described_objects(self, doc_described_objects):
"""
- Parse Document documentDescribes (Files and Packages dicts)
- - doc_described_objects: Python list of dicts as in FileParser.parse_file or PackageParser.parse_package
+ Parse Document documentDescribes (list of strings that contain spdxIDs)
"""
if isinstance(doc_described_objects, list):
- packages = filter(
- lambda described: isinstance(described, dict)
- and described.get("Package") is not None,
- doc_described_objects,
- )
- files = filter(
- lambda described: isinstance(described, dict)
- and described.get("File") is not None,
- doc_described_objects,
- )
- # At the moment, only single-package documents are supported, so just the last package will be stored.
- for package in packages:
- self.parse_package(package.get("Package"))
- for file in files:
- self.parse_file(file.get("File"))
- return True
+ self.builder.set_doc_described_objects(self.document, doc_described_objects)
+ elif isinstance(doc_described_objects, str):
+ self.builder.add_doc_described_objects(self.document, doc_described_objects)
else:
self.value_error("DOC_DESCRIBES", doc_described_objects)
-
def parse_packages(self, packages):
"""
Parse SPDXLite packages list
@@ -1673,3 +1775,16 @@ def parse_packages(self, packages):
return True
else:
self.value_error("PACKAGES", packages)
+
+ def parse_files(self, files):
+ """
+ Parse SPDX files list
+ """
+ if files is None:
+ return
+ if isinstance(files, list):
+ for file in files:
+ self.parse_file(file)
+ return True
+ else:
+ self.value_error("FILES", files)
diff --git a/spdx/parsers/jsonyamlxmlbuilders.py b/spdx/parsers/jsonyamlxmlbuilders.py
index f728fa580..1d8c01836 100644
--- a/spdx/parsers/jsonyamlxmlbuilders.py
+++ b/spdx/parsers/jsonyamlxmlbuilders.py
@@ -12,6 +12,8 @@
from spdx.parsers import rdfbuilders
from spdx.parsers import tagvaluebuilders
from spdx.parsers import validations
+from spdx import checksum
+from spdx import file
from spdx.parsers.builderexceptions import SPDXValueError
from spdx.parsers.builderexceptions import CardinalityError
from spdx.parsers.builderexceptions import OrderError
@@ -80,6 +82,15 @@ def set_doc_comment(self, doc, comment):
doc.comment = comment
else:
raise CardinalityError("Document::Comment")
+
+ def add_doc_described_objects(self, doc, doc_described_objects):
+ if isinstance(doc_described_objects, list):
+ doc.describes.extend(doc_described_objects)
+ elif isinstance(doc_described_objects, str):
+ doc.describes.append(doc_described_objects)
+
+ def set_doc_described_objects(self, doc, doc_described_objects):
+ doc.describes = doc_described_objects
def set_doc_namespace(self, doc, namespace):
"""
@@ -159,6 +170,21 @@ class FileBuilder(rdfbuilders.FileBuilder):
def __init__(self):
super(FileBuilder, self).__init__()
+ def set_file_chksum(self, doc, chk_sum):
+ """
+ Set the file checksum, if not already set.
+ chk_sum - A string, which is the sha1 hash, or a checksum.Algorithm, or a crummy dict.
+ """
+ if self.has_package(doc) and self.has_file(doc):
+ if isinstance(chk_sum, dict):
+ algo = chk_sum.get('algorithm') or 'SHA1'
+ self.file(doc).set_checksum(checksum.Algorithm(algo, chk_sum.get('checksumValue')))
+ elif isinstance(chk_sum, checksum.Algorithm):
+ self.file(doc).set_checksum(chk_sum)
+ else:
+ self.file(doc).set_checksum(checksum.Algorithm("SHA1", chk_sum))
+ return True
+
def set_file_notice(self, doc, text):
"""
Set file notice
@@ -177,15 +203,15 @@ def set_file_type(self, doc, type_value):
Wrap rdfbuilders.FileBuilder.set_file_type to match the different
fileType representations.
"""
-
- type_dict = {
- "fileType_source": "SOURCE",
- "fileType_binary": "BINARY",
- "fileType_archive": "ARCHIVE",
- "fileType_other": "OTHER",
- }
-
- return super(FileBuilder, self).set_file_type(doc, type_dict.get(type_value))
+ if self.has_package(doc) and self.has_file(doc):
+ file_type = file.FileType.by_name(type_value) or file.FileType.OTHER
+ spdx_file = self.file(doc)
+ if file_type not in spdx_file.file_types:
+ spdx_file.file_types.append(file_type)
+ else:
+ raise CardinalityError("File::Type")
+ else:
+ raise OrderError("File::Type")
class AnnotationBuilder(tagvaluebuilders.AnnotationBuilder):
diff --git a/spdx/parsers/lexers/tagvalue.py b/spdx/parsers/lexers/tagvalue.py
index 906f49c74..94558d63a 100644
--- a/spdx/parsers/lexers/tagvalue.py
+++ b/spdx/parsers/lexers/tagvalue.py
@@ -9,6 +9,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import re
from ply import lex
@@ -99,26 +100,33 @@ class Lexer(object):
"NOASSERTION": "NO_ASSERT",
"UNKNOWN": "UN_KNOWN",
"NONE": "NONE",
- "SOURCE": "SOURCE",
- "BINARY": "BINARY",
- "ARCHIVE": "ARCHIVE",
- "OTHER": "OTHER",
+ "APPLICATION": "FILE_TYPE_APPLICATION",
+ "ARCHIVE": "FILE_TYPE_ARCHIVE",
+ "AUDIO": "FILE_TYPE_AUDIO",
+ "BINARY": "FILE_TYPE_BINARY",
+ "DOCUMENTATION": "FILE_TYPE_DOCUMENTATION",
+ "IMAGE": "FILE_TYPE_IMAGE",
+ "OTHER": "FILE_TYPE_OTHER",
+ "SOURCE": "FILE_TYPE_SOURCE",
+ "SPDX": "FILE_TYPE_SPDX",
+ "TEXT": "FILE_TYPE_TEXT",
+ "VIDEO": "FILE_TYPE_VIDEO",
}
states = (("text", "exclusive"),)
tokens = [
- "TEXT",
- "TOOL_VALUE",
- "UNKNOWN_TAG",
- "ORG_VALUE",
- "PERSON_VALUE",
- "DATE",
- "LINE",
- "CHKSUM",
- "DOC_REF_ID",
- "DOC_URI",
- "EXT_DOC_REF_CHKSUM",
- ] + list(reserved.values())
+ "TEXT",
+ "TOOL_VALUE",
+ "UNKNOWN_TAG",
+ "ORG_VALUE",
+ "PERSON_VALUE",
+ "DATE",
+ "LINE",
+ "CHKSUM",
+ "DOC_REF_ID",
+ "DOC_URI",
+ "EXT_DOC_REF_CHKSUM",
+ ] + list(reserved.values())
def t_text(self, t):
r":\s*"
@@ -128,7 +136,7 @@ def t_text(self, t):
def t_text_end(self, t):
r"\s*"
t.type = "TEXT"
- t.value = t.lexer.lexdata[t.lexer.text_start : t.lexer.lexpos]
+ t.value = t.lexer.lexdata[t.lexer.text_start: t.lexer.lexpos]
t.lexer.lineno += t.value.count("\n")
t.value = t.value.strip()
t.lexer.begin("INITIAL")
@@ -142,7 +150,8 @@ def t_text_error(self, t):
print("Lexer error in text state")
def t_CHKSUM(self, t):
- r":\s*SHA1:\s*[a-f0-9]{40,40}"
+ r":\s*(ADLER32|BLAKE2b-256|BLAKE2b-384|BLAKE2b-512|BLAKE3|MD2|MD4|MD5|MD6|" \
+ "SHA1|SHA224|SHA256|SHA384|SHA512|SHA3-256|SHA3-384|SHA3-512):\s*([a-f0-9]*)"
t.value = t.value[1:].strip()
return t
diff --git a/spdx/parsers/parse_anything.py b/spdx/parsers/parse_anything.py
index d6e086a7a..e16d682e2 100644
--- a/spdx/parsers/parse_anything.py
+++ b/spdx/parsers/parse_anything.py
@@ -27,10 +27,7 @@ def parse_file(fn):
if fn.endswith(".rdf") or fn.endswith(".rdf.xml"):
parsing_module = rdf
buildermodule = rdfbuilders
- elif fn.endswith(".spdx"):
- parsing_module = rdf
- buildermodule = rdfbuilders
- elif fn.endswith(".tag"):
+ elif fn.endswith(".tag") or fn.endswith('.spdx'):
parsing_module = tagvalue
buildermodule = tagvaluebuilders
read_data = True
@@ -49,6 +46,6 @@ def parse_file(fn):
with open(fn) as f:
if read_data:
data = f.read()
- return p.parse(data)
+ return p.parse(data)
else:
- return p.parse(f)
+ return p.parse(f)
diff --git a/spdx/parsers/rdf.py b/spdx/parsers/rdf.py
index c014c3d85..b44cae921 100644
--- a/spdx/parsers/rdf.py
+++ b/spdx/parsers/rdf.py
@@ -19,12 +19,13 @@
from rdflib import RDFS
from spdx import document
+from spdx import file
from spdx import utils
+from spdx import checksum
from spdx.parsers.builderexceptions import CardinalityError
from spdx.parsers.builderexceptions import SPDXValueError
from spdx.parsers.loggers import ErrorMessages
-
ERROR_MESSAGES = {
"DOC_VERS_VALUE": "Invalid specVersion '{0}' must be SPDX-M.N where M and N are numbers.",
"DOC_D_LICS": "Invalid dataLicense '{0}' must be http://spdx.org/licenses/CC0-1.0.",
@@ -50,7 +51,7 @@
'letters, numbers, ".", "-".',
"PKG_EXT_REF_CATEGORY": '\'{0}\' must be "SECURITY", "PACKAGE-MANAGER", or "OTHER".',
"PKG_EXT_REF_TYPE": '{0} must be a unique string containing letters, numbers, ".", or "-".',
- "FILE_TYPE": "File type must be binary, other, source or archive term.",
+ "FILE_TYPE": "There must be at least one file type specified.",
"FILE_SINGLE_LICS": "File concluded license must be a license url or spdx:noassertion or spdx:none.",
"REVIEWER_VALUE": "Invalid reviewer value '{0}' must be Organization, Tool or Person.",
"REVIEW_DATE": "Invalid review date value '{0}' must be date in ISO 8601 format.",
@@ -65,6 +66,16 @@
}
+def convert_rdf_checksum_algorithm(algo):
+ ss = algo.split('#')
+ if len(ss) != 2:
+ raise SPDXValueError('Unknown checksum algorithm {}'.format(algo))
+ algo = checksum.CHECKSUM_ALGORITHM_FROM_XML_DICT.get(ss[1])
+ if algo is None:
+ raise SPDXValueError('Unknown checksum algorithm {}'.format(algo))
+ return algo
+
+
class BaseParser(object):
"""
Base class for all parsers.
@@ -503,15 +514,18 @@ def p_pkg_src_info(self, p_term, predicate):
break
def p_pkg_chk_sum(self, p_term, predicate):
- for _s, _p, checksum in self.graph.triples((p_term, predicate, None)):
- for _, _, value in self.graph.triples(
- (checksum, self.spdx_namespace["checksumValue"], None)
+ for _s, _p, pkg_checksum in self.graph.triples((p_term, predicate, None)):
+ for _, _, rdf_value in self.graph.triples(
+ (pkg_checksum, self.spdx_namespace["checksumValue"], None)
):
- try:
- self.builder.set_pkg_chk_sum(self.doc, str(value))
- except CardinalityError:
- self.more_than_one_error("Package checksum")
- break
+ value = str(rdf_value).split('#')[0]
+ for _, _, algo in self.graph.triples(
+ (pkg_checksum, self.spdx_namespace["algorithm"], None)
+ ):
+ identifier = convert_rdf_checksum_algorithm(str(algo))
+ chk_sum = checksum.Algorithm(identifier, value)
+ self.builder.set_pkg_chk_sum(self.doc, chk_sum)
+
def p_pkg_homepg(self, p_term, predicate):
for _s, _p, o in self.graph.triples((p_term, predicate, None)):
@@ -692,7 +706,7 @@ def p_file_artifact(self, f_term, predicate):
Note: does not handle artifact of project URI.
"""
for _, _, project in self.graph.triples((f_term, predicate, None)):
- if (project, RDF.type, self.doap_namespace["Project"]):
+ if (project, RDF.type, self.doap_namespace["Project"]) in self.graph:
self.p_file_project(project)
else:
self.error = True
@@ -762,14 +776,6 @@ def p_file_type(self, f_term, predicate):
try:
for _, _, ftype in self.graph.triples((f_term, predicate, None)):
try:
- if ftype.endswith("binary"):
- ftype = "BINARY"
- elif ftype.endswith("source"):
- ftype = "SOURCE"
- elif ftype.endswith("other"):
- ftype = "OTHER"
- elif ftype.endswith("archive"):
- ftype = "ARCHIVE"
self.builder.set_file_type(self.doc, ftype)
except SPDXValueError:
self.value_error("FILE_TYPE", ftype)
@@ -778,14 +784,20 @@ def p_file_type(self, f_term, predicate):
def p_file_chk_sum(self, f_term, predicate):
"""
- Set file checksum. Assumes SHA1 algorithm without checking.
+ Set file checksum.
"""
try:
- for _s, _p, checksum in self.graph.triples((f_term, predicate, None)):
- for _, _, value in self.graph.triples(
- (checksum, self.spdx_namespace["checksumValue"], None)
+ for _s, _p, file_checksum in self.graph.triples((f_term, predicate, None)):
+ for _, _, rdf_value in self.graph.triples(
+ (file_checksum, self.spdx_namespace["checksumValue"], None)
):
- self.builder.set_file_chksum(self.doc, str(value))
+ value = rdf_value.split('#')[0]
+ for _, _, algo in self.graph.triples(
+ (file_checksum, self.spdx_namespace["algorithm"], None)
+ ):
+ identifier = convert_rdf_checksum_algorithm(str(algo))
+ chk_sum = checksum.Algorithm(identifier, value)
+ self.builder.set_file_chksum(self.doc, chk_sum)
except CardinalityError:
self.more_than_one_error("File checksum")
diff --git a/spdx/parsers/rdfbuilders.py b/spdx/parsers/rdfbuilders.py
index 3affb7329..81aef3bbb 100644
--- a/spdx/parsers/rdfbuilders.py
+++ b/spdx/parsers/rdfbuilders.py
@@ -13,6 +13,7 @@
from spdx import checksum
from spdx import document
+from spdx import file
from spdx import package
from spdx import version
from spdx.parsers.builderexceptions import CardinalityError
@@ -193,11 +194,30 @@ def set_pkg_chk_sum(self, doc, chk_sum):
Raise OrderError if no package previously defined.
"""
self.assert_package_exists()
- if not self.package_chk_sum_set:
- self.package_chk_sum_set = True
- doc.packages[-1].check_sum = checksum.Algorithm("SHA1", chk_sum)
+ self.package_chk_sum_set = True
+ if isinstance(chk_sum, dict):
+ algo = chk_sum.get('algorithm') or 'SHA1'
+ if algo.startswith('checksumAlgorithm_'):
+ algo = checksum.CHECKSUM_ALGORITHM_FROM_XML_DICT.get(algo) or 'SHA1'
+ doc.packages[-1].set_checksum(checksum.Algorithm(identifier=algo, value=chk_sum.get('checksumValue')))
+ elif isinstance(chk_sum, checksum.Algorithm):
+ doc.packages[-1].set_checksum(chk_sum)
+ elif isinstance(chk_sum, str):
+ doc.packages[-1].set_checsum(checksum.Algorithm('SHA1', chk_sum))
+ else:
+ raise ValueError('cannot set package checksum to value of type {}'.format(type(chk_sum)))
+
+ def set_pkg_ext_ref(self, doc, pkg_ext_ref):
+ self.assert_package_exists()
+ if isinstance(pkg_ext_ref, dict):
+ reference_category = pkg_ext_ref.get('referenceCategory')
+ reference_locator = pkg_ext_ref.get('referenceLocator')
+ reference_type = pkg_ext_ref.get('referenceType')
+ comment = pkg_ext_ref.get('comment')
+ new_ref = package.ExternalPackageRef(reference_category, reference_type, reference_locator, comment)
+ doc.packages[-1].add_external_references(new_ref)
else:
- raise CardinalityError("Package::CheckSum")
+ raise ValueError('cannot set package external reference to value of type {}'.format(type(pkg_ext_ref)))
def set_pkg_source_info(self, doc, text):
"""
@@ -389,14 +409,14 @@ def set_file_chksum(self, doc, chk_sum):
Raise OrderError if no package previously defined.
"""
if self.has_package(doc) and self.has_file(doc):
- if not self.file_chksum_set:
- self.file_chksum_set = True
- self.file(doc).chk_sum = checksum.Algorithm("SHA1", chk_sum)
- return True
+ if isinstance(chk_sum, dict):
+ self.file(doc).set_checksum(checksum.Algorithm(chk_sum.get('algorithm'),
+ chk_sum.get('checksumValue')))
+ elif isinstance(chk_sum, checksum.Algorithm):
+ self.file(doc).set_checksum(chk_sum)
else:
- raise CardinalityError("File::CheckSum")
- else:
- raise OrderError("File::CheckSum")
+ self.file(doc).set_checksum(checksum.Algorithm("SHA1", chk_sum))
+ return True
def set_file_license_comment(self, doc, text):
"""
@@ -467,6 +487,24 @@ def set_file_notice(self, doc, text):
else:
raise OrderError("File::Notice")
+ def set_file_type(self, doc, filetype):
+ """
+ Set the file type for XML and RDF values.
+ """
+ if self.has_package(doc) and self.has_file(doc):
+ ss = filetype.split('#')
+ if len(ss) != 2:
+ raise SPDXValueError('Unknown file type {}'.format(filetype))
+ file_type = file.FILE_TYPE_FROM_XML_DICT.get(ss[1]) or file.FileType.OTHER
+ spdx_file = self.file(doc)
+ if file_type not in spdx_file.file_types:
+ spdx_file.file_types.append(file_type)
+ else:
+ raise CardinalityError("File::Type")
+ else:
+ raise OrderError("File::Type")
+
+
class SnippetBuilder(tagvaluebuilders.SnippetBuilder):
def __init__(self):
diff --git a/spdx/parsers/tagvalue.py b/spdx/parsers/tagvalue.py
index eda58fa70..3ac6c7fdb 100644
--- a/spdx/parsers/tagvalue.py
+++ b/spdx/parsers/tagvalue.py
@@ -636,12 +636,20 @@ def p_file_conc_2(self, p):
self.logger.log(msg)
def p_file_type_value(self, p):
- """file_type_value : OTHER
- | SOURCE
- | ARCHIVE
- | BINARY
+ """file_type_value : FILE_TYPE_APPLICATION
+ | FILE_TYPE_ARCHIVE
+ | FILE_TYPE_AUDIO
+ | FILE_TYPE_BINARY
+ | FILE_TYPE_DOCUMENTATION
+ | FILE_TYPE_IMAGE
+ | FILE_TYPE_OTHER
+ | FILE_TYPE_SOURCE
+ | FILE_TYPE_SPDX
+ | FILE_TYPE_TEXT
+ | FILE_TYPE_VIDEO
"""
p[0] = p[1]
+
def p_pkg_desc_1(self, p):
"""pkg_desc : PKG_DESC TEXT"""
try:
diff --git a/spdx/parsers/tagvaluebuilders.py b/spdx/parsers/tagvaluebuilders.py
index caf7f2ff9..29d95fa25 100644
--- a/spdx/parsers/tagvaluebuilders.py
+++ b/spdx/parsers/tagvaluebuilders.py
@@ -30,18 +30,11 @@
from spdx.parsers import validations
-def checksum_from_sha1(value):
- """
- Return an spdx.checksum.Algorithm instance representing the SHA1
- checksum or None if does not match CHECKSUM_RE.
- """
- # More constrained regex at lexer level
- CHECKSUM_RE = re.compile("SHA1:\\s*([\\S]+)", re.UNICODE)
- match = CHECKSUM_RE.match(value)
+def parse_checksum_string(value):
+ checksum_re = re.compile(checksum.CHECKSUM_REGEX)
+ match = checksum_re.match(value)
if match:
- return checksum.Algorithm(identifier="SHA1", value=match.group(1))
- else:
- return None
+ return match.group(1), match.group(2)
def str_from_text(text):
@@ -197,7 +190,9 @@ def set_chksum(self, doc, chksum):
"""
Set the `check_sum` attribute of the `ExternalDocumentRef` object.
"""
- doc.ext_document_references[-1].check_sum = checksum_from_sha1(chksum)
+ ident, value = parse_checksum_string(chksum)
+ if ident is not None and value is not None:
+ doc.ext_document_references[-1].check_sum = checksum.Algorithm(ident, value)
def add_ext_doc_refs(self, doc, ext_doc_id, spdx_doc_uri, chksum):
self.set_ext_doc_id(doc, ext_doc_id)
@@ -595,6 +590,7 @@ def reset_package(self):
self.package_comment_set = False
# self.package_attribution_text_set = False
self.pkg_ext_comment_set = False
+ self.pkg_built_date_set = False
def create_package(self, doc, name):
"""
@@ -606,6 +602,19 @@ def create_package(self, doc, name):
doc.add_package(package.Package(name=name))
return True
+ def set_pkg_built_date(self, doc, built_date):
+ """
+ set the package built date
+ Raise CardinalityError if already defined.
+ """
+ self.assert_package_exists()
+ if not self.pkg_built_date_set:
+ doc.packages[-1].built_date = built_date
+ self.pkg_built_date_set = True
+ return True
+ else:
+ raise CardinalityError("Package::built_date")
+
def set_pkg_spdx_id(self, doc, spdx_id):
"""
Set the Package SPDX Identifier.
@@ -653,6 +662,16 @@ def set_pkg_file_name(self, doc, name):
else:
raise CardinalityError("Package::FileName")
+ def set_pkg_primary_purpose(self, doc, purpose):
+ """
+ set the package primary purpose
+ """
+ self.assert_package_exists()
+ if isinstance(purpose, str):
+ doc.packages[-1].primary_purpose.append(purpose)
+ else:
+ raise SPDXValueError("Package::primary_purpose")
+
def set_pkg_supplier(self, doc, entity):
"""
Set the package supplier, if not already set.
@@ -777,12 +796,10 @@ def set_pkg_chk_sum(self, doc, chk_sum):
Raise OrderError if no package previously defined.
"""
self.assert_package_exists()
- if not self.package_chk_sum_set:
- self.package_chk_sum_set = True
- doc.packages[-1].check_sum = checksum_from_sha1(chk_sum)
- return True
- else:
- raise CardinalityError("Package::CheckSum")
+ self.package_chk_sum_set = True
+ ident, value = parse_checksum_string(chk_sum)
+ doc.packages[-1].set_checksum(checksum.Algorithm(ident, value))
+ return True
def set_pkg_source_info(self, doc, text):
"""
@@ -814,6 +831,9 @@ def set_pkg_licenses_concluded(self, doc, licenses):
self.assert_package_exists()
if not self.package_conc_lics_set:
self.package_conc_lics_set = True
+ if licenses is None:
+ doc.packages[-1].conc_lics = utils.SPDXNone()
+ return True
if validations.validate_lics_conc(licenses):
doc.packages[-1].conc_lics = licenses
return True
@@ -845,6 +865,8 @@ def set_pkg_license_declared(self, doc, lic):
self.assert_package_exists()
if not self.package_license_declared_set:
self.package_license_declared_set = True
+ if lic is None:
+ return True
if validations.validate_lics_conc(lic):
doc.packages[-1].license_declared = lic
return True
@@ -961,14 +983,12 @@ def set_pkg_ext_ref_category(self, doc, category):
self.assert_package_exists()
if validations.validate_pkg_ext_ref_category(category):
if (
- len(doc.packages[-1].pkg_ext_refs)
- and doc.packages[-1].pkg_ext_refs[-1].category is None
+ len(doc.packages[-1].external_references)
+ and doc.packages[-1].external_references[-1].category is None
):
- doc.packages[-1].pkg_ext_refs[-1].category = category
+ doc.packages[-1].external_references[-1].category = category
else:
- doc.packages[-1].add_pkg_ext_refs(
- package.ExternalPackageRef(category=category)
- )
+ doc.packages[-1].add_external_references(package.ExternalPackageRef(category=category))
else:
raise SPDXValueError("ExternalRef::Category")
@@ -979,12 +999,12 @@ def set_pkg_ext_ref_type(self, doc, pkg_ext_ref_type):
self.assert_package_exists()
if validations.validate_pkg_ext_ref_type(pkg_ext_ref_type):
if (
- len(doc.packages[-1].pkg_ext_refs)
- and doc.packages[-1].pkg_ext_refs[-1].pkg_ext_ref_type is None
+ len(doc.packages[-1].external_references)
+ and doc.packages[-1].external_references[-1].pkg_ext_ref_type is None
):
- doc.packages[-1].pkg_ext_refs[-1].pkg_ext_ref_type = pkg_ext_ref_type
+ doc.packages[-1].external_references[-1].pkg_ext_ref_type = pkg_ext_ref_type
else:
- doc.packages[-1].add_pkg_ext_refs(
+ doc.packages[-1].add_external_references(
package.ExternalPackageRef(pkg_ext_ref_type=pkg_ext_ref_type)
)
else:
@@ -996,31 +1016,37 @@ def set_pkg_ext_ref_locator(self, doc, locator):
"""
self.assert_package_exists()
if (
- len(doc.packages[-1].pkg_ext_refs)
- and doc.packages[-1].pkg_ext_refs[-1].locator is None
+ len(doc.packages[-1].external_references)
+ and doc.packages[-1].external_references[-1].locator is None
):
- doc.packages[-1].pkg_ext_refs[-1].locator = locator
+ doc.packages[-1].external_references[-1].locator = locator
else:
- doc.packages[-1].add_pkg_ext_refs(package.ExternalPackageRef(locator=locator))
+ doc.packages[-1].add_external_references(package.ExternalPackageRef(locator=locator))
def add_pkg_ext_ref_comment(self, doc, comment):
"""
Set the `comment` attribute of the `ExternalPackageRef` object.
"""
self.assert_package_exists()
- if not len(doc.packages[-1].pkg_ext_refs):
+ if not len(doc.packages[-1].external_references):
raise OrderError("Package::ExternalRef")
else:
if validations.validate_pkg_ext_ref_comment(comment):
- doc.packages[-1].pkg_ext_refs[-1].comment = str_from_text(comment)
+ doc.packages[-1].external_references[-1].comment = str_from_text(comment)
else:
raise SPDXValueError("ExternalRef::Comment")
- def add_pkg_ext_refs(self, doc, category, pkg_ext_ref_type, locator):
+ def add_external_references(self, doc, category, pkg_ext_ref_type, locator):
self.set_pkg_ext_ref_category(doc, category)
self.set_pkg_ext_ref_type(doc, pkg_ext_ref_type)
self.set_pkg_ext_ref_locator(doc, locator)
+ def set_pkg_has_files(self, doc, has_files):
+ self.assert_package_exists()
+ if has_files is not None and len(has_files) > 0:
+ doc.packages[-1].files_analyzed = True
+ doc.packages[-1].has_files = has_files
+
def assert_package_exists(self):
if not self.package_set:
raise OrderError("Package")
@@ -1036,7 +1062,7 @@ def set_file_name(self, doc, name):
Raise OrderError if no package defined.
"""
if self.has_package(doc):
- doc.packages[-1].files.append(file.File(name))
+ doc.files.append(file.File(name))
# A file name marks the start of a new file instance.
# The builder must be reset
# FIXME: this state does not make sense
@@ -1102,39 +1128,35 @@ def set_file_type(self, doc, type_value):
Raise CardinalityError if more than one type set.
Raise SPDXValueError if type is unknown.
"""
- type_dict = {
- "SOURCE": file.FileType.SOURCE,
- "BINARY": file.FileType.BINARY,
- "ARCHIVE": file.FileType.ARCHIVE,
- "OTHER": file.FileType.OTHER,
- }
if self.has_package(doc) and self.has_file(doc):
- if not self.file_type_set:
- self.file_type_set = True
- if type_value in type_dict.keys():
- self.file(doc).type = type_dict[type_value]
- return True
- else:
- raise SPDXValueError("File::Type")
+ file_type = file.FileType.by_name(type_value) or file.FileType.OTHER
+ spdx_file = self.file(doc)
+ if file_type not in spdx_file.file_types:
+ spdx_file.file_types.append(file_type)
else:
raise CardinalityError("File::Type")
else:
raise OrderError("File::Type")
- def set_file_chksum(self, doc, chksum):
+ def set_file_chksum(self, doc, new_checksum):
"""
Raise OrderError if no package or file defined.
Raise CardinalityError if more than one chksum set.
"""
if self.has_package(doc) and self.has_file(doc):
- if not self.file_chksum_set:
+ self.file_chksum_set = False
+ chk_sums = doc.files[-1].checksums
+ identifier, value = parse_checksum_string(new_checksum)
+ if identifier is not None and value is not None:
+ if identifier not in checksum.CHECKSUM_ALGORITHMS:
+ raise ValueError('checksum algorithm {} is not supported'.format(identifier))
+ chk_sums[identifier] = value
+ self.file(doc).checksums = chk_sums
+ if self.file(doc).checksums.get('SHA1') is not None:
self.file_chksum_set = True
- self.file(doc).chk_sum = checksum_from_sha1(chksum)
- return True
- else:
- raise CardinalityError("File::CheckSum")
else:
raise OrderError("File::CheckSum")
+ return True
def set_concluded_license(self, doc, lic):
"""
@@ -1259,14 +1281,14 @@ def file(self, doc):
"""
Return the last file in the document's package's file list.
"""
- return doc.packages[-1].files[-1]
+ return doc.files[-1]
def has_file(self, doc):
"""
Return true if the document's package has at least one file.
Does not test if the document has a package.
"""
- return len(doc.packages[-1].files) != 0
+ return len(doc.files) != 0
def has_package(self, doc):
"""
@@ -1541,6 +1563,13 @@ def set_snippet_lics_info(self, doc, lics_info):
else:
raise SPDXValueError("Snippet::LicenseInfoInSnippet")
+ def set_snippet_range(self, doc, ranje):
+ self.assert_snippet_exists()
+ if isinstance(ranje, dict) and len(ranje) == 2:
+ doc.snippet[-1].add_range(ranje)
+ else:
+ raise SPDXValueError("Snippet::Range")
+
def reset_snippet(self):
# FIXME: this state does not make sense
self.snippet_spdx_id_set = False
diff --git a/spdx/parsers/xmlparser.py b/spdx/parsers/xmlparser.py
index 3fed3cdb7..bdc4e26e7 100644
--- a/spdx/parsers/xmlparser.py
+++ b/spdx/parsers/xmlparser.py
@@ -9,12 +9,33 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from collections import OrderedDict
-
-import xmltodict
+import xml.etree.ElementTree as ET
+from spdx.checksum import CHECKSUM_ALGORITHM_FROM_XML_DICT
+from spdx.document import Document
from spdx.parsers import jsonyamlxml
+ANNOTATION_KEYS = ['SPDXID', 'annotationDate', 'annotationType', 'annotator', 'comment']
+EXT_LIC_KEYS = ['comment', 'licenseId', 'extractedText', 'name', 'seeAlsos']
+EXT_REF_KEYS = ['checksum', 'externalDocumentId', 'spdxDocument']
+FILE_KEYS = ['artifactOf', 'annotations',
+ 'checksums', 'comment', 'copyrightText',
+ 'fileContributors', 'fileName', 'fileTypes',
+ 'licenseComments', 'licenseConcluded', 'licenseInfoInFiles',
+ 'noticeText',
+ 'SPDXID',]
+PACKAGE_KEYS = ['SPDXID', 'annotations', 'attributionTexts', 'builtDate', 'checksums', 'copyrightText',
+ 'description', 'downloadLocation', 'externalRefs', 'filesAnalyzed', 'hasFiles', 'homepage',
+ 'licenseComments', 'licenseConcluded', 'licenseDeclared', 'licenseInfoFromFiles', 'name',
+ 'originator', 'packageFileName', 'packageVerificationCode', 'primaryPackagePurpose',
+ 'releaseDate', 'sourceInfo', 'summary', 'supplier', 'validUntilDate', 'versionInfo']
+PKG_EXT_REF_KEYS = ['referenceCategory', 'referenceLocator', 'referenceType', 'comment']
+RELATIONSHIP_KEYS = ['comment', 'spdxElementId', 'relationshipType', 'relatedSpdxElement']
+REVIEW_KEYS = ['comment', 'reviewDate', 'reviewer']
+SNIPPET_KEYS = ['SPDXID', 'attributionTexts', 'comment', 'copyrightText',
+ 'licenseComments', 'licenseConcluded', 'licenseInfoInSnippets',
+ 'name', 'ranges', 'snippetFromFile']
+
class Parser(jsonyamlxml.Parser):
"""
@@ -25,51 +46,303 @@ class Parser(jsonyamlxml.Parser):
def __init__(self, builder, logger):
super(Parser, self).__init__(builder, logger)
- self.LIST_LIKE_FIELDS = {
- "creators",
- "externalDocumentRefs",
- "extractedLicenseInfos",
- "seeAlso",
- "annotations",
- "relationships",
- "snippets",
- "licenseInfoFromSnippet",
- "reviewers",
- "fileTypes",
- "licenseInfoFromFiles",
- "artifactOf",
- "fileContributors",
- "fileDependencies",
- "excludedFilesNames",
- "files",
- "documentDescribes",
- }
+ self.document = None
+ self.error = False
- def parse(self, file):
- parsed_xml = xmltodict.parse(
- file.read(), strip_whitespace=False, encoding="utf-8"
- )
- fixed_object = self._set_in_list(parsed_xml, self.LIST_LIKE_FIELDS)
- self.document_object = fixed_object.get("SpdxDocument").get("Document")
- return super(Parser, self).parse()
-
- def _set_in_list(self, data, keys):
- """
- xmltodict parse list-like fields in different way when there is only one
- of them than when there are several of them.
- Set in lists those fields that are expected to be in them.
- """
- if isinstance(data, (dict, OrderedDict)):
- new_data = OrderedDict()
- for k, v in data.items():
- if k in keys and not isinstance(v, list):
- new_data[k] = [self._set_in_list(v, keys)]
+ def checksum_node_to_dict(self, checksum_node):
+ checksum_dict = {}
+ for child in checksum_node:
+ if child.tag == 'algorithm':
+ algo = child.text
+ if algo.startswith('checksumAlgorithm_'):
+ algo = CHECKSUM_ALGORITHM_FROM_XML_DICT.get(algo)
+ checksum_dict['algorithm'] = algo
+ elif child.tag == 'checksumValue':
+ checksum_dict['checksumValue'] = child.text
+ else:
+ self.logger.log('unknown tag "{}"'.format(child.tag))
+ self.error = True
+ return checksum_dict
+
+ @staticmethod
+ def annotations_node_to_dict(annotations_node):
+ annotation_dict = {}
+ for child in annotations_node:
+ if child.tag in ANNOTATION_KEYS:
+ annotation_dict[child.tag] = child.text
+ return annotation_dict
+
+ @staticmethod
+ def external_document_ref_node_to_dict(node):
+ ext_doc_ref = {}
+ for child in node:
+ if child.tag in PKG_EXT_REF_KEYS:
+ ext_doc_ref[child.tag] = child.text
+ else:
+ raise RuntimeError(f'external_document_ref_node key error: {child.tag}')
+ return ext_doc_ref
+
+ def parse_doc_annotations(self, annotations_node):
+ super().parse_doc_annotations(self.annotations_node_to_dict(annotations_node))
+
+ def parse_package_annotations(self, annotations_node):
+ super().parse_pkg_annotations(self.annotations_node_to_dict(annotations_node))
+
+ def parse_creation_info(self, creation_node):
+ creation_info = {}
+ for child in creation_node:
+ if child.tag == 'comment':
+ creation_info['comment'] = child.text
+ self.parse_creation_info_comment(child.text)
+ elif child.tag == 'created':
+ self.parse_creation_info_created(child.text)
+ elif child.tag == 'creators':
+ entity = self.builder.create_entity(self.document, child.text)
+ self.builder.add_creator(self.document, entity)
+ elif child.tag == 'licenseListVersion':
+ self.parse_creation_info_lic_list_version(child.text)
+ else:
+ self.logger.log('unhandled creation_info child tag "{}"'.format(child.tag))
+ self.error = True
+
+ def parse_external_document_refs(self, ext_doc_refs_node):
+ ext_doc_refs = {}
+ for child in ext_doc_refs_node:
+ if child.tag in EXT_REF_KEYS:
+ if child.tag == 'checksum':
+ ext_doc_refs[child.tag] = self.checksum_node_to_dict(child)
else:
- new_data[k] = self._set_in_list(v, keys)
- return new_data
- elif isinstance(data, list):
- new_data = []
- for element in data:
- new_data.append(self._set_in_list(element, keys))
- return new_data
- return data
+ ext_doc_refs[child.tag] = child.text
+ else:
+ self.logger.log('unhandled external_document_refs child tag "{}"'.format(child.tag))
+ self.error = True
+ super().parse_external_document_refs([ext_doc_refs])
+
+ def parse_extracted_license_info(self, eli_node):
+ extracted_license_info = {}
+ for child in eli_node:
+ if child.tag in EXT_LIC_KEYS:
+ if child.tag == 'seeAlsos':
+ see_list = extracted_license_info.get(child.tag) or []
+ see_list.append(child.text)
+ if len(see_list) > 0:
+ extracted_license_info[child.tag] = see_list
+ else:
+ extracted_license_info[child.tag] = child.text
+ else:
+ self.logger.log('unhandled extracted_license_info child tag "{}"'.format(child.tag))
+ self.error = True
+ super().parse_extracted_license_info([extracted_license_info])
+
+ def parse_file(self, file_node):
+ this_file = {}
+ for child in file_node:
+ if child.tag in FILE_KEYS:
+ if child.tag == 'annotations':
+ annotations_list = this_file.get(child.tag, [])
+ annotations_list.append(self.annotations_node_to_dict(child))
+ this_file[child.tag] = annotations_list
+ elif child.tag == 'artifactOf':
+ artifact_list = this_file.get('artifactOf') or []
+ artifact_dict = {}
+ for art_child in child:
+ if art_child.tag in ['homePage', 'name', 'projectUri']:
+ artifact_dict[art_child.tag] = art_child.text
+ artifact_list.append(artifact_dict)
+ this_file['artifactOf'] = artifact_list
+ elif child.tag == 'checksums':
+ checksums = this_file.get('checksums', [])
+ checksums.append(self.checksum_node_to_dict(child))
+ this_file['checksums'] = checksums
+ elif child.tag == 'fileContributors':
+ fc_list = this_file.get(child.tag, [])
+ fc_list.append(child.text)
+ this_file[child.tag] = fc_list
+ elif child.tag == 'fileTypes':
+ file_types = this_file.get(child.tag, [])
+ file_type = child.text
+ if file_type.startswith('fileType_'):
+ file_type = file_type[9:].upper()
+ file_types.append(file_type)
+ this_file[child.tag] = file_types
+ elif child.tag == 'licenseInfoInFiles':
+ liff_list = this_file.get(child.tag, [])
+ liff_list.append(child.text)
+ this_file[child.tag] = liff_list
+ else:
+ this_file[child.tag] = child.text
+ else:
+ self.logger.log('unhandled file child tag "{}"'.format(child.tag))
+ self.error = True
+ super().parse_file(this_file)
+
+ def parse_package(self, package_node):
+ package = {}
+ for child in package_node:
+ if child.tag in PACKAGE_KEYS:
+ if child.tag == 'annotations':
+ annotations_list = package.get(child.tag, [])
+ annotations_list.append(self.annotations_node_to_dict(child))
+ package[child.tag] = annotations_list
+ elif child.tag == 'checksums':
+ checksums = package.get('checksums') or []
+ _checksum = self.checksum_node_to_dict(child)
+ checksums.append(_checksum)
+ package['checksums'] = checksums
+ elif child.tag == 'externalRefs':
+ external_refs = package.get('externalRefs', [])
+ external_refs.append(self.external_document_ref_node_to_dict(child))
+ package['externalRefs'] = external_refs
+ elif child.tag == 'hasFiles':
+ files = package.get('hasFiles', [])
+ files.append(child.text)
+ package['hasFiles'] = files
+ elif child.tag == 'licenseInfoFromFiles':
+ liff_list = package.get(child.tag, [])
+ liff_list.append(child.text)
+ package[child.tag] = liff_list
+ elif child.tag == 'filesAnalyzed':
+ package['filesAnalyzed'] = child.text.lower() == 'true'
+ elif child.tag == 'packageVerificationCode':
+ pkg_verf_code_dict = {}
+ for pkg_child in child:
+ if pkg_child.tag == 'packageVerificationCodeValue':
+ pkg_verf_code_dict['packageVerificationCodeValue'] = pkg_child.text
+ elif pkg_child.tag == 'packageVerificationCodeExcludedFiles':
+ pvcef_list = pkg_verf_code_dict.get(pkg_child.tag, [])
+ pvcef_list.append(pkg_child.text)
+ pkg_verf_code_dict[pkg_child.tag] = pvcef_list
+ package[child.tag] = pkg_verf_code_dict
+ elif child.tag == 'primaryPackagePurpose':
+ ppp_list = package.get(child.tag, [])
+ ppp_type = child.text
+ if ppp_type.startswith('packagePurpose_'):
+ ppp_type = ppp_type[15:].upper()
+ ppp_list.append(ppp_type)
+ package[child.tag] = ppp_list
+ else:
+ package[child.tag] = child.text
+ else:
+ self.logger.log('unhandled package child tag "{}"'.format(child.tag))
+ self.error = True
+ super().parse_package(package)
+
+ def parse_relationships(self, relationships_node):
+ relationship = {}
+ for child in relationships_node:
+ if child.tag in RELATIONSHIP_KEYS:
+ relationship[child.tag] = child.text
+ else:
+ self.logger.log('unhandled relationships child tag "{}"'.format(child.tag))
+ self.error = True
+ super().parse_relationships([relationship])
+
+ def parse_reviews(self, reviews_node):
+ review = {}
+ for child in reviews_node:
+ if child.tag in REVIEW_KEYS:
+ review[child.tag] = child.text
+ else:
+ self.logger.log('unhandled reviews child tag "{}"'.format(child.tag))
+ self.error = True
+ return review
+
+ @staticmethod
+ def snippet_range_to_dict(range_child):
+ # TODO parse out this data in a dict that will look like what came from json
+ snippet_range = {}
+ for rchild in range_child:
+ if rchild.tag == 'startPointer':
+ start_pointer = {}
+ for start_child in rchild:
+ if start_child.tag in ['offset', 'lineNumber']:
+ start_pointer[start_child.tag] = int(start_child.text)
+ else:
+ start_pointer[start_child.tag] = start_child.text
+ snippet_range[rchild.tag] = start_pointer
+ elif rchild.tag == 'endPointer':
+ end_pointer = {}
+ for end_child in rchild:
+ if end_child.tag in ['offset', 'lineNumber']:
+ end_pointer[end_child.tag] = int(end_child.text)
+ else:
+ end_pointer[end_child.tag] = end_child.text
+ snippet_range[rchild.tag] = end_pointer
+ return snippet_range
+
+ def parse_snippets(self, snippet_node):
+ snippet = {}
+ for child in snippet_node:
+ if child.tag in SNIPPET_KEYS:
+ if child.tag == 'licenseInfoInSnippets':
+ lics_list = snippet.get(child.tag) or []
+ lics_list.append(child.text)
+ snippet[child.tag] = lics_list
+ elif child.tag == 'ranges':
+ ranges = snippet.get(child.tag, [])
+ ranges.append(self.snippet_range_to_dict(child))
+ snippet[child.tag] = ranges
+ else:
+ snippet[child.tag] = child.text
+ else:
+ self.logger.log('unhandled snippets child tag "{}"'.format(child.tag))
+ self.error = True
+ return snippet
+
+ def parse_document(self, doc_node):
+ self.document = Document()
+ reviews = []
+ snippets = []
+ for child in doc_node:
+ if child.tag == 'SPDXID':
+ self.parse_doc_id(child.text)
+ elif child.tag == 'annotations':
+ self.parse_doc_annotations(child)
+ elif child.tag == 'comment':
+ self.parse_doc_comment(child.text)
+ elif child.tag == 'creationInfo':
+ self.parse_creation_info(child)
+ elif child.tag == 'dataLicense':
+ self.parse_doc_data_license(child.text)
+ elif child.tag == 'documentDescribes':
+ self.parse_doc_described_objects(child.text)
+ elif child.tag == 'documentNamespace':
+ self.parse_doc_namespace(child.text)
+ elif child.tag == 'externalDocumentRefs':
+ self.parse_external_document_refs(child)
+ elif child.tag == 'files':
+ self.parse_file(child)
+ elif child.tag == 'hasExtractedLicensingInfos':
+ self.parse_extracted_license_info(child)
+ elif child.tag == 'name':
+ self.parse_doc_name(child.text)
+ elif child.tag == 'packages':
+ self.parse_package(child)
+ elif child.tag == 'relationships':
+ self.parse_relationships(child)
+ elif child.tag == 'reviewers':
+ review = self.parse_reviews(child)
+ if review is not None:
+ reviews.append(review)
+ elif child.tag == 'snippets':
+ snippet = self.parse_snippets(child)
+ if snippet is not None:
+ snippets.append(snippet)
+ elif child.tag == 'spdxVersion':
+ self.parse_doc_version(child.text)
+ else:
+ self.logger.log('unhandled document child tag "{}"'.format(child.tag))
+ self.error = True
+ if len(reviews) > 0:
+ super().parse_reviews(reviews)
+ if len(snippets) > 0:
+ super().parse_snippets(snippets)
+
+ def parse(self, file):
+ self.error = True
+ tree = ET.ElementTree(file=file)
+ root = tree.getroot()
+ if root.tag == 'Document':
+ self.error = False
+ self.parse_document(root)
+ return self.document, self.error
diff --git a/spdx/relationship.py b/spdx/relationship.py
index b0dcbab68..c274ff6b3 100644
--- a/spdx/relationship.py
+++ b/spdx/relationship.py
@@ -62,7 +62,9 @@ class RelationshipType(Enum):
PATCH_FOR = auto()
PREREQUISITE_FOR = auto()
PROVIDED_DEPENDENCY_OF = auto()
+ REQUIREMENT_DESCRIPTION_FOR = auto()
RUNTIME_DEPENDENCY_OF = auto()
+ SPECIFICATION_FOR = auto()
STATIC_LINK = auto()
TEST_CASE_OF = auto()
TEST_DEPENDENCY_OF = auto()
diff --git a/spdx/snippet.py b/spdx/snippet.py
index d299e90f0..c41f02aa5 100644
--- a/spdx/snippet.py
+++ b/spdx/snippet.py
@@ -50,10 +50,14 @@ def __init__(
self.snip_from_file_spdxid = snip_from_file_spdxid
self.conc_lics = conc_lics
self.licenses_in_snippet = []
+ self.ranges = []
def add_lics(self, lics):
self.licenses_in_snippet.append(lics)
+ def add_range(self, ranje): # range is a reserved word.
+ self.ranges.append(ranje)
+
def validate(self, messages):
"""
Validate fields of the snippet and update the messages list with user
diff --git a/spdx/utils.py b/spdx/utils.py
index ca8ab6fef..639f7b22f 100644
--- a/spdx/utils.py
+++ b/spdx/utils.py
@@ -22,9 +22,11 @@ def datetime_iso_format(date):
"""
Return an ISO-8601 representation of a datetime object.
"""
- return "{0:0>4}-{1:0>2}-{2:0>2}T{3:0>2}:{4:0>2}:{5:0>2}Z".format(
- date.year, date.month, date.day, date.hour, date.minute, date.second
- )
+ if isinstance(date, datetime.datetime):
+ return "{0:0>4}-{1:0>2}-{2:0>2}T{3:0>2}:{4:0>2}:{5:0>2}Z".format(
+ date.year, date.month, date.day, date.hour, date.minute, date.second)
+ else:
+ return None
# Matches an iso 8601 date representation
@@ -91,6 +93,7 @@ def __repr__(self):
def __eq__(self, other):
return self.to_value() == other.to_value()
+
class SPDXNone(object):
"""
Represent SPDX None value.
diff --git a/spdx/writers/jsonyamlxml.py b/spdx/writers/jsonyamlxml.py
index faac513dd..a180e019b 100644
--- a/spdx/writers/jsonyamlxml.py
+++ b/spdx/writers/jsonyamlxml.py
@@ -12,6 +12,7 @@
from rdflib import Literal
from spdx import document
+from spdx import utils
class BaseWriter(object):
@@ -22,35 +23,42 @@ class BaseWriter(object):
- document_object: python dictionary representation of the entire spdx.document
"""
- def __init__(self, document):
- self.document = document
+ def __init__(self, dokument):
+ self.document = dokument
self.document_object = dict()
def license(self, license_field):
"""
Return a string representation of a license or spdx.utils special object
"""
- if isinstance(
- license_field, (document.LicenseDisjunction, document.LicenseConjunction)
- ):
+ if isinstance(license_field, (document.LicenseDisjunction, document.LicenseConjunction)):
return "({})".format(license_field)
-
- if isinstance(license_field, document.License):
+ elif isinstance(license_field, document.License):
license_str = license_field.identifier.__str__()
+ elif isinstance(license_field, utils.SPDXNone):
+ pass
else:
license_str = license_field.__str__()
return license_str
- def checksum(self, checksum_field):
+ def checksum_to_dict(self, checksum_field):
"""
Return a dictionary representation of a spdx.checksum.Algorithm object
"""
- checksum_object = dict()
- checksum_object["algorithm"] = (
- "checksumAlgorithm_" + checksum_field.identifier.lower()
- )
- checksum_object["checksumValue"] = checksum_field.value
- return checksum_object
+ #checksum_object = {'algorithm': "checksumAlgorithm_" + checksum_field.identifier.lower(),
+ # 'checksumValue': checksum_field.value}
+ #return checksum_object
+ return {'algorithm': checksum_field.identifier, 'checksumValue': checksum_field.value}
+
+ def annotation_to_dict(self, annotation):
+ ad = {'annotationDate': annotation.annotation_date,
+ 'annotationType': annotation.annotation_type,
+ 'annotator': annotation.annotator,
+ 'comment': annotation.comment,
+ }
+ if annotation.spdx_id is not None:
+ ad['SPDXID'] = annotation.spdx_id
+ return ad
def spdx_id(self, spdx_id_field):
return spdx_id_field.__str__().split("#")[-1]
@@ -92,19 +100,13 @@ def __init__(self, document):
def package_verification_code(self, package):
"""
- Represent the package verification code information as
- as python dictionary
+ Represent the package verification code information as python dictionary
"""
-
- package_verification_code_object = dict()
-
- package_verification_code_object["packageVerificationCodeValue"] = package.verif_code
-
+ package_verification_code_object = {"packageVerificationCodeValue": package.verif_code}
if package.verif_exc_files:
package_verification_code_object[
"packageVerificationCodeExcludedFiles"
] = package.verif_exc_files
-
return package_verification_code_object
def create_package_info(self, package):
@@ -112,15 +114,16 @@ def create_package_info(self, package):
package_object["SPDXID"] = self.spdx_id(package.spdx_id)
package_object["name"] = package.name
package_object["downloadLocation"] = package.download_location.__str__()
- package_object["packageVerificationCode"] = self.package_verification_code(
- package
- )
- package_object["licenseConcluded"] = self.license(package.conc_lics)
- package_object["licenseInfoFromFiles"] = list(
- map(self.license, package.licenses_from_files)
- )
- package_object["licenseDeclared"] = self.license(package.license_declared)
- package_object["copyrightText"] = package.cr_text.__str__()
+ if package.files_analyzed:
+ package_object["packageVerificationCode"] = self.package_verification_code(package)
+ if not isinstance(package.conc_lics, utils.SPDXNone):
+ package_object["licenseConcluded"] = self.license(package.conc_lics) # TODO
+ if package.are_files_analyzed and len(package.licenses_from_files) > 0:
+ package_object["licenseInfoFromFiles"] = list(map(self.license, package.licenses_from_files))
+ if not isinstance(package.license_declared, utils.SPDXNone):
+ package_object["licenseDeclared"] = self.license(package.license_declared) # TODO
+ if package.has_optional_field('cr_text'):
+ package_object["copyrightText"] = package.cr_text.__str__()
if package.has_optional_field("version"):
package_object["versionInfo"] = package.version
@@ -143,9 +146,10 @@ def create_package_info(self, package):
if package.has_optional_field("originator"):
package_object["originator"] = package.originator.__str__()
- if package.has_optional_field("check_sum"):
- package_object["checksums"] = [self.checksum(package.check_sum)]
- package_object["sha1"] = package.check_sum.value
+ package_object["checksums"] = []
+ for ident, value in package.checksums.items():
+ if ident is not None and value is not None:
+ package_object["checksums"].append({'algorithm': ident, 'checksumValue': value})
if package.has_optional_field("description"):
package_object["description"] = package.description
@@ -156,6 +160,36 @@ def create_package_info(self, package):
if package.has_optional_field("homepage"):
package_object["homepage"] = package.homepage.__str__()
+ if package.has_files is not None and len(package.has_files) > 0:
+ package_object['hasFiles'] = package.has_files
+
+ package_object['filesAnalyzed'] = package.are_files_analyzed
+
+ '''
+ new package attributes need to be added, I think.
+
+ self.annotations = []
+ self.primary_purpose = None
+ self.built_date = None
+ self.release_date = None
+ self.valid_until_date = None
+ '''
+
+ if len(package.annotations) > 0:
+ package_object['annotations'] = [self.annotation_to_dict(annotation) for annotation in package.annotations]
+
+ if package.has_optional_field('primary_purpose'):
+ package_object['primaryPackagePurpose'] = package.primary_purpose
+
+ if package.has_optional_field('built_date'):
+ package_object['builtDate'] = package.built_date
+
+ if package.has_optional_field('release_date'):
+ package_object['releaseDate'] = package.release_date
+
+ if package.has_optional_field('valid_until_date'):
+ package_object['validUntilDate'] = package.valid_until_date
+
return package_object
@@ -182,64 +216,63 @@ def create_artifact_info(self, file):
return artifact_of_objects
- def create_file_info(self, package):
- file_types = {
- 1: "fileType_source",
- 2: "fileType_binary",
- 3: "fileType_archive",
- 4: "fileType_other",
- }
- file_objects = []
- files = package.files
+ def create_file_info(self, file):
+ file_object = dict()
- for file in files:
- file_object = dict()
+ file_object["fileName"] = file.name
+ file_object["SPDXID"] = self.spdx_id(file.spdx_id)
+ file_object["checksums"] = []
+ for ident, value in file.checksums.items():
+ if ident is not None and value is not None:
+ file_object["checksums"].append({'algorithm': ident, 'checksumValue': value})
- file_object["name"] = file.name
- file_object["SPDXID"] = self.spdx_id(file.spdx_id)
- file_object["checksums"] = [self.checksum(file.chk_sum)]
- file_object["licenseConcluded"] = self.license(file.conc_lics)
- file_object["licenseInfoFromFiles"] = list(
- map(self.license, file.licenses_in_file)
- )
- file_object["copyrightText"] = file.copyright.__str__()
- file_object["sha1"] = file.chk_sum.value
+ file_object["licenseConcluded"] = self.license(file.conc_lics)
+ file_object["licenseInfoInFiles"] = list(
+ map(self.license, file.licenses_in_file)
+ )
+ if file.copyright is not None:
+ file_object["copyrightText"] = file.copyright
+ file_object["sha1"] = file.get_checksum('SHA1')
- if file.has_optional_field("comment"):
- file_object["comment"] = file.comment
+ if file.has_optional_field("comment"):
+ file_object["comment"] = file.comment
- if file.has_optional_field("type"):
- file_object["fileTypes"] = [file_types.get(file.type)]
+ if file.has_optional_field("file_types"):
+ types = []
+ for file_type in file.file_types:
+ types.append(file_type.name)
+ file_object["fileTypes"] = types
- if file.has_optional_field("license_comment"):
- file_object["licenseComments"] = file.license_comment
+ if file.has_optional_field("license_comment"):
+ file_object["licenseComments"] = file.license_comment
- if file.has_optional_field("attribution_text"):
- file_object["attributionTexts"] = [file.attribution_text]
+ if file.has_optional_field("attribution_text"):
+ file_object["attributionTexts"] = [file.attribution_text]
- if file.has_optional_field("notice"):
- file_object["noticeText"] = file.notice
+ if file.has_optional_field("notice"):
+ file_object["noticeText"] = file.notice
- if file.contributors:
- file_object["fileContributors"] = file.contributors.__str__()
+ if file.contributors:
+ file_object["fileContributors"] = file.contributors
- if file.dependencies:
- file_object["fileDependencies"] = file.dependencies
+ if file.dependencies:
+ file_object["fileDependencies"] = file.dependencies
- valid_artifacts = (
- file.artifact_of_project_name
- and len(file.artifact_of_project_name)
- == len(file.artifact_of_project_home)
- and len(file.artifact_of_project_home)
- == len(file.artifact_of_project_uri)
- )
+ if len(file.annotations) > 0:
+ file_object['annotations'] = [self.annotation_to_dict(annotation) for annotation in file.annotations]
- if valid_artifacts:
- file_object["artifactOf"] = self.create_artifact_info(file)
+ valid_artifacts = (
+ file.artifact_of_project_name
+ and len(file.artifact_of_project_name)
+ == len(file.artifact_of_project_home)
+ and len(file.artifact_of_project_home)
+ == len(file.artifact_of_project_uri)
+ )
- file_objects.append({"File": file_object})
+ if valid_artifacts:
+ file_object["artifactOf"] = self.create_artifact_info(file)
- return file_objects
+ return file_object
class ReviewInfoWriter(BaseWriter):
@@ -285,9 +318,13 @@ def create_annotation_info(self):
for annotation in self.document.annotations:
annotation_object = dict()
- annotation_object["SPDXID"] = self.spdx_id(annotation.spdx_id)
+ if annotation.spdx_id is not None:
+ annotation_object["SPDXID"] = self.spdx_id(annotation.spdx_id)
annotation_object["annotator"] = annotation.annotator.__str__()
- annotation_object["annotationDate"] = annotation.annotation_date_iso_format
+ if annotation.annotation_date_iso_format is not None:
+ annotation_object["annotationDate"] = annotation.annotation_date_iso_format
+ else:
+ annotation_object["annotationDate"] = annotation.annotation_date
annotation_object["annotationType"] = annotation.annotation_type
annotation_object["comment"] = annotation.comment
@@ -337,25 +374,29 @@ def create_snippet_info(self):
for snippet in snippets:
snippet_object = dict()
snippet_object["SPDXID"] = self.spdx_id(snippet.spdx_id)
+ if snippet.has_optional_field("comment"):
+ snippet_object["comment"] = snippet.comment
snippet_object["copyrightText"] = snippet.copyright
- snippet_object["fileId"] = self.spdx_id(snippet.snip_from_file_spdxid)
+ if snippet.has_optional_field("license_comment"):
+ snippet_object["licenseComments"] = snippet.license_comment
snippet_object["licenseConcluded"] = self.license(snippet.conc_lics)
- snippet_object["licenseInfoFromSnippet"] = list(
- map(self.license, snippet.licenses_in_snippet)
- )
-
+ snippet_object["licenseInfoInSnippets"] = list(map(self.license, snippet.licenses_in_snippet))
if snippet.has_optional_field("name"):
snippet_object["name"] = snippet.name
+ ranges = []
+ for ranje in snippet.ranges:
+ ranges.append(ranje)
+ snippet_object['ranges'] = ranges
+
+ snippet_object["snippetFromFile"] = self.spdx_id(snippet.snip_from_file_spdxid)
+
+
+
- if snippet.has_optional_field("comment"):
- snippet_object["comment"] = snippet.comment
if snippet.has_optional_field("attribution_text"):
snippet_object["attributionTexts"] = [snippet.attribution_text]
- if snippet.has_optional_field("license_comment"):
- snippet_object["licenseComments"] = snippet.license_comment
-
snippet_info_objects.append(snippet_object)
return snippet_info_objects
@@ -401,10 +442,10 @@ def create_extracted_license(self):
if extracted_license.cross_ref:
if isinstance(extracted_license.cross_ref, Literal):
extracted_license_object[
- "seeAlso"
+ "seeAlsos"
] = extracted_license.cross_ref.toPython()
else:
- extracted_license_object["seeAlso"] = extracted_license.cross_ref
+ extracted_license_object["seeAlsos"] = extracted_license.cross_ref
if extracted_license.comment:
if isinstance(extracted_license.comment, Literal):
@@ -453,7 +494,7 @@ def create_ext_document_references(self):
"spdxDocument"
] = ext_document_reference.spdx_document_uri
- ext_document_reference_object["checksum"] = self.checksum(
+ ext_document_reference_object["checksum"] = self.checksum_to_dict(
ext_document_reference.check_sum
)
@@ -463,7 +504,6 @@ def create_ext_document_references(self):
def create_document(self):
self.document_object = dict()
-
self.document_object["spdxVersion"] = self.document.version.__str__()
self.document_object["documentNamespace"] = self.document.namespace.__str__()
self.document_object["creationInfo"] = self.create_creation_info()
@@ -474,10 +514,20 @@ def create_document(self):
package_objects = []
for package in self.document.packages:
package_info_object = self.create_package_info(package)
- package_info_object["files"] = self.create_file_info(package)
- package_objects.append({"Package": package_info_object})
+ package_objects.append(package_info_object)
+
+ file_objects = []
+ for file in self.document.files:
+ file_info_object = self.create_file_info(file)
+ file_objects.append(file_info_object)
+
+ if len(self.document.describes) > 0:
+ self.document_object["documentDescribes"] = self.document.describes
- self.document_object["documentDescribes"] = package_objects
+ if len(package_objects) > 0:
+ self.document_object['packages'] = package_objects
+ if len(file_objects) > 0:
+ self.document_object['files'] = file_objects
if self.document.has_comment:
self.document_object["comment"] = self.document.comment
@@ -504,4 +554,4 @@ def create_document(self):
if self.document.relationships:
self.document_object["relationships"] = self.create_relationship_info()
- return {"Document": self.document_object}
+ return self.document_object
diff --git a/spdx/writers/rdf.py b/spdx/writers/rdf.py
index b5bb6a458..0e7f862e7 100644
--- a/spdx/writers/rdf.py
+++ b/spdx/writers/rdf.py
@@ -17,7 +17,7 @@
from rdflib import RDFS
from rdflib import URIRef
from rdflib.compare import to_isomorphic
-
+from spdx import checksum
from spdx import file
from spdx import document
from spdx import config
@@ -27,6 +27,7 @@
import warnings
+
class BaseWriter(object):
"""
Base class for all Writer classes.
@@ -40,23 +41,24 @@ def __init__(self, document, out):
self.spdx_namespace = Namespace("http://spdx.org/rdf/terms#")
self.graph = Graph()
- def create_checksum_node(self, chksum):
+ def create_checksum_node(self, ident, value):
"""
Return a node representing spdx.checksum.
"""
+ algo = checksum.CHECKSUM_ALGORITHM_TO_XML_DICT.get(ident) or 'checksumAlgorithm_sha1'
chksum_node = BNode()
type_triple = (chksum_node, RDF.type, self.spdx_namespace.Checksum)
self.graph.add(type_triple)
algorithm_triple = (
chksum_node,
self.spdx_namespace.algorithm,
- Literal(chksum.identifier),
+ Literal('http://spdx.org/rdf/terms#' + algo),
)
self.graph.add(algorithm_triple)
value_triple = (
chksum_node,
self.spdx_namespace.checksumValue,
- Literal(chksum.value),
+ Literal(value),
)
self.graph.add(value_triple)
return chksum_node
@@ -227,13 +229,6 @@ class FileWriter(LicenseWriter):
Write spdx.file.File
"""
- FILE_TYPES = {
- file.FileType.SOURCE: "fileType_source",
- file.FileType.OTHER: "fileType_other",
- file.FileType.BINARY: "fileType_binary",
- file.FileType.ARCHIVE: "fileType_archive",
- }
-
def __init__(self, document, out):
super(FileWriter, self).__init__(document, out)
@@ -254,18 +249,20 @@ def create_file_node(self, doc_file):
comment_triple = (file_node, RDFS.comment, Literal(doc_file.comment))
self.graph.add(comment_triple)
- if doc_file.has_optional_field("type"):
- ftype = self.spdx_namespace[self.FILE_TYPES[doc_file.type]]
- ftype_triple = (file_node, self.spdx_namespace.fileType, ftype)
- self.graph.add(ftype_triple)
+ if doc_file.has_optional_field("file_types"):
+ for f_type in doc_file.file_types:
+ ftype = self.spdx_namespace[file.FILE_TYPE_TO_XML_DICT[f_type]]
+ ftype_triple = (file_node, self.spdx_namespace.fileType, ftype)
+ self.graph.add(ftype_triple)
- self.graph.add(
- (
- file_node,
- self.spdx_namespace.checksum,
- self.create_checksum_node(doc_file.chk_sum),
+ for ident, value in doc_file.checksums.items():
+ self.graph.add(
+ (
+ file_node,
+ self.spdx_namespace.checksum,
+ self.create_checksum_node(ident, value),
+ )
)
- )
conc_lic_node = self.license_or_special(doc_file.conc_lics)
conc_lic_triple = (
@@ -647,7 +644,8 @@ def create_external_document_ref_node(self, ext_document_references):
doc_uri_triple = (ext_doc_ref_node, self.spdx_namespace.spdxDocument, doc_uri)
self.graph.add(doc_uri_triple)
- checksum_node = self.create_checksum_node(ext_document_references.check_sum)
+ checksum_node = self.create_checksum_node(ext_document_references.check_sum.identifier,
+ ext_document_references.check_sum.value)
self.graph.add((ext_doc_ref_node, self.spdx_namespace.checksum, checksum_node))
return ext_doc_ref_node
@@ -754,7 +752,7 @@ def handle_pkg_optional_fields(self, package, package_node):
)
if package.has_optional_field("check_sum"):
- checksum_node = self.create_checksum_node(package.check_sum)
+ checksum_node = self.create_checksum_node(package.check_sum.identifier, package.check_sum.value)
self.graph.add((package_node, self.spdx_namespace.checksum, checksum_node))
if package.has_optional_field("homepage"):
diff --git a/spdx/writers/tagvalue.py b/spdx/writers/tagvalue.py
index 7ffd80d4b..1f43dd222 100644
--- a/spdx/writers/tagvalue.py
+++ b/spdx/writers/tagvalue.py
@@ -12,7 +12,7 @@
from itertools import zip_longest
from spdx import document
-from spdx import file as spdx_file
+from spdx import file
from spdx.parsers.loggers import ErrorMessages
@@ -98,13 +98,7 @@ def write_relationship(relationship_term, out):
def write_file_type(ftype, out):
- VALUES = {
- spdx_file.FileType.SOURCE: "SOURCE",
- spdx_file.FileType.OTHER: "OTHER",
- spdx_file.FileType.BINARY: "BINARY",
- spdx_file.FileType.ARCHIVE: "ARCHIVE",
- }
- write_value("FileType", VALUES[ftype], out)
+ write_value("FileType", ftype.name, out)
def write_file(spdx_file, out):
@@ -115,9 +109,11 @@ def write_file(spdx_file, out):
write_value("FileName", spdx_file.name, out)
if spdx_file.spdx_id:
write_value("SPDXID", spdx_file.spdx_id, out)
- if spdx_file.has_optional_field("type"):
- write_file_type(spdx_file.type, out)
- write_value("FileChecksum", spdx_file.chk_sum.to_tv(), out)
+ for file_type in spdx_file.file_types:
+ write_file_type(file_type, out)
+ for ident, value in spdx_file.checksums.items():
+ if ident is not None and value is not None:
+ write_value("FileChecksum", "{0}: {1}".format(ident, value), out)
if isinstance(
spdx_file.conc_lics, (document.LicenseConjunction, document.LicenseDisjunction)
):
@@ -225,8 +221,8 @@ def write_package(package, out):
if package.has_optional_field("originator"):
write_value("PackageOriginator", package.originator, out)
- if package.has_optional_field("check_sum"):
- write_value("PackageChecksum", package.check_sum.to_tv(), out)
+ for ident, value in package.checksums.items():
+ write_value("PackageChecksum", "{0}: {1}".format(ident, value), out)
if package.has_optional_field("verif_code"):
write_value("PackageVerificationCode", format_verif_code(package), out)
diff --git a/spdx/writers/xml.py b/spdx/writers/xml.py
index 43e28f8cf..ac5d2d344 100644
--- a/spdx/writers/xml.py
+++ b/spdx/writers/xml.py
@@ -9,22 +9,251 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import xmltodict
+import xml.etree.ElementTree as ET
+from spdx import creationinfo, file
+from spdx.checksum import CHECKSUM_ALGORITHM_TO_XML_DICT
+from spdx.utils import NoAssert, SPDXNone
from spdx.writers.tagvalue import InvalidDocumentError
-from spdx.writers.jsonyamlxml import Writer
from spdx.parsers.loggers import ErrorMessages
-def write_document(document, out, validate=True):
+def add_not_empty(parent, element_name, element_value):
+ if element_value is not None:
+ ET.SubElement(parent, element_name).text = str(element_value)
+
+
+def add_checksum(parent, tag, ident, value):
+ checksum_element = ET.SubElement(parent, tag)
+ ET.SubElement(checksum_element, 'checksumValue').text = value
+ algo = CHECKSUM_ALGORITHM_TO_XML_DICT.get(ident) or 'checksumAlgorithm_sha1'
+ ET.SubElement(checksum_element, 'algorithm').text = algo
+
+
+def add_license(parent, tag, new_license):
+ license_text = None
+ if isinstance(new_license, NoAssert):
+ license_text = new_license.to_value()
+ elif isinstance(new_license, SPDXNone):
+ license_text = 'NONE'
+ else:
+ license_text = new_license.identifier
+ ET.SubElement(parent, tag).text = license_text
+
+
+def add_version(parent, tag, version):
+ ET.SubElement(parent, tag).text = '{}.{}'.format(version.major, version.minor)
+
+
+def add_pkg_external_reference(parent, ext_ref):
+ ext_ref_element = ET.SubElement(parent, 'externalRefs')
+ add_not_empty(ext_ref_element, 'referenceCategory', ext_ref.category)
+ add_not_empty(ext_ref_element, 'referenceLocator', ext_ref.locator)
+ add_not_empty(ext_ref_element, 'referenceType', ext_ref.pkg_ext_ref_type)
+ add_not_empty(ext_ref_element, 'comment', ext_ref.comment)
+
+
+def add_annotation(parent, annotation):
+ annotation_element = ET.SubElement(parent, 'annotations')
+ add_not_empty(annotation_element, 'annotationDate', annotation.annotation_date)
+ add_not_empty(annotation_element, 'annotationType', annotation.annotation_type)
+ add_not_empty(annotation_element, 'annotator', annotation.annotator)
+ add_not_empty(annotation_element, 'comment', annotation.comment)
+ add_not_empty(annotation_element, 'SPDXID', annotation.spdx_id)
+
+def write_document(document, out, validate=True):
if validate:
messages = ErrorMessages()
messages = document.validate(messages)
if messages:
raise InvalidDocumentError(messages)
- writer = Writer(document)
- document_object = {"SpdxDocument": writer.create_document()}
+ doc_element = ET.Element('Document')
+ add_not_empty(doc_element, 'SPDXID', document.spdx_id)
+ add_not_empty(doc_element, 'spdxVersion', str(document.version))
+ # creationInfo
+ creation_info_element = ET.SubElement(doc_element, 'creationInfo')
+ add_not_empty(creation_info_element, 'comment', document.creation_info.comment)
+ for creator in document.creation_info.creators:
+ if isinstance(creator, creationinfo.Tool):
+ ET.SubElement(creation_info_element, 'creators').text = creator.to_value()
+ elif isinstance(creator, creationinfo.Person):
+ ET.SubElement(creation_info_element, 'creators').text = creator.to_value()
+ elif isinstance(creator, creationinfo.Organization):
+ ET.SubElement(creation_info_element, 'creators').text = creator.to_value()
+ add_not_empty(creation_info_element, 'created', document.creation_info.created_iso_format)
+ if document.creation_info.license_list_version is not None:
+ add_version(creation_info_element, 'licenseListVersion', document.creation_info.license_list_version)
+ #
+ add_not_empty(doc_element, 'name', document.name)
+ add_not_empty(doc_element, 'dataLicense', document.data_license.identifier)
+ add_not_empty(doc_element, 'comment', document.comment)
+ # externalDocumentRefs
+ for externalDocumentRef in document.ext_document_references:
+ external_document_refs_element = ET.SubElement(doc_element, 'externalDocumentRefs')
+ add_checksum(external_document_refs_element, 'checksum', externalDocumentRef.check_sum.identifier,
+ externalDocumentRef.check_sum.value)
+ add_not_empty(external_document_refs_element, 'spdxDocument', externalDocumentRef.spdx_document_uri)
+ add_not_empty(external_document_refs_element, 'externalDocumentId', externalDocumentRef.external_document_id)
+ # hasExtractedLicensingInfos
+ for extractedLicense in document.extracted_licenses:
+ extracted_licensing_infos_element = ET.SubElement(doc_element, 'hasExtractedLicensingInfos')
+ add_not_empty(extracted_licensing_infos_element, 'extractedText', extractedLicense.text)
+ add_not_empty(extracted_licensing_infos_element, 'comment', extractedLicense.comment)
+ add_not_empty(extracted_licensing_infos_element, 'licenseId', extractedLicense.identifier)
+ add_not_empty(extracted_licensing_infos_element, 'name', extractedLicense.full_name)
+ for see_also in extractedLicense.cross_ref:
+ add_not_empty(extracted_licensing_infos_element, 'seeAlsos', see_also)
+ # annotations
+ for annotation in document.annotations:
+ add_annotation(doc_element, annotation)
+ # documentDescribes
+ for d in document.describes:
+ add_not_empty(doc_element, 'documentDescribes', d)
+ add_not_empty(doc_element, 'documentNamespace', document.namespace)
+
+ # packages
+ for package in document.packages:
+ packages_element = ET.SubElement(doc_element, 'packages')
+ add_not_empty(packages_element, 'SPDXID', package.spdx_id)
+ # annotations
+ for annotation in package.annotations:
+ add_annotation(packages_element, annotation)
+ #
+ add_not_empty(packages_element, 'attributionTexts', package.attribution_text)
+ add_not_empty(packages_element, 'builtDate', package.built_date)
+ # checksums
+ for ident, value in package.checksums.items():
+ add_checksum(packages_element, 'checksums', ident, value)
+ #
+ add_not_empty(packages_element, 'copyrightText', package.cr_text)
+ add_not_empty(packages_element, 'description', package.description)
+ add_not_empty(packages_element, 'downloadLocation', package.download_location)
+ # externalRefs
+ for ext_ref in package.external_references:
+ add_pkg_external_reference(packages_element, ext_ref)
+ # filesAnalyzed
+ if package.files_analyzed is not None:
+ ET.SubElement(packages_element, 'filesAnalyzed').text = 'true' if package.files_analyzed else 'false'
+ add_not_empty(packages_element, 'homepage', package.homepage)
+ add_not_empty(packages_element, 'licenseComments', package.license_comment)
+ if not isinstance(package.conc_lics, SPDXNone):
+ add_license(packages_element, 'licenseConcluded', package.conc_lics)
+ if not isinstance(package.license_declared, SPDXNone):
+ add_license(packages_element, 'licenseDeclared', package.license_declared)
+ for license_from_file in package.licenses_from_files:
+ add_not_empty(packages_element, 'licenseInfoFromFiles', license_from_file.identifier)
+ add_not_empty(packages_element, 'name', package.name)
+ add_not_empty(packages_element, 'originator', package.originator)
+ add_not_empty(packages_element, 'packageFileName', package.file_name)
+ # packageVerificationCode
+ if package.verif_code is not None:
+ package_verification_code_element = ET.SubElement(packages_element, 'packageVerificationCode')
+ add_not_empty(package_verification_code_element, 'packageVerificationCodeValue', package.verif_code)
+ for verif_exc_file in package.verif_exc_files:
+ add_not_empty(package_verification_code_element, 'packageVerificationCodeExcludedFiles', verif_exc_file)
+ # packagePrimaryPurpose
+ for package_primary_purpose in package.primary_purpose:
+ add_not_empty(packages_element, 'primaryPackagePurpose', package_primary_purpose)
+ # this is a weird place for hasFiles -- everything else is more-or-less alphabetic order
+ for package_has_file in package.has_files:
+ add_not_empty(packages_element, 'hasFiles', package_has_file)
+ add_not_empty(packages_element, 'releaseDate', package.release_date)
+ add_not_empty(packages_element, 'sourceInfo', package.source_info)
+ add_not_empty(packages_element, 'summary', package.summary)
+ add_not_empty(packages_element, 'supplier', package.supplier)
+ add_not_empty(packages_element, 'validUntilDate', package.valid_until_date)
+ add_not_empty(packages_element, 'versionInfo', package.version)
+
+ # files
+ for phile in document.files:
+ file_element = ET.SubElement(doc_element, 'files')
+ add_not_empty(file_element, 'SPDXID', phile.spdx_id)
+ # annotations
+ for annotation in phile.annotations:
+ add_annotation(file_element, annotation)
+ # checksums
+ for ident, value in phile.checksums.items():
+ add_checksum(file_element, 'checksums', ident, value)
+ add_not_empty(file_element, 'comment', phile.comment)
+ add_not_empty(file_element, 'copyrightText', phile.copyright)
+ # fileContributors
+ for contributor in phile.contributors:
+ add_not_empty(file_element, 'fileContributors', contributor)
+ add_not_empty(file_element, 'fileName', phile.name)
+ # fileTypes
+ for file_type in phile.file_types:
+ file_type_name = file.FILE_TYPE_TO_XML_DICT.get(file_type)
+ if file_type_name is None:
+ raise RuntimeError('unknown file type {}'.format(file_type))
+ add_not_empty(file_element, 'fileTypes', file_type_name)
+ add_license(file_element, 'licenseConcluded', phile.conc_lics)
+ add_not_empty(file_element, 'licenseComments', phile.license_comment)
+
+ for license_in_file in phile.licenses_in_file:
+ add_license(file_element, 'licenseInfoInFiles', license_in_file)
+
+ add_not_empty(file_element, 'noticeText', phile.notice)
+
+ if len(phile.artifact_of_project_name) > 0 or \
+ len(phile.artifact_of_project_home) > 0 or \
+ len(phile.artifact_of_project_uri) > 0:
+ artifact_of_element = ET.SubElement(file_element, 'artifactOf')
+ for apn in phile.artifact_of_project_name:
+ add_not_empty(artifact_of_element, 'name', apn)
+ for aph in phile.artifact_of_project_home:
+ add_not_empty(artifact_of_element, 'homePage', aph)
+ for apu in phile.artifact_of_project_uri:
+ add_not_empty(artifact_of_element, 'projectUri', apu)
+ for ident, value in phile.checksums.items():
+ add_checksum(file_element, 'checksums', ident, value)
+
+ # snippets
+ for snippet in document.snippet:
+ snippets_element = ET.SubElement(doc_element, 'snippets')
+ add_not_empty(snippets_element, 'comment', snippet.comment)
+ add_not_empty(snippets_element, 'name', snippet.name)
+ add_not_empty(snippets_element, 'copyrightText', snippet.copyright)
+ add_not_empty(snippets_element, 'licenseConcluded', snippet.conc_lics)
+ for license_in_snippet in snippet.licenses_in_snippet:
+ add_not_empty(snippets_element, 'licenseInfoInSnippets', license_in_snippet)
+ add_not_empty(snippets_element, 'licenseComments', snippet.license_comment)
+ add_not_empty(snippets_element, 'SPDXID', snippet.spdx_id)
+ add_not_empty(snippets_element, 'snippetFromFile', snippet.snip_from_file_spdxid)
+ # add the snippet ranges
+ if snippet.ranges is not None and len(snippet.ranges) > 0:
+ for ranje in snippet.ranges:
+ ranges_element = ET.SubElement(snippets_element, 'ranges')
+ end_pointer = ranje.get('endPointer')
+ if end_pointer is not None:
+ end_pointer_element = ET.SubElement(ranges_element, 'endPointer')
+ for k, v in end_pointer.items():
+ add_not_empty(end_pointer_element, k, v)
+ start_pointer = ranje.get('startPointer')
+ if start_pointer is not None:
+ start_pointer_element = ET.SubElement(ranges_element, 'startPointer')
+ for k, v in start_pointer.items():
+ add_not_empty(start_pointer_element, k, v)
+
+
+ # relationships
+ for relationship in document.relationships:
+ relationships_element = ET.SubElement(doc_element, 'relationships')
+ add_not_empty(relationships_element, 'spdxElementId', relationship.spdxelementid)
+ add_not_empty(relationships_element, 'relatedSpdxElement', relationship.relatedspdxelement)
+ add_not_empty(relationships_element, 'relationshipType', relationship.relationshiptype)
+
+ # reviewers
+ for review in document.reviews:
+ reviewers_element = ET.SubElement(doc_element, 'reviewers')
+ add_not_empty(reviewers_element, 'comment', review.comment)
+ add_not_empty(reviewers_element, 'reviewer', review.reviewer) # might not work
+ add_not_empty(reviewers_element, 'reviewDate', review.review_date_iso_format)
+
+ if hasattr(ET, 'indent'):
+ ET.indent(doc_element)
+
+ xml_text = ET.tostring(doc_element)
- xmltodict.unparse(document_object, out, encoding="utf-8", pretty=True)
+ out.write(xml_text.decode())
diff --git a/tests/data/doc_parse/SBOMexpected.json b/tests/data/doc_parse/SBOMexpected.json
index 848d19ab0..a7bce64ad 100644
--- a/tests/data/doc_parse/SBOMexpected.json
+++ b/tests/data/doc_parse/SBOMexpected.json
@@ -63,7 +63,10 @@
},
"copyrightText": "copyright 2004-2020 Example Inc. All Rights Reserved.",
"licenseComment": null,
- "checksum": null,
+ "checksum": {
+ "identifier": "SHA1",
+ "value": "SOME-SHA1"
+ },
"files": [],
"licenseInfoFromFiles": [],
"verificationCode": {
@@ -95,7 +98,10 @@
},
"copyrightText": "Copyright (c) 1996 - 2020, Daniel Stenberg, , and many contributors, see the THANKS file.",
"licenseComment": null,
- "checksum": null,
+ "checksum": {
+ "identifier": "SHA1",
+ "value": "SOME-SHA1"
+ },
"files": [],
"licenseInfoFromFiles": [],
"verificationCode": {
@@ -127,7 +133,10 @@
},
"copyrightText": "copyright 2004-2020 The OpenSSL Project Authors. All Rights Reserved.",
"licenseComment": null,
- "checksum": null,
+ "checksum": {
+ "identifier": "SHA1",
+ "value": "SOME-SHA1"
+ },
"files": [],
"licenseInfoFromFiles": [],
"verificationCode": {
diff --git a/tests/data/doc_parse/expected.json b/tests/data/doc_parse/expected.json
index 346de7167..dd5325e89 100644
--- a/tests/data/doc_parse/expected.json
+++ b/tests/data/doc_parse/expected.json
@@ -2,11 +2,11 @@
"id": "SPDXRef-DOCUMENT",
"specVersion": {
"major": 2,
- "minor": 1
+ "minor": 3
},
- "documentNamespace": "https://spdx.org/spdxdocs/spdx-example-444504E0-4F89-41D3-9A0C-0305E82C3301",
- "name": "Sample_Document-V2.1",
- "comment": "This is a sample spreadsheet",
+ "documentNamespace": "http://spdx.org/spdxdocs/spdx-example-json-2.3-444504E0-4F89-41D3-9A0C-0305E82C3301",
+ "name": "SPDX-Tools-v2.0",
+ "comment": "This document was created using SPDX 2.0 using licenses from the web site.",
"dataLicense": {
"type": "Single",
"identifier": "CC0-1.0",
@@ -14,211 +14,450 @@
},
"licenseListVersion": {
"major": 3,
- "minor": 6
+ "minor": 17
},
"creators": [
{
- "name": "Gary O'Neall",
+ "name": "ExampleCodeInspect",
"email": null,
- "type": "Person"
+ "type": "Organization"
},
{
- "name": "Source Auditor Inc.",
+ "name": "Jane Doe",
"email": null,
- "type": "Organization"
+ "type": "Person"
},
{
- "name": "SourceAuditor-V1.2",
+ "name": "LicenseFind-1.0",
"type": "Tool"
}
],
- "created": "2010-02-03T00:00:00Z",
- "creatorComment": "This is an example of an SPDX spreadsheet format",
+ "created": "2010-01-29T18:30:22Z",
+ "creatorComment": "This package has been shipped in source and binary form.\nThe binaries were created with gcc 4.5.1 and expect to link to\ncompatible system run time libraries.",
"packages": [
{
+ "annotations": [
+ {
+ "annotation_date": "2011-01-29T18:30:22Z",
+ "annotation_type": "OTHER",
+ "annotator": "Person: Package Commenter",
+ "comment": "Package level annotation"
+ }
+ ],
+ "builtDate": "2011-01-29T18:30:22Z",
+ "checksums": [
+ {
+ "identifier": "BLAKE2b-384",
+ "value": "aaabd89c926ab525c242e6621f2f5fa73aa4afe3d9e24aed727faaadd6af38b620bdb623dd2b4788b1c8086984af8706"
+ },
+ {
+ "identifier": "MD5",
+ "value": "624c1abb3664f4b35547e7c73864ad24"
+ },
+ {
+ "identifier": "SHA1",
+ "value": "85ed0817af83a24ad8da68c2b5094de69833983c"
+ },
+ {
+ "identifier": "SHA256",
+ "value": "11b6d3ee554eedf79299905a98f9b9a04e498210b59f15094c916c91d150efcd"
+ }
+ ],
+ "copyrightText": "Copyright 2008-2010 John Smith",
+ "description": "The GNU C Library defines functions that are specified by the ISO C standard, as well as additional features specific to POSIX and other derivatives of the Unix operating system, and extensions specific to GNU systems.",
+ "downloadLocation": "http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz",
+ "hasFiles": [
+ "SPDXRef-CommonsLangSrc",
+ "SPDXRef-CommonsLangSrc",
+ "SPDXRef-CommonsLangSrc",
+ "SPDXRef-CommonsLangSrc",
+ "SPDXRef-DoapSource",
+ "SPDXRef-DoapSource",
+ "SPDXRef-JenaLib",
+ "SPDXRef-JenaLib",
+ "SPDXRef-JenaLib",
+ "SPDXRef-Specification",
+ "SPDXRef-Specification",
+ "SPDXRef-Specification",
+ "SPDXRef-Specification",
+ "SPDXRef-Specification"
+ ],
+ "homepage": "http://ftp.gnu.org/gnu/glibc",
"id": "SPDXRef-Package",
- "name": "SPDX Translator",
- "packageFileName": "spdxtranslator-1.0.zip",
- "summary": "SPDX Translator utility",
- "description": "This utility translates and SPDX RDF XML document to a spreadsheet, translates a spreadsheet to an SPDX RDF XML document and translates an SPDX RDFa document to an SPDX RDF XML document.",
- "versionInfo": "Version 0.9.2",
- "sourceInfo": "Version 1.0 of the SPDX Translator application",
- "downloadLocation": "http://www.spdx.org/tools",
- "homepage": null,
- "originator": {
- "name": "SPDX",
- "email": null,
- "type": "Organization"
- },
- "supplier": {
- "name": "Linux Foundation",
- "email": null,
- "type": "Organization"
- },
+ "licenseComment": "The license for this project changed with the release of version x.y. The version of the project included here post-dates the license change.",
"licenseConcluded": {
- "type": "Conjunction",
"identifier": [
- "Apache-1.0",
- "Apache-2.0",
- "LicenseRef-1",
- "LicenseRef-2",
- "LicenseRef-3",
- "LicenseRef-4",
- "MPL-1.1"
+ "LGPL-2.0-only",
+ "LicenseRef-3"
],
"name": [
- "Apache License 1.0",
- "Apache License 2.0",
"CyberNeko License",
- "LicenseRef-1",
- "LicenseRef-2",
- "LicenseRef-4",
- "Mozilla Public License 1.1"
- ]
+ "GNU Library General Public License v2 only"
+ ],
+ "type": "Disjunction"
},
"licenseDeclared": {
- "type": "Conjunction",
"identifier": [
- "Apache-2.0",
- "LicenseRef-1",
- "LicenseRef-2",
- "LicenseRef-3",
- "LicenseRef-4",
- "MPL-1.1"
+ "LGPL-2.0-only",
+ "LicenseRef-3"
],
"name": [
- "Apache License 2.0",
"CyberNeko License",
- "LicenseRef-1",
- "LicenseRef-2",
- "LicenseRef-4",
- "Mozilla Public License 1.1"
- ]
- },
- "copyrightText": " Copyright 2010, 2011 Source Auditor Inc.",
- "licenseComment": "The declared license information can be found in the NOTICE file at the root of the archive file",
- "checksum": {
- "identifier": "SHA1",
- "value": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12"
+ "GNU Library General Public License v2 only"
+ ],
+ "type": "Conjunction"
},
- "files": [
+ "licenseInfoFromFiles": [
{
- "id": "SPDXRef-File1",
- "name": "Jenna-2.6.3/jena-2.6.3-sources.jar",
- "type": 3,
- "comment": "This file belongs to Jena",
- "licenseConcluded": {
- "type": "Single",
- "identifier": "LicenseRef-1",
- "name": "LicenseRef-1"
- },
- "copyrightText": "(c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP",
- "licenseComment": "This license is used by Jena",
- "notice": null,
- "checksum": {
- "identifier": "SHA1",
- "value": "3ab4e1c67a2d28fced849ee1bb76e7391b93f125"
- },
- "licenseInfoFromFiles": [
- {
- "type": "Single",
- "identifier": "LicenseRef-1",
- "name": "LicenseRef-1"
- }
- ],
- "contributors": [],
- "dependencies": [],
- "artifactOfProjectName": [
- "Jena"
- ],
- "artifactOfProjectHome": [
- "http://www.openjena.org/"
- ],
- "artifactOfProjectURI": [
- "http://subversion.apache.org/doap.rdf"
- ]
+ "identifier": "GPL-2.0-only",
+ "name": "GNU General Public License v2.0 only",
+ "type": "Single"
},
{
- "id": "SPDXRef-File2",
- "name": "src/org/spdx/parser/DOAPProject.java",
- "type": 1,
- "comment": null,
- "licenseConcluded": {
- "type": "Single",
- "identifier": "Apache-2.0",
- "name": "Apache License 2.0"
- },
- "copyrightText": "Copyright 2010, 2011 Source Auditor Inc.",
- "licenseComment": null,
- "notice": null,
- "checksum": {
- "identifier": "SHA1",
- "value": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12"
- },
- "licenseInfoFromFiles": [
- {
- "type": "Single",
- "identifier": "Apache-2.0",
- "name": "Apache License 2.0"
- }
- ],
- "contributors": [],
- "dependencies": [],
- "artifactOfProjectName": [],
- "artifactOfProjectHome": [],
- "artifactOfProjectURI": []
+ "identifier": "LicenseRef-1",
+ "name": "LicenseRef-1",
+ "type": "Single"
+ },
+ {
+ "identifier": "LicenseRef-2",
+ "name": "LicenseRef-2",
+ "type": "Single"
+ }
+ ],
+ "name": "glibc",
+ "originator": {
+ "email": "contact@example.com",
+ "name": "ExampleCodeInspect",
+ "type": "Organization"
+ },
+ "packageFileName": "glibc-2.11.1.tar.gz",
+ "primaryPurpose": [
+ "SOURCE"
+ ],
+ "releaseDate": null,
+ "sourceInfo": "uses glibc-2_11-branch from git://sourceware.org/git/glibc.git.",
+ "summary": "GNU C library.",
+ "supplier": {
+ "email": "jane.doe@example.com",
+ "name": "Jane Doe",
+ "type": "Person"
+ },
+ "validUntilDate": null,
+ "verificationCode": {
+ "excludedFilesNames": [
+ "./package.spdx"
+ ],
+ "value": "d6a770ba38583ed4bb4525bd96e50461655d2758"
+ },
+ "versionInfo": "2.11.1"
+ },
+ {
+ "annotations": [],
+ "builtDate": null,
+ "checksums": [],
+ "copyrightText": "NOASSERTION",
+ "description": null,
+ "downloadLocation": "NOASSERTION",
+ "hasFiles": [],
+ "homepage": "http://commons.apache.org/proper/commons-lang/",
+ "id": "SPDXRef-fromDoap-1",
+ "licenseComment": null,
+ "licenseConcluded": {
+ "identifier": "NOASSERTION",
+ "name": "NOASSERTION",
+ "type": "Single"
+ },
+ "licenseDeclared": {
+ "identifier": "NOASSERTION",
+ "name": "NOASSERTION",
+ "type": "Single"
+ },
+ "licenseInfoFromFiles": [],
+ "name": "Apache Commons Lang",
+ "originator": null,
+ "packageFileName": null,
+ "primaryPurpose": [],
+ "releaseDate": null,
+ "sourceInfo": null,
+ "summary": null,
+ "supplier": null,
+ "validUntilDate": null,
+ "verificationCode": {
+ "excludedFilesNames": [],
+ "value": null
+ },
+ "versionInfo": null
+ },
+ {
+ "annotations": [],
+ "builtDate": null,
+ "checksums": [],
+ "copyrightText": null,
+ "description": null,
+ "downloadLocation": "https://search.maven.org/remotecontent?filepath=org/apache/jena/apache-jena/3.12.0/apache-jena-3.12.0.tar.gz",
+ "hasFiles": [],
+ "homepage": "http://www.openjena.org/",
+ "id": "SPDXRef-fromDoap-0",
+ "licenseComment": null,
+ "licenseConcluded": null,
+ "licenseDeclared": null,
+ "licenseInfoFromFiles": [],
+ "name": "Jena",
+ "originator": null,
+ "packageFileName": null,
+ "primaryPurpose": [],
+ "releaseDate": null,
+ "sourceInfo": null,
+ "summary": null,
+ "supplier": null,
+ "validUntilDate": null,
+ "verificationCode": {
+ "excludedFilesNames": [],
+ "value": null
+ },
+ "versionInfo": "3.12.0"
+ },
+ {
+ "annotations": [],
+ "builtDate": null,
+ "checksums": [
+ {
+ "identifier": "SHA1",
+ "value": "85ed0817af83a24ad8da68c2b5094de69833983c"
}
],
+ "copyrightText": "Copyright Saxonica Ltd",
+ "description": "The Saxon package is a collection of tools for processing XML documents.",
+ "downloadLocation": "https://sourceforge.net/projects/saxon/files/Saxon-B/8.8.0.7/saxonb8-8-0-7j.zip/download",
+ "hasFiles": [],
+ "homepage": "http://saxon.sourceforge.net/",
+ "id": "SPDXRef-Saxon",
+ "licenseComment": "Other versions available for a commercial license",
+ "licenseConcluded": {
+ "identifier": "MPL-1.0",
+ "name": "Mozilla Public License 1.0",
+ "type": "Single"
+ },
+ "licenseDeclared": {
+ "identifier": "MPL-1.0",
+ "name": "Mozilla Public License 1.0",
+ "type": "Single"
+ },
+ "licenseInfoFromFiles": [],
+ "name": "Saxon",
+ "originator": null,
+ "packageFileName": "saxonB-8.8.zip",
+ "primaryPurpose": [],
+ "releaseDate": null,
+ "sourceInfo": null,
+ "summary": null,
+ "supplier": null,
+ "validUntilDate": null,
+ "verificationCode": {
+ "excludedFilesNames": [],
+ "value": null
+ },
+ "versionInfo": "8.8"
+ }
+ ],
+
+ "files": [
+ {
+ "annotations": [],
+ "checksums": [
+ {
+ "identifier": "SHA1",
+ "value": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12"
+ }
+ ],
+ "comment": null,
+ "contributors": [
+ "Black Duck Software In.c",
+ "Open Logic Inc.",
+ "Protecode Inc.",
+ "SPDX Technical Team Members",
+ "Source Auditor Inc."
+ ],
+ "copyrightText": "Copyright 2010, 2011 Source Auditor Inc.",
+ "dependencies": [],
+ "fileTypes": [
+ 1
+ ],
+ "id": "SPDXRef-DoapSource",
+ "licenseComment": null,
+ "licenseConcluded": {
+ "identifier": "Apache-2.0",
+ "name": "Apache License 2.0",
+ "type": "Single"
+ },
"licenseInfoFromFiles": [
{
- "type": "Single",
- "identifier": "Apache-1.0",
- "name": "Apache License 1.0"
- },
+ "identifier": "Apache-2.0",
+ "name": "Apache License 2.0",
+ "type": "Single"
+ }
+ ],
+ "name": "./src/org/spdx/parser/DOAPProject.java",
+ "notice": null
+ },
+ {
+ "annotations": [],
+ "checksums": [
+ {
+ "identifier": "SHA1",
+ "value": "c2b4e1c67a2d28fced849ee1bb76e7391b93f125"
+ }
+ ],
+ "comment": "This file is used by Jena",
+ "contributors": [
+ "Apache Software Foundation"
+ ],
+ "copyrightText": "Copyright 2001-2011 The Apache Software Foundation",
+ "dependencies": [],
+ "fileTypes": [
+ 3
+ ],
+ "id": "SPDXRef-CommonsLangSrc",
+ "licenseComment": null,
+ "licenseConcluded": {
+ "identifier": "Apache-2.0",
+ "name": "Apache License 2.0",
+ "type": "Single"
+ },
+ "licenseInfoFromFiles": [
{
- "type": "Single",
"identifier": "Apache-2.0",
- "name": "Apache License 2.0"
- },
+ "name": "Apache License 2.0",
+ "type": "Single"
+ }
+ ],
+ "name": "./lib-source/commons-lang3-3.1-sources.jar",
+ "notice": "Apache Commons Lang\nCopyright 2001-2011 The Apache Software Foundation\n\nThis product includes software developed by\nThe Apache Software Foundation (http://www.apache.org/).\n\nThis product includes software from the Spring Framework,\nunder the Apache License 2.0 (see: StringUtils.containsWhitespace())"
+ },
+ {
+ "annotations": [],
+ "checksums": [
+ {
+ "identifier": "SHA1",
+ "value": "3ab4e1c67a2d28fced849ee1bb76e7391b93f125"
+ }
+ ],
+ "comment": "This file belongs to Jena",
+ "contributors": [
+ "Apache Software Foundation",
+ "Hewlett Packard Inc."
+ ],
+ "copyrightText": "(c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP",
+ "dependencies": [],
+ "fileTypes": [
+ 3
+ ],
+ "id": "SPDXRef-JenaLib",
+ "licenseComment": "This license is used by Jena",
+ "licenseConcluded": {
+ "identifier": "LicenseRef-1",
+ "name": "LicenseRef-1",
+ "type": "Single"
+ },
+ "licenseInfoFromFiles": [
{
- "type": "Single",
"identifier": "LicenseRef-1",
- "name": "LicenseRef-1"
- },
+ "name": "LicenseRef-1",
+ "type": "Single"
+ }
+ ],
+ "name": "./lib-source/jena-2.6.3-sources.jar",
+ "notice": null
+ },
+ {
+ "annotations": [],
+ "checksums": [
{
- "type": "Single",
- "identifier": "LicenseRef-2",
- "name": "LicenseRef-2"
- },
+ "identifier": "SHA1",
+ "value": "fff4e1c67a2d28fced849ee1bb76e7391b93f125"
+ }
+ ],
+ "comment": "Specification Documentation",
+ "contributors": [],
+ "copyrightText": null,
+ "dependencies": [],
+ "fileTypes": [
+ 9
+ ],
+ "id": "SPDXRef-Specification",
+ "licenseComment": null,
+ "licenseConcluded": {
+ "identifier": "None",
+ "name": "None",
+ "type": "Single"
+ },
+ "licenseInfoFromFiles": [],
+ "name": "./docs/myspec.pdf",
+ "notice": null
+ },
+ {
+ "annotations": [
{
- "type": "Single",
- "identifier": "LicenseRef-3",
- "name": "CyberNeko License"
+ "annotation_date": "2011-01-29T18:30:22Z",
+ "annotation_type": "OTHER",
+ "annotator": "Person: File Commenter",
+ "comment": "File level annotation"
+ }
+ ],
+ "checksums": [
+ {
+ "identifier": "MD5",
+ "value": "624c1abb3664f4b35547e7c73864ad24"
},
{
- "type": "Single",
- "identifier": "LicenseRef-4",
- "name": "LicenseRef-4"
+ "identifier": "SHA1",
+ "value": "d6a770ba38583ed4bb4525bd96e50461655d2758"
+ }
+ ],
+ "comment": "The concluded license was taken from the package level that the file was included in.\nThis information was found in the COPYING.txt file in the xyz directory.",
+ "contributors": [
+ "IBM Corporation",
+ "Modified by Paul Mundt lethal@linux-sh.org",
+ "The Regents of the University of California"
+ ],
+ "copyrightText": "Copyright 2008-2010 John Smith",
+ "dependencies": [],
+ "fileTypes": [
+ 1
+ ],
+ "id": "SPDXRef-File",
+ "licenseComment": "The concluded license was taken from the package level that the file was included in.",
+ "licenseConcluded": {
+ "identifier": [
+ "LGPL-2.0-only",
+ "LicenseRef-2"
+ ],
+ "name": [
+ "GNU Library General Public License v2 only",
+ "LicenseRef-2"
+ ],
+ "type": "Disjunction"
+ },
+ "licenseInfoFromFiles": [
+ {
+ "identifier": "GPL-2.0-only",
+ "name": "GNU General Public License v2.0 only",
+ "type": "Single"
},
{
- "type": "Single",
- "identifier": "MPL-1.1",
- "name": "Mozilla Public License 1.1"
+ "identifier": "LicenseRef-2",
+ "name": "LicenseRef-2",
+ "type": "Single"
}
],
- "verificationCode": {
- "value": "4e3211c67a2d28fced849ee1bb76e7391b93feba",
- "excludedFilesNames": [
- "SpdxTranslatorSpdx.rdf",
- "SpdxTranslatorSpdx.txt"
- ]
- }
+ "name": "./package/foo.c",
+ "notice": "Copyright (c) 2001 Aaron Lehmann aaroni@vitelus.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: \nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
}
],
"externalDocumentRefs": [
{
- "externalDocumentId": "DocumentRef-spdx-tool-2.1",
- "spdxDocument": "https://spdx.org/spdxdocs/spdx-tools-v2.1-3F2504E0-4F89-41D3-9A0C-0305E82C3301",
+ "externalDocumentId": "DocumentRef-spdx-tool-1.2",
+ "spdxDocument": "http://spdx.org/spdxdocs/spdx-tools-v1.2-3F2504E0-4F89-41D3-9A0C-0305E82C3301",
"checksum": {
"identifier": "SHA1",
"value": "d6a770ba38583ed4bb4525bd96e50461655d2759"
@@ -229,23 +468,23 @@
{
"name": "LicenseRef-1",
"identifier": "LicenseRef-1",
- "text": "/*\n * (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. The name of the author may not be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */",
+ "text": "/*\n * (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. The name of the author may not be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/",
"comment": null,
- "cross_refs": []
+ "seeAlsos": []
},
{
"name": "LicenseRef-2",
"identifier": "LicenseRef-2",
- "text": "This package includes the GRDDL parser developed by Hewlett Packard under the following license:\n\u00a9 Copyright 2007 Hewlett-Packard Development Company, LP\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: \n\nRedistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. \nRedistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. \nThe name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. \nTHIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
+ "text": "This package includes the GRDDL parser developed by Hewlett Packard under the following license:\n\u00a9 Copyright 2007 Hewlett-Packard Development Company, LP\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: \n\nRedistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. \nRedistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. \nThe name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. \nTHIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
"comment": null,
- "cross_refs": []
+ "seeAlsos": []
},
{
"name": "CyberNeko License",
"identifier": "LicenseRef-3",
"text": "The CyberNeko Software License, Version 1.0\n\n \n(C) Copyright 2002-2005, Andy Clark. All rights reserved.\n \nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n\n1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer. \n\n2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in\n the documentation and/or other materials provided with the\n distribution.\n\n3. The end-user documentation included with the redistribution,\n if any, must include the following acknowledgment: \n \"This product includes software developed by Andy Clark.\"\n Alternately, this acknowledgment may appear in the software itself,\n if and wherever such third-party acknowledgments normally appear.\n\n4. The names \"CyberNeko\" and \"NekoHTML\" must not be used to endorse\n or promote products derived from this software without prior \n written permission. For written permission, please contact \n andyc@cyberneko.net.\n\n5. Products derived from this software may not be called \"CyberNeko\",\n nor may \"CyberNeko\" appear in their name, without prior written\n permission of the author.\n\nTHIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED\nWARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\nOF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS\nBE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, \nOR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT \nOF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR \nBUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \nWHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE \nOR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \nEVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
"comment": "This is tye CyperNeko License",
- "cross_refs": [
+ "seeAlsos": [
"http://justasample.url.com",
"http://people.apache.org/~andyc/neko/LICENSE"
]
@@ -253,62 +492,82 @@
{
"name": "LicenseRef-4",
"identifier": "LicenseRef-4",
- "text": "/*\n * (c) Copyright 2009 University of Bristol\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. The name of the author may not be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */ ",
+ "text": "/*\n * (c) Copyright 2009 University of Bristol\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. The name of the author may not be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/",
"comment": null,
- "cross_refs": []
+ "seeAlsos": []
+ },
+ {
+ "name": "Beer-Ware License (Version 42)",
+ "identifier": "LicenseRef-Beerware-4.2",
+ "text": "\"THE BEER-WARE LICENSE\" (Revision 42):\nphk@FreeBSD.ORG wrote this file. As long as you retain this notice you\ncan do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return Poul-Henning Kamp",
+ "comment": "The beerware license has a couple of other standard variants.",
+ "seeAlsos": ["http://people.freebsd.org/~phk/"]
}
],
"annotations": [
{
- "id": "SPDXRef-45",
- "comment": "This is just an example. Some of the non-standard licenses look like they are actually BSD 3 clause licenses",
- "type": "REVIEW",
- "annotator": {
- "name": "Jim Reviewer",
- "email": null,
- "type": "Person"
- },
- "date": "2012-06-13T00:00:00Z"
- }
- ],
- "reviews": [
+ "comment": "Document level annotation",
+ "type": "OTHER",
+ "annotator": "Person: Jane Doe ()",
+ "date": "2010-01-29T18:30:22Z",
+ "spdxid": null
+ },
{
- "comment": "This is just an example. Some of the non-standard licenses look like they are actually BSD 3 clause licenses",
- "reviewer": {
- "name": "Joe Reviewer",
- "email": null,
- "type": "Person"
- },
- "date": "2010-02-10T00:00:00Z"
+ "comment" : "This is just an example. Some of the non-standard licenses look like they are actually BSD 3 clause licenses",
+ "type" : "REVIEW",
+ "annotator" : "Person: Joe Reviewer",
+ "date" : "2010-02-10T00:00:00Z",
+ "spdxid": null
},
{
- "comment": "Another example reviewer.",
- "reviewer": {
- "name": "Suzanne Reviewer",
- "email": null,
- "type": "Person"
- },
- "date": "2011-03-13T00:00:00Z"
+ "comment" : "Another example reviewer.",
+ "type" : "REVIEW",
+ "annotator" : "Person: Suzanne Reviewer",
+ "date" : "2011-03-13T00:00:00Z",
+ "spdxid": null
}
],
+ "reviews": [],
"snippets": [
{
"id": "SPDXRef-Snippet",
"name": "from linux kernel",
- "comment": "This snippet was identified as significant and highlighted in this Apache-2.0 file, when a commercial scanner identified it as being derived from file foo.c in package xyz which is licensed under GPL-2.0-or-later.",
+ "comment": "This snippet was identified as significant and highlighted in this Apache-2.0 file, when a commercial scanner identified it as being derived from file foo.c in package xyz which is licensed under GPL-2.0.",
"copyrightText": "Copyright 2008-2010 John Smith",
"licenseComments": "The concluded license was taken from package xyz, from which the snippet was copied into the current file. The concluded license information was found in the COPYING.txt file in package xyz.",
"fileId": "SPDXRef-DoapSource",
"licenseConcluded": {
"type": "Single",
- "identifier": "Apache-2.0",
- "name": "Apache License 2.0"
+ "identifier": "GPL-2.0-only",
+ "name": "GNU General Public License v2.0 only"
},
- "licenseInfoFromSnippet": [
+ "licenseInfoInSnippet": [
{
"type": "Single",
- "identifier": "Apache-2.0",
- "name": "Apache License 2.0"
+ "identifier": "GPL-2.0-only",
+ "name": "GNU General Public License v2.0 only"
+ }
+ ],
+ "ranges": [
+ {
+ "endPointer": {
+ "offset": 420,
+ "reference": "SPDXRef-DoapSource"
+ },
+ "startPointer": {
+ "offset": 310,
+ "reference": "SPDXRef-DoapSource"
+ }
+ },
+ {
+ "endPointer": {
+ "lineNumber": 23,
+ "reference": "SPDXRef-DoapSource"
+ },
+ "startPointer": {
+ "lineNumber": 5,
+ "reference": "SPDXRef-DoapSource"
+ }
}
]
}
diff --git a/tests/data/doc_parse/spdx-expected.json b/tests/data/doc_parse/spdx-expected.json
index 3514bfcc6..6a0a6f26a 100644
--- a/tests/data/doc_parse/spdx-expected.json
+++ b/tests/data/doc_parse/spdx-expected.json
@@ -105,7 +105,6 @@
{
"id": "https://spdx.org/spdxdocs/spdx-example-444504E0-4F89-41D3-9A0C-0305E82C3301#SPDXRef-File1",
"name": "Jenna-2.6.3/jena-2.6.3-sources.jar",
- "type": 3,
"comment": "This file belongs to Jena",
"licenseConcluded": {
"type": "Single",
@@ -113,12 +112,16 @@
"name": "LicenseRef-1"
},
"copyrightText": "(c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP",
+ "fileTypes": [3, 4],
"licenseComment": "This license is used by Jena",
"notice": null,
- "checksum": {
+ "checksums": [{
"identifier": "SHA1",
"value": "3ab4e1c67a2d28fced849ee1bb76e7391b93f125"
- },
+ },{
+ "identifier": "SHA256",
+ "value": "3ab4e1c67a2d28fced849ee1bb76e7391b93f1250000000000000000"
+ }],
"licenseInfoFromFiles": [
{
"type": "Single",
@@ -139,7 +142,6 @@
{
"id": "https://spdx.org/spdxdocs/spdx-example-444504E0-4F89-41D3-9A0C-0305E82C3301#SPDXRef-File2",
"name": "src/org/spdx/parser/DOAPProject.java",
- "type": 1,
"comment": null,
"licenseConcluded": {
"type": "Single",
@@ -147,12 +149,17 @@
"name": "Apache License 2.0"
},
"copyrightText": "Copyright 2010, 2011 Source Auditor Inc.",
+ "fileTypes": [1, 8],
"licenseComment": null,
"notice": null,
- "checksum": {
+ "checksums": [{
"identifier": "SHA1",
"value": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12"
- },
+ },{
+ "identifier": "SHA256",
+ "value": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb120000000000000000"
+ }
+ ],
"licenseInfoFromFiles": [
{
"type": "Single",
@@ -302,7 +309,7 @@
"identifier": "Apache-2.0",
"name": "Apache License 2.0"
},
- "licenseInfoFromSnippet": [
+ "licenseInfoInSnippet": [
{
"type": "Single",
"identifier": "Apache-2.0",
diff --git a/tests/data/doc_write/json-simple-plus.json b/tests/data/doc_write/json-simple-plus.json
index 11e0929e4..5ce2e41c6 100644
--- a/tests/data/doc_write/json-simple-plus.json
+++ b/tests/data/doc_write/json-simple-plus.json
@@ -5,20 +5,31 @@
"name": "Sample_Document-V2.1",
"SPDXID": "SPDXRef-DOCUMENT",
"documentNamespace": "https://spdx.org/spdxdocs/spdx-example-444504E0-4F89-41D3-9A0C-0305E82C3301",
+ "creationInfo": {
+ "creators": [
+ "Organization: SPDX"
+ ],
+ "created": "2021-11-15T00:00:00Z",
+ "licenseListVersion": "3.6"
+ },
"documentDescribes": [
{
"Package": {
- "SPDXID": "SPDXRef-Package",
+ "SPDXID": "SPDXRef-Package",
"name": "some/path",
"downloadLocation": "NOASSERTION",
- "copyrightText": "Some copyrught",
+ "copyrightText": "Some copyright",
"packageVerificationCode": {
"packageVerificationCodeValue": "SOME code"
},
"checksums": [
{
- "algorithm": "checksumAlgorithm_sha1",
+ "algorithm": "SHA1",
"checksumValue": "SOME-SHA1"
+ },
+ {
+ "algorithm": "SHA256",
+ "checksumValue": "SOME-SHA256"
}
],
"licenseDeclared": "NOASSERTION",
@@ -30,12 +41,17 @@
"SPDXID": "SPDXRef-File",
"checksums": [
{
- "algorithm": "checksumAlgorithm_sha1",
+ "algorithm": "SHA1",
"checksumValue": "SOME-SHA1"
+ },
+ {
+ "algorithm": "SHA256",
+ "checksumValue": "SOME-SHA256"
}
],
"licenseConcluded": "NOASSERTION",
"copyrightText": "NOASSERTION",
+ "fileTypes": ["OTHER", "SOURCE"],
"licenseInfoFromFiles": ["LGPL-2.1-or-later"],
"sha1": "SOME-SHA1"
}
diff --git a/tests/data/doc_write/json-simple.json b/tests/data/doc_write/json-simple.json
index 246a0cacb..98dc2a84c 100644
--- a/tests/data/doc_write/json-simple.json
+++ b/tests/data/doc_write/json-simple.json
@@ -11,14 +11,18 @@
"SPDXID": "SPDXRef-Package",
"name": "some/path",
"downloadLocation": "NOASSERTION",
- "copyrightText": "Some copyrught",
+ "copyrightText": "Some copyright",
"packageVerificationCode": {
"packageVerificationCodeValue": "SOME code"
},
"checksums": [
{
- "algorithm": "checksumAlgorithm_sha1",
+ "algorithm": "SHA1",
"checksumValue": "SOME-SHA1"
+ },
+ {
+ "algorithm": "SHA256",
+ "checksumValue": "SOME-SHA256"
}
],
"licenseDeclared": "NOASSERTION",
@@ -30,12 +34,17 @@
"SPDXID": "SPDXRef-File",
"checksums": [
{
- "algorithm": "checksumAlgorithm_sha1",
+ "algorithm": "SHA1",
"checksumValue": "SOME-SHA1"
+ },
+ {
+ "algorithm": "SHA256",
+ "checksumValue": "SOME-SHA256"
}
],
"licenseConcluded": "NOASSERTION",
"copyrightText": "NOASSERTION",
+ "fileTypes": ["OTHER", "SOURCE"],
"licenseInfoFromFiles": ["LGPL-2.1-only"],
"sha1": "SOME-SHA1"
}
diff --git a/tests/data/doc_write/rdf-simple-plus.json b/tests/data/doc_write/rdf-simple-plus.json
index 5f84b380f..2930d0096 100644
--- a/tests/data/doc_write/rdf-simple-plus.json
+++ b/tests/data/doc_write/rdf-simple-plus.json
@@ -25,10 +25,10 @@
"ns1:licenseConcluded": {
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
},
- "ns1:copyrightText": "Some copyrught",
+ "ns1:copyrightText": "Some copyright",
"ns1:checksum": {
"ns1:Checksum": {
- "ns1:algorithm": "SHA1",
+ "ns1:algorithm": "http://spdx.org/rdf/terms#checksumAlgorithm_sha1",
"ns1:checksumValue": "SOME-SHA1"
}
}
@@ -45,15 +45,26 @@
"ns1:File": {
"@rdf:about": "http://www.spdx.org/files#SPDXRef-File",
"ns1:fileName": "./some/path/tofile",
- "ns1:checksum": {
- "ns1:Checksum": {
- "ns1:checksumValue": "SOME-SHA1",
- "ns1:algorithm": "SHA1"
+ "ns1:checksum": [
+ {
+ "ns1:Checksum": {
+ "ns1:checksumValue": "SOME-SHA1",
+ "ns1:algorithm": "http://spdx.org/rdf/terms#checksumAlgorithm_sha1"
+ }
+ }, {
+ "ns1:Checksum": {
+ "ns1:checksumValue": "SOME-SHA256",
+ "ns1:algorithm": "http://spdx.org/rdf/terms#checksumAlgorithm_sha256"
+ }
}
- },
+ ],
"ns1:licenseConcluded": {
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
- },
+ },
+ "ns1:fileType": [
+ {"@rdf:resource": "http://spdx.org/rdf/terms#fileType_other"},
+ {"@rdf:resource": "http://spdx.org/rdf/terms#fileType_source"}
+ ],
"ns1:copyrightText": {
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
},
diff --git a/tests/data/doc_write/rdf-simple.json b/tests/data/doc_write/rdf-simple.json
index 7327c703f..0fc5b7d6f 100644
--- a/tests/data/doc_write/rdf-simple.json
+++ b/tests/data/doc_write/rdf-simple.json
@@ -25,10 +25,10 @@
"ns1:licenseConcluded": {
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
},
- "ns1:copyrightText": "Some copyrught",
+ "ns1:copyrightText": "Some copyright",
"ns1:checksum": {
"ns1:Checksum": {
- "ns1:algorithm": "SHA1",
+ "ns1:algorithm": "http://spdx.org/rdf/terms#checksumAlgorithm_sha1",
"ns1:checksumValue": "SOME-SHA1"
}
}
@@ -47,15 +47,26 @@
"ns1:licenseInfoInFile": {
"@rdf:resource": "http://spdx.org/licenses/LGPL-2.1-only"
},
- "ns1:checksum": {
- "ns1:Checksum": {
- "ns1:checksumValue": "SOME-SHA1",
- "ns1:algorithm": "SHA1"
+ "ns1:checksum": [
+ {
+ "ns1:Checksum": {
+ "ns1:checksumValue": "SOME-SHA1",
+ "ns1:algorithm": "http://spdx.org/rdf/terms#checksumAlgorithm_sha1"
+ }
+ }, {
+ "ns1:Checksum": {
+ "ns1:checksumValue": "SOME-SHA256",
+ "ns1:algorithm": "http://spdx.org/rdf/terms#checksumAlgorithm_sha256"
}
- },
+ }
+ ],
"ns1:licenseConcluded": {
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
- },
+ },
+ "ns1:fileType": [
+ {"@rdf:resource": "http://spdx.org/rdf/terms#fileType_other"},
+ {"@rdf:resource": "http://spdx.org/rdf/terms#fileType_source"}
+ ],
"ns1:copyrightText": {
"@rdf:resource": "http://spdx.org/rdf/terms#noassertion"
},
diff --git a/tests/data/doc_write/tv-simple-plus.tv b/tests/data/doc_write/tv-simple-plus.tv
index 865ec15be..28aadbf7f 100644
--- a/tests/data/doc_write/tv-simple-plus.tv
+++ b/tests/data/doc_write/tv-simple-plus.tv
@@ -10,15 +10,19 @@ PackageName: some/path
SPDXID: SPDXRef-Package
PackageDownloadLocation: NOASSERTION
PackageChecksum: SHA1: SOME-SHA1
+PackageChecksum: SHA256: SOME-SHA256
PackageVerificationCode: SOME code
PackageLicenseDeclared: NOASSERTION
PackageLicenseConcluded: NOASSERTION
PackageLicenseInfoFromFiles: LGPL-2.1-or-later
-PackageCopyrightText: Some copyrught
+PackageCopyrightText: Some copyright
# File
FileName: ./some/path/tofile
SPDXID: SPDXRef-File
+FileType: OTHER
+FileType: SOURCE
FileChecksum: SHA1: SOME-SHA1
+FileChecksum: SHA256: SOME-SHA256
LicenseConcluded: NOASSERTION
LicenseInfoInFile: LGPL-2.1-or-later
FileCopyrightText: NOASSERTION
diff --git a/tests/data/doc_write/tv-simple.tv b/tests/data/doc_write/tv-simple.tv
index a8d09c5c6..98ad17f00 100644
--- a/tests/data/doc_write/tv-simple.tv
+++ b/tests/data/doc_write/tv-simple.tv
@@ -10,15 +10,19 @@ PackageName: some/path
SPDXID: SPDXRef-Package
PackageDownloadLocation: NOASSERTION
PackageChecksum: SHA1: SOME-SHA1
+PackageChecksum: SHA256: SOME-SHA256
PackageVerificationCode: SOME code
PackageLicenseDeclared: NOASSERTION
PackageLicenseConcluded: NOASSERTION
PackageLicenseInfoFromFiles: LGPL-2.1-only
-PackageCopyrightText: Some copyrught
+PackageCopyrightText: Some copyright
# File
FileName: ./some/path/tofile
SPDXID: SPDXRef-File
+FileType: OTHER
+FileType: SOURCE
FileChecksum: SHA1: SOME-SHA1
+FileChecksum: SHA256: SOME-SHA256
LicenseConcluded: NOASSERTION
LicenseInfoInFile: LGPL-2.1-only
FileCopyrightText: NOASSERTION
diff --git a/tests/data/doc_write/xml-simple-plus.xml b/tests/data/doc_write/xml-simple-plus.xml
index b69c29f79..d0629817a 100644
--- a/tests/data/doc_write/xml-simple-plus.xml
+++ b/tests/data/doc_write/xml-simple-plus.xml
@@ -11,7 +11,7 @@
SPDXRef-Package
some/path
NOASSERTION
- Some copyrught
+ Some copyright
SOME code
@@ -21,19 +21,23 @@
NOASSERTION
NOASSERTION
-
-
- ./some/path/tofile
- SPDXRef-File
-
- SOME-SHA1
- checksumAlgorithm_sha1
-
- NOASSERTION
- NOASSERTION
- LGPL-2.1-or-later
- SOME-SHA1
-
+
+ ./some/path/tofile
+ SPDXRef-File
+
+ SOME-SHA1
+ checksumAlgorithm_sha1
+
+
+ SOME-SHA256
+ checksumAlgorithm_sha256
+
+ NOASSERTION
+ NOASSERTION
+ LGPL-2.1-or-later
+ SOME-SHA1
+ fileType_other
+ fileType_source
LGPL-2.1-or-later
SOME-SHA1
diff --git a/tests/data/doc_write/xml-simple.xml b/tests/data/doc_write/xml-simple.xml
index 2eb292fe8..9d21f5977 100644
--- a/tests/data/doc_write/xml-simple.xml
+++ b/tests/data/doc_write/xml-simple.xml
@@ -11,7 +11,7 @@
SPDXRef-Package
some/path
NOASSERTION
- Some copyrught
+ Some copyright
SOME code
@@ -21,19 +21,23 @@
NOASSERTION
NOASSERTION
-
-
- ./some/path/tofile
- SPDXRef-File
-
- SOME-SHA1
- checksumAlgorithm_sha1
-
- NOASSERTION
- NOASSERTION
- LGPL-2.1-only
- SOME-SHA1
-
+
+ ./some/path/tofile
+ SPDXRef-File
+
+ SOME-SHA1
+ checksumAlgorithm_sha1
+
+
+ SOME-SHA256
+ checksumAlgorithm_sha256
+
+ NOASSERTION
+ NOASSERTION
+ LGPL-2.1-only
+ SOME-SHA1
+ fileType_other
+ fileType_source
LGPL-2.1-only
SOME-SHA1
diff --git a/tests/data/doc_write/yaml-simple-plus.yaml b/tests/data/doc_write/yaml-simple-plus.yaml
index 9858c8167..7479a459e 100644
--- a/tests/data/doc_write/yaml-simple-plus.yaml
+++ b/tests/data/doc_write/yaml-simple-plus.yaml
@@ -10,23 +10,30 @@ Document:
SPDXID: "SPDXRef-Package"
name: "some/path"
downloadLocation: "NOASSERTION"
- copyrightText: "Some copyrught"
+ copyrightText: "Some copyright"
packageVerificationCode:
packageVerificationCodeValue: "SOME code"
checksums:
- - algorithm: "checksumAlgorithm_sha1"
- checksumValue: "SOME-SHA1"
+ - algorithm: "SHA1"
+ checksumValue: "SOME-SHA1"
+ - algorithm: "SHA256"
+ checksumValue: "SOME-SHA256"
licenseDeclared: "NOASSERTION"
licenseConcluded: "NOASSERTION"
files:
- File:
name: "./some/path/tofile"
SPDXID: "SPDXRef-File"
- checksums:
- - algorithm: "checksumAlgorithm_sha1"
- checksumValue: "SOME-SHA1"
+ checksums:
+ - algorithm: "SHA1"
+ checksumValue: "SOME-SHA1"
+ - algorithm: "SHA256"
+ checksumValue: "SOME-SHA256"
licenseConcluded: "NOASSERTION"
copyrightText: "NOASSERTION"
+ fileTypes:
+ - "OTHER"
+ - "SOURCE"
licenseInfoFromFiles:
- "LGPL-2.1-or-later"
sha1: "SOME-SHA1"
diff --git a/tests/data/doc_write/yaml-simple.yaml b/tests/data/doc_write/yaml-simple.yaml
index b4946b70f..de1e82bc7 100644
--- a/tests/data/doc_write/yaml-simple.yaml
+++ b/tests/data/doc_write/yaml-simple.yaml
@@ -10,23 +10,30 @@ Document:
SPDXID: "SPDXRef-Package"
name: "some/path"
downloadLocation: "NOASSERTION"
- copyrightText: "Some copyrught"
+ copyrightText: "Some copyright"
packageVerificationCode:
packageVerificationCodeValue: "SOME code"
checksums:
- - algorithm: "checksumAlgorithm_sha1"
- checksumValue: "SOME-SHA1"
+ - algorithm: "SHA1"
+ checksumValue: "SOME-SHA1"
+ - algorithm: "SHA256"
+ checksumValue: "SOME-SHA256"
licenseDeclared: "NOASSERTION"
licenseConcluded: "NOASSERTION"
files:
- File:
name: "./some/path/tofile"
SPDXID: "SPDXRef-File"
- checksums:
- - algorithm: "checksumAlgorithm_sha1"
- checksumValue: "SOME-SHA1"
+ checksums:
+ - algorithm: "SHA1"
+ checksumValue: "SOME-SHA1"
+ - algorithm: "SHA256"
+ checksumValue: "SOME-SHA256"
licenseConcluded: "NOASSERTION"
copyrightText: "NOASSERTION"
+ fileTypes:
+ - "OTHER"
+ - "SOURCE"
licenseInfoFromFiles:
- "LGPL-2.1-only"
sha1: "SOME-SHA1"
diff --git a/tests/data/formats/SPDXJsonExample.json b/tests/data/formats/SPDXJSONExample-V2.1.spdx.json
similarity index 94%
rename from tests/data/formats/SPDXJsonExample.json
rename to tests/data/formats/SPDXJSONExample-V2.1.spdx.json
index 0dbce19a4..8bbbee68e 100644
--- a/tests/data/formats/SPDXJsonExample.json
+++ b/tests/data/formats/SPDXJSONExample-V2.1.spdx.json
@@ -28,12 +28,17 @@
"licenseComments": "This license is used by Jena",
"checksums": [
{
- "checksumValue": "3ab4e1c67a2d28fced849ee1bb76e7391b93f125",
- "algorithm": "checksumAlgorithm_sha1"
+ "checksumValue": "3ab4e1c67a2d28fced849ee1bb76e7391b93f125",
+ "algorithm": "SHA1"
+ },
+ {
+ "checksumValue": "3ab4e1c67a2d28fced849ee1bb76e7391b93f1250000000000000000",
+ "algorithm": "SHA256"
}
- ],
+ ],
"fileTypes": [
- "fileType_archive"
+ "ARCHIVE",
+ "OTHER"
],
"SPDXID": "SPDXRef-File1"
}
@@ -49,12 +54,17 @@
"licenseConcluded": "Apache-2.0",
"checksums": [
{
- "checksumValue": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12",
- "algorithm": "checksumAlgorithm_sha1"
+ "checksumValue": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12",
+ "algorithm": "SHA1"
+ },
+ {
+ "checksumValue": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb120000000000000000",
+ "algorithm": "SHA256"
}
- ],
+ ],
"fileTypes": [
- "fileType_source"
+ "SOURCE",
+ "TEXT"
],
"SPDXID": "SPDXRef-File2"
}
@@ -113,7 +123,7 @@
{
"checksum": {
"checksumValue": "d6a770ba38583ed4bb4525bd96e50461655d2759",
- "algorithm": "checksumAlgorithm_sha1"
+ "algorithm": "SHA1"
},
"spdxDocument": "https://spdx.org/spdxdocs/spdx-tools-v2.1-3F2504E0-4F89-41D3-9A0C-0305E82C3301",
"externalDocumentId": "DocumentRef-spdx-tool-2.1"
@@ -211,7 +221,7 @@
"name": "from linux kernel",
"copyrightText": "Copyright 2008-2010 John Smith",
"licenseConcluded": "Apache-2.0",
- "licenseInfoFromSnippet": [
+ "licenseInfoInSnippet": [
"Apache-2.0"
],
"licenseComments": "The concluded license was taken from package xyz, from which the snippet was copied into the current file. The concluded license information was found in the COPYING.txt file in package xyz.",
diff --git a/tests/data/formats/SPDXJSONExample-v2.2.spdx.json b/tests/data/formats/SPDXJSONExample-v2.2.spdx.json
new file mode 100644
index 000000000..386c78035
--- /dev/null
+++ b/tests/data/formats/SPDXJSONExample-v2.2.spdx.json
@@ -0,0 +1,277 @@
+{
+ "SPDXID" : "SPDXRef-DOCUMENT",
+ "spdxVersion" : "SPDX-2.2",
+ "creationInfo" : {
+ "comment" : "This package has been shipped in source and binary form.\nThe binaries were created with gcc 4.5.1 and expect to link to\ncompatible system run time libraries.",
+ "created" : "2010-01-29T18:30:22Z",
+ "creators" : [ "Tool: LicenseFind-1.0", "Organization: ExampleCodeInspect ()", "Person: Jane Doe ()" ],
+ "licenseListVersion" : "3.9"
+ },
+ "name" : "SPDX-Tools-v2.0",
+ "dataLicense" : "CC0-1.0",
+ "comment" : "This document was created using SPDX 2.0 using licenses from the web site.",
+ "externalDocumentRefs" : [ {
+ "externalDocumentId" : "DocumentRef-spdx-tool-1.2",
+ "checksum" : {
+ "algorithm" : "SHA1",
+ "checksumValue" : "d6a770ba38583ed4bb4525bd96e50461655d2759"
+ },
+ "spdxDocument" : "http://spdx.org/spdxdocs/spdx-tools-v1.2-3F2504E0-4F89-41D3-9A0C-0305E82C3301"
+ } ],
+ "hasExtractedLicensingInfos" : [ {
+ "extractedText" : "\"THE BEER-WARE LICENSE\" (Revision 42):\nphk@FreeBSD.ORG wrote this file. As long as you retain this notice you\ncan do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return Poul-Henning Kamp \nLicenseName: Beer-Ware License (Version 42)\nLicenseCrossReference: http://people.freebsd.org/~phk/\nLicenseComment: \nThe beerware license has a couple of other standard variants.",
+ "licenseId" : "LicenseRef-Beerware-4.2"
+ }, {
+ "extractedText" : "/*\n * (c) Copyright 2009 University of Bristol\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. The name of the author may not be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/",
+ "licenseId" : "LicenseRef-4"
+ }, {
+ "comment" : "This is tye CyperNeko License",
+ "extractedText" : "The CyberNeko Software License, Version 1.0\n\n \n(C) Copyright 2002-2005, Andy Clark. All rights reserved.\n \nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n\n1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer. \n\n2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in\n the documentation and/or other materials provided with the\n distribution.\n\n3. The end-user documentation included with the redistribution,\n if any, must include the following acknowledgment: \n \"This product includes software developed by Andy Clark.\"\n Alternately, this acknowledgment may appear in the software itself,\n if and wherever such third-party acknowledgments normally appear.\n\n4. The names \"CyberNeko\" and \"NekoHTML\" must not be used to endorse\n or promote products derived from this software without prior \n written permission. For written permission, please contact \n andyc@cyberneko.net.\n\n5. Products derived from this software may not be called \"CyberNeko\",\n nor may \"CyberNeko\" appear in their name, without prior written\n permission of the author.\n\nTHIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED\nWARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\nOF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS\nBE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, \nOR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT \nOF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR \nBUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \nWHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE \nOR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \nEVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
+ "licenseId" : "LicenseRef-3",
+ "name" : "CyberNeko License",
+ "seeAlsos" : [ "http://people.apache.org/~andyc/neko/LICENSE", "http://justasample.url.com" ]
+ }, {
+ "extractedText" : "This package includes the GRDDL parser developed by Hewlett Packard under the following license:\n� Copyright 2007 Hewlett-Packard Development Company, LP\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: \n\nRedistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. \nRedistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. \nThe name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. \nTHIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
+ "licenseId" : "LicenseRef-2"
+ }, {
+ "extractedText" : "/*\n * (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. The name of the author may not be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/",
+ "licenseId" : "LicenseRef-1"
+ } ],
+ "annotations" : [ {
+ "annotationDate" : "2010-01-29T18:30:22Z",
+ "annotationType" : "OTHER",
+ "annotator" : "Person: Jane Doe ()",
+ "comment" : "Document level annotation"
+ }, {
+ "annotationDate" : "2011-03-13T00:00:00Z",
+ "annotationType" : "REVIEW",
+ "annotator" : "Person: Suzanne Reviewer",
+ "comment" : "Another example reviewer."
+ }, {
+ "annotationDate" : "2010-02-10T00:00:00Z",
+ "annotationType" : "REVIEW",
+ "annotator" : "Person: Joe Reviewer",
+ "comment" : "This is just an example. Some of the non-standard licenses look like they are actually BSD 3 clause licenses"
+ } ],
+ "documentNamespace" : "http://spdx.org/spdxdocs/spdx-example-json-2.2-444504E0-4F89-41D3-9A0C-0305E82C3301",
+ "documentDescribes" : [ "SPDXRef-File", "SPDXRef-Package" ],
+ "packages" : [ {
+ "SPDXID" : "SPDXRef-Package",
+ "annotations" : [ {
+ "annotationDate" : "2011-01-29T18:30:22Z",
+ "annotationType" : "OTHER",
+ "annotator" : "Person: Package Commenter",
+ "comment" : "Package level annotation"
+ } ],
+ "attributionTexts" : [ "The GNU C Library is free software. See the file COPYING.LIB for copying conditions, and LICENSES for notices about a few contributions that require these additional notices to be distributed. License copyright years may be listed using range notation, e.g., 1996-2015, indicating that every year in the range, inclusive, is a copyrightable year that would otherwise be listed individually." ],
+ "checksums" : [ {
+ "algorithm" : "SHA1",
+ "checksumValue" : "85ed0817af83a24ad8da68c2b5094de69833983c"
+ }, {
+ "algorithm" : "MD5",
+ "checksumValue" : "624c1abb3664f4b35547e7c73864ad24"
+ }, {
+ "algorithm" : "SHA256",
+ "checksumValue" : "11b6d3ee554eedf79299905a98f9b9a04e498210b59f15094c916c91d150efcd"
+ } ],
+ "copyrightText" : "Copyright 2008-2010 John Smith",
+ "description" : "The GNU C Library defines functions that are specified by the ISO C standard, as well as additional features specific to POSIX and other derivatives of the Unix operating system, and extensions specific to GNU systems.",
+ "downloadLocation" : "http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz",
+ "externalRefs" : [ {
+ "comment" : "This is the external ref for Acme",
+ "referenceCategory" : "OTHER",
+ "referenceLocator" : "acmecorp/acmenator/4.1.3-alpha",
+ "referenceType" : "http://spdx.org/spdxdocs/spdx-example-444504E0-4F89-41D3-9A0C-0305E82C3301#LocationRef-acmeforge"
+ }, {
+ "referenceCategory" : "SECURITY",
+ "referenceLocator" : "cpe:2.3:a:pivotal_software:spring_framework:4.1.0:*:*:*:*:*:*:*",
+ "referenceType" : "http://spdx.org/rdf/references/cpe23Type"
+ } ],
+ "filesAnalyzed" : true,
+ "hasFiles" : [ "SPDXRef-JenaLib", "SPDXRef-DoapSource", "SPDXRef-CommonsLangSrc" ],
+ "homepage" : "http://ftp.gnu.org/gnu/glibc",
+ "licenseComments" : "The license for this project changed with the release of version x.y. The version of the project included here post-dates the license change.",
+ "licenseConcluded" : "(LGPL-2.0-only OR LicenseRef-3)",
+ "licenseDeclared" : "(LGPL-2.0-only AND LicenseRef-3)",
+ "licenseInfoFromFiles" : [ "GPL-2.0-only", "LicenseRef-2", "LicenseRef-1" ],
+ "name" : "glibc",
+ "originator" : "Organization: ExampleCodeInspect (contact@example.com)",
+ "packageFileName" : "glibc-2.11.1.tar.gz",
+ "packageVerificationCode" : {
+ "packageVerificationCodeExcludedFiles" : [ "./package.spdx" ],
+ "packageVerificationCodeValue" : "d6a770ba38583ed4bb4525bd96e50461655d2758"
+ },
+ "sourceInfo" : "uses glibc-2_11-branch from git://sourceware.org/git/glibc.git.",
+ "summary" : "GNU C library.",
+ "supplier" : "Person: Jane Doe (jane.doe@example.com)",
+ "versionInfo" : "2.11.1"
+ }, {
+ "SPDXID" : "SPDXRef-fromDoap-1",
+ "comment" : "This package was converted from a DOAP Project by the same name",
+ "copyrightText" : "NOASSERTION",
+ "downloadLocation" : "NOASSERTION",
+ "filesAnalyzed" : false,
+ "homepage" : "http://commons.apache.org/proper/commons-lang/",
+ "licenseConcluded" : "NOASSERTION",
+ "licenseDeclared" : "NOASSERTION",
+ "name" : "Apache Commons Lang"
+ }, {
+ "SPDXID" : "SPDXRef-fromDoap-0",
+ "comment" : "This package was converted from a DOAP Project by the same name",
+ "copyrightText" : "NOASSERTION",
+ "downloadLocation" : "NOASSERTION",
+ "filesAnalyzed" : false,
+ "homepage" : "http://www.openjena.org/",
+ "licenseConcluded" : "NOASSERTION",
+ "licenseDeclared" : "NOASSERTION",
+ "name" : "Jena"
+ }, {
+ "SPDXID" : "SPDXRef-Saxon",
+ "checksums" : [ {
+ "algorithm" : "SHA1",
+ "checksumValue" : "85ed0817af83a24ad8da68c2b5094de69833983c"
+ } ],
+ "copyrightText" : "Copyright Saxonica Ltd",
+ "description" : "The Saxon package is a collection of tools for processing XML documents.",
+ "downloadLocation" : "https://sourceforge.net/projects/saxon/files/Saxon-B/8.8.0.7/saxonb8-8-0-7j.zip/download",
+ "filesAnalyzed" : false,
+ "homepage" : "http://saxon.sourceforge.net/",
+ "licenseComments" : "Other versions available for a commercial license",
+ "licenseConcluded" : "MPL-1.0",
+ "licenseDeclared" : "MPL-1.0",
+ "name" : "Saxon",
+ "packageFileName" : "saxonB-8.8.zip",
+ "versionInfo" : "8.8"
+ } ],
+ "files" : [ {
+ "SPDXID" : "SPDXRef-DoapSource",
+ "checksums" : [ {
+ "algorithm" : "SHA1",
+ "checksumValue" : "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12"
+ } ],
+ "copyrightText" : "Copyright 2010, 2011 Source Auditor Inc.",
+ "fileContributors" : [ "Protecode Inc.", "SPDX Technical Team Members", "Open Logic Inc.", "Source Auditor Inc.", "Black Duck Software In.c" ],
+ "fileName" : "./src/org/spdx/parser/DOAPProject.java",
+ "fileTypes" : [ "SOURCE" ],
+ "licenseConcluded" : "Apache-2.0",
+ "licenseInfoInFiles" : [ "Apache-2.0" ]
+ }, {
+ "SPDXID" : "SPDXRef-CommonsLangSrc",
+ "checksums" : [ {
+ "algorithm" : "SHA1",
+ "checksumValue" : "c2b4e1c67a2d28fced849ee1bb76e7391b93f125"
+ } ],
+ "comment" : "This file is used by Jena",
+ "copyrightText" : "Copyright 2001-2011 The Apache Software Foundation",
+ "fileContributors" : [ "Apache Software Foundation" ],
+ "fileName" : "./lib-source/commons-lang3-3.1-sources.jar",
+ "fileTypes" : [ "ARCHIVE" ],
+ "licenseConcluded" : "Apache-2.0",
+ "licenseInfoInFiles" : [ "Apache-2.0" ],
+ "noticeText" : "Apache Commons Lang\nCopyright 2001-2011 The Apache Software Foundation\n\nThis product includes software developed by\nThe Apache Software Foundation (http://www.apache.org/).\n\nThis product includes software from the Spring Framework,\nunder the Apache License 2.0 (see: StringUtils.containsWhitespace())"
+ }, {
+ "SPDXID" : "SPDXRef-JenaLib",
+ "checksums" : [ {
+ "algorithm" : "SHA1",
+ "checksumValue" : "3ab4e1c67a2d28fced849ee1bb76e7391b93f125"
+ } ],
+ "comment" : "This file belongs to Jena",
+ "copyrightText" : "(c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP",
+ "fileContributors" : [ "Apache Software Foundation", "Hewlett Packard Inc." ],
+ "fileName" : "./lib-source/jena-2.6.3-sources.jar",
+ "fileTypes" : [ "ARCHIVE" ],
+ "licenseComments" : "This license is used by Jena",
+ "licenseConcluded" : "LicenseRef-1",
+ "licenseInfoInFiles" : [ "LicenseRef-1" ]
+ }, {
+ "SPDXID" : "SPDXRef-File",
+ "annotations" : [ {
+ "annotationDate" : "2011-01-29T18:30:22Z",
+ "annotationType" : "OTHER",
+ "annotator" : "Person: File Commenter",
+ "comment" : "File level annotation"
+ } ],
+ "checksums" : [ {
+ "algorithm" : "MD5",
+ "checksumValue" : "624c1abb3664f4b35547e7c73864ad24"
+ }, {
+ "algorithm" : "SHA1",
+ "checksumValue" : "d6a770ba38583ed4bb4525bd96e50461655d2758"
+ } ],
+ "comment" : "The concluded license was taken from the package level that the file was included in.\nThis information was found in the COPYING.txt file in the xyz directory.",
+ "copyrightText" : "Copyright 2008-2010 John Smith",
+ "fileContributors" : [ "The Regents of the University of California", "Modified by Paul Mundt lethal@linux-sh.org", "IBM Corporation" ],
+ "fileName" : "./package/foo.c",
+ "fileTypes" : [ "SOURCE" ],
+ "licenseComments" : "The concluded license was taken from the package level that the file was included in.",
+ "licenseConcluded" : "(LGPL-2.0-only OR LicenseRef-2)",
+ "licenseInfoInFiles" : [ "GPL-2.0-only", "LicenseRef-2" ],
+ "noticeText" : "Copyright (c) 2001 Aaron Lehmann aaroni@vitelus.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the �Software�), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: \nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED �AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
+ } ],
+ "snippets" : [ {
+ "SPDXID" : "SPDXRef-Snippet",
+ "comment" : "This snippet was identified as significant and highlighted in this Apache-2.0 file, when a commercial scanner identified it as being derived from file foo.c in package xyz which is licensed under GPL-2.0.",
+ "copyrightText" : "Copyright 2008-2010 John Smith",
+ "licenseComments" : "The concluded license was taken from package xyz, from which the snippet was copied into the current file. The concluded license information was found in the COPYING.txt file in package xyz.",
+ "licenseConcluded" : "GPL-2.0-only",
+ "licenseInfoInSnippets" : [ "GPL-2.0-only" ],
+ "name" : "from linux kernel",
+ "ranges" : [ {
+ "endPointer" : {
+ "lineNumber" : 23,
+ "reference" : "SPDXRef-DoapSource"
+ },
+ "startPointer" : {
+ "lineNumber" : 5,
+ "reference" : "SPDXRef-DoapSource"
+ }
+ }, {
+ "endPointer" : {
+ "offset" : 420,
+ "reference" : "SPDXRef-DoapSource"
+ },
+ "startPointer" : {
+ "offset" : 310,
+ "reference" : "SPDXRef-DoapSource"
+ }
+ } ],
+ "snippetFromFile" : "SPDXRef-DoapSource"
+ } ],
+ "relationships" : [ {
+ "spdxElementId" : "SPDXRef-DOCUMENT",
+ "relatedSpdxElement" : "SPDXRef-Package",
+ "relationshipType" : "CONTAINS"
+ }, {
+ "spdxElementId" : "SPDXRef-DOCUMENT",
+ "relatedSpdxElement" : "SPDXRef-File",
+ "relationshipType" : "DESCRIBES"
+ }, {
+ "spdxElementId" : "SPDXRef-DOCUMENT",
+ "relatedSpdxElement" : "DocumentRef-spdx-tool-1.2:SPDXRef-ToolsElement",
+ "relationshipType" : "COPY_OF"
+ }, {
+ "spdxElementId" : "SPDXRef-DOCUMENT",
+ "relatedSpdxElement" : "SPDXRef-Package",
+ "relationshipType" : "DESCRIBES"
+ }, {
+ "spdxElementId" : "SPDXRef-Package",
+ "relatedSpdxElement" : "SPDXRef-Saxon",
+ "relationshipType" : "DYNAMIC_LINK"
+ }, {
+ "spdxElementId" : "SPDXRef-Package",
+ "relatedSpdxElement" : "SPDXRef-JenaLib",
+ "relationshipType" : "CONTAINS"
+ }, {
+ "spdxElementId" : "SPDXRef-CommonsLangSrc",
+ "relatedSpdxElement" : "NOASSERTION",
+ "relationshipType" : "GENERATED_FROM"
+ }, {
+ "spdxElementId" : "SPDXRef-JenaLib",
+ "relatedSpdxElement" : "SPDXRef-Package",
+ "relationshipType" : "CONTAINS"
+ }, {
+ "spdxElementId" : "SPDXRef-File",
+ "relatedSpdxElement" : "SPDXRef-fromDoap-0",
+ "relationshipType" : "GENERATED_FROM"
+ } ]
+}
\ No newline at end of file
diff --git a/tests/data/formats/SPDXJSONExample-v2.3.spdx.json b/tests/data/formats/SPDXJSONExample-v2.3.spdx.json
new file mode 100644
index 000000000..bd90c0ff6
--- /dev/null
+++ b/tests/data/formats/SPDXJSONExample-v2.3.spdx.json
@@ -0,0 +1,289 @@
+{
+ "SPDXID" : "SPDXRef-DOCUMENT",
+ "spdxVersion" : "SPDX-2.3",
+ "creationInfo" : {
+ "comment" : "This package has been shipped in source and binary form.\nThe binaries were created with gcc 4.5.1 and expect to link to\ncompatible system run time libraries.",
+ "created" : "2010-01-29T18:30:22Z",
+ "creators" : [ "Tool: LicenseFind-1.0", "Organization: ExampleCodeInspect ()", "Person: Jane Doe ()" ],
+ "licenseListVersion" : "3.17"
+ },
+ "name" : "SPDX-Tools-v2.0",
+ "dataLicense" : "CC0-1.0",
+ "comment" : "This document was created using SPDX 2.0 using licenses from the web site.",
+ "externalDocumentRefs" : [ {
+ "externalDocumentId" : "DocumentRef-spdx-tool-1.2",
+ "checksum" : {
+ "algorithm" : "SHA1",
+ "checksumValue" : "d6a770ba38583ed4bb4525bd96e50461655d2759"
+ },
+ "spdxDocument" : "http://spdx.org/spdxdocs/spdx-tools-v1.2-3F2504E0-4F89-41D3-9A0C-0305E82C3301"
+ } ],
+ "hasExtractedLicensingInfos" : [ {
+ "licenseId" : "LicenseRef-1",
+ "extractedText" : "/*\n * (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. The name of the author may not be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/"
+ }, {
+ "licenseId" : "LicenseRef-2",
+ "extractedText" : "This package includes the GRDDL parser developed by Hewlett Packard under the following license:\n© Copyright 2007 Hewlett-Packard Development Company, LP\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: \n\nRedistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. \nRedistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. \nThe name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. \nTHIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ }, {
+ "licenseId" : "LicenseRef-4",
+ "extractedText" : "/*\n * (c) Copyright 2009 University of Bristol\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. The name of the author may not be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/"
+ }, {
+ "licenseId" : "LicenseRef-Beerware-4.2",
+ "comment" : "The beerware license has a couple of other standard variants.",
+ "extractedText" : "\"THE BEER-WARE LICENSE\" (Revision 42):\nphk@FreeBSD.ORG wrote this file. As long as you retain this notice you\ncan do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return Poul-Henning Kamp",
+ "name" : "Beer-Ware License (Version 42)",
+ "seeAlsos" : [ "http://people.freebsd.org/~phk/" ]
+ }, {
+ "licenseId" : "LicenseRef-3",
+ "comment" : "This is tye CyperNeko License",
+ "extractedText" : "The CyberNeko Software License, Version 1.0\n\n \n(C) Copyright 2002-2005, Andy Clark. All rights reserved.\n \nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n\n1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer. \n\n2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in\n the documentation and/or other materials provided with the\n distribution.\n\n3. The end-user documentation included with the redistribution,\n if any, must include the following acknowledgment: \n \"This product includes software developed by Andy Clark.\"\n Alternately, this acknowledgment may appear in the software itself,\n if and wherever such third-party acknowledgments normally appear.\n\n4. The names \"CyberNeko\" and \"NekoHTML\" must not be used to endorse\n or promote products derived from this software without prior \n written permission. For written permission, please contact \n andyc@cyberneko.net.\n\n5. Products derived from this software may not be called \"CyberNeko\",\n nor may \"CyberNeko\" appear in their name, without prior written\n permission of the author.\n\nTHIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED\nWARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\nOF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS\nBE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, \nOR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT \nOF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR \nBUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \nWHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE \nOR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, \nEVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
+ "name" : "CyberNeko License",
+ "seeAlsos" : [ "http://people.apache.org/~andyc/neko/LICENSE", "http://justasample.url.com" ]
+ } ],
+ "annotations" : [ {
+ "annotationDate" : "2010-01-29T18:30:22Z",
+ "annotationType" : "OTHER",
+ "annotator" : "Person: Jane Doe ()",
+ "comment" : "Document level annotation"
+ }, {
+ "annotationDate" : "2010-02-10T00:00:00Z",
+ "annotationType" : "REVIEW",
+ "annotator" : "Person: Joe Reviewer",
+ "comment" : "This is just an example. Some of the non-standard licenses look like they are actually BSD 3 clause licenses"
+ }, {
+ "annotationDate" : "2011-03-13T00:00:00Z",
+ "annotationType" : "REVIEW",
+ "annotator" : "Person: Suzanne Reviewer",
+ "comment" : "Another example reviewer."
+ } ],
+ "documentDescribes" : [ "SPDXRef-File", "SPDXRef-File", "SPDXRef-Package" ],
+ "documentNamespace" : "http://spdx.org/spdxdocs/spdx-example-json-2.3-444504E0-4F89-41D3-9A0C-0305E82C3301",
+ "packages" : [ {
+ "SPDXID" : "SPDXRef-Package",
+ "annotations" : [ {
+ "annotationDate" : "2011-01-29T18:30:22Z",
+ "annotationType" : "OTHER",
+ "annotator" : "Person: Package Commenter",
+ "comment" : "Package level annotation"
+ } ],
+ "attributionTexts" : [ "The GNU C Library is free software. See the file COPYING.LIB for copying conditions, and LICENSES for notices about a few contributions that require these additional notices to be distributed. License copyright years may be listed using range notation, e.g., 1996-2015, indicating that every year in the range, inclusive, is a copyrightable year that would otherwise be listed individually." ],
+ "builtDate" : "2011-01-29T18:30:22Z",
+ "checksums" : [ {
+ "algorithm" : "MD5",
+ "checksumValue" : "624c1abb3664f4b35547e7c73864ad24"
+ }, {
+ "algorithm" : "SHA1",
+ "checksumValue" : "85ed0817af83a24ad8da68c2b5094de69833983c"
+ }, {
+ "algorithm" : "SHA256",
+ "checksumValue" : "11b6d3ee554eedf79299905a98f9b9a04e498210b59f15094c916c91d150efcd"
+ }, {
+ "algorithm" : "BLAKE2b-384",
+ "checksumValue" : "aaabd89c926ab525c242e6621f2f5fa73aa4afe3d9e24aed727faaadd6af38b620bdb623dd2b4788b1c8086984af8706"
+ } ],
+ "copyrightText" : "Copyright 2008-2010 John Smith",
+ "description" : "The GNU C Library defines functions that are specified by the ISO C standard, as well as additional features specific to POSIX and other derivatives of the Unix operating system, and extensions specific to GNU systems.",
+ "downloadLocation" : "http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz",
+ "externalRefs" : [ {
+ "referenceCategory" : "SECURITY",
+ "referenceLocator" : "cpe:2.3:a:pivotal_software:spring_framework:4.1.0:*:*:*:*:*:*:*",
+ "referenceType" : "cpe23Type"
+ }, {
+ "comment" : "This is the external ref for Acme",
+ "referenceCategory" : "OTHER",
+ "referenceLocator" : "acmecorp/acmenator/4.1.3-alpha",
+ "referenceType" : "http://spdx.org/spdxdocs/spdx-example-444504E0-4F89-41D3-9A0C-0305E82C3301#LocationRef-acmeforge"
+ } ],
+ "filesAnalyzed" : true,
+ "homepage" : "http://ftp.gnu.org/gnu/glibc",
+ "licenseComments" : "The license for this project changed with the release of version x.y. The version of the project included here post-dates the license change.",
+ "licenseConcluded" : "(LGPL-2.0-only OR LicenseRef-3)",
+ "licenseDeclared" : "(LGPL-2.0-only AND LicenseRef-3)",
+ "licenseInfoFromFiles" : [ "GPL-2.0-only", "LicenseRef-2", "LicenseRef-1" ],
+ "name" : "glibc",
+ "originator" : "Organization: ExampleCodeInspect (contact@example.com)",
+ "packageFileName" : "glibc-2.11.1.tar.gz",
+ "packageVerificationCode" : {
+ "packageVerificationCodeExcludedFiles" : [ "./package.spdx" ],
+ "packageVerificationCodeValue" : "d6a770ba38583ed4bb4525bd96e50461655d2758"
+ },
+ "primaryPackagePurpose" : "SOURCE",
+ "hasFiles" : [ "SPDXRef-Specification", "SPDXRef-Specification", "SPDXRef-CommonsLangSrc", "SPDXRef-Specification", "SPDXRef-CommonsLangSrc", "SPDXRef-JenaLib", "SPDXRef-Specification", "SPDXRef-CommonsLangSrc", "SPDXRef-JenaLib", "SPDXRef-DoapSource", "SPDXRef-Specification", "SPDXRef-CommonsLangSrc", "SPDXRef-JenaLib", "SPDXRef-DoapSource" ],
+ "releaseDate" : "2012-01-29T18:30:22Z",
+ "sourceInfo" : "uses glibc-2_11-branch from git://sourceware.org/git/glibc.git.",
+ "summary" : "GNU C library.",
+ "supplier" : "Person: Jane Doe (jane.doe@example.com)",
+ "validUntilDate" : "2014-01-29T18:30:22Z",
+ "versionInfo" : "2.11.1"
+ }, {
+ "SPDXID" : "SPDXRef-fromDoap-1",
+ "copyrightText" : "NOASSERTION",
+ "downloadLocation" : "NOASSERTION",
+ "filesAnalyzed" : false,
+ "homepage" : "http://commons.apache.org/proper/commons-lang/",
+ "licenseConcluded" : "NOASSERTION",
+ "licenseDeclared" : "NOASSERTION",
+ "name" : "Apache Commons Lang"
+ }, {
+ "SPDXID" : "SPDXRef-fromDoap-0",
+ "downloadLocation" : "https://search.maven.org/remotecontent?filepath=org/apache/jena/apache-jena/3.12.0/apache-jena-3.12.0.tar.gz",
+ "externalRefs" : [ {
+ "referenceCategory" : "PACKAGE-MANAGER",
+ "referenceLocator" : "pkg:maven/org.apache.jena/apache-jena@3.12.0",
+ "referenceType" : "purl"
+ } ],
+ "filesAnalyzed" : false,
+ "homepage" : "http://www.openjena.org/",
+ "name" : "Jena",
+ "versionInfo" : "3.12.0"
+ }, {
+ "SPDXID" : "SPDXRef-Saxon",
+ "checksums" : [ {
+ "algorithm" : "SHA1",
+ "checksumValue" : "85ed0817af83a24ad8da68c2b5094de69833983c"
+ } ],
+ "copyrightText" : "Copyright Saxonica Ltd",
+ "description" : "The Saxon package is a collection of tools for processing XML documents.",
+ "downloadLocation" : "https://sourceforge.net/projects/saxon/files/Saxon-B/8.8.0.7/saxonb8-8-0-7j.zip/download",
+ "filesAnalyzed" : false,
+ "homepage" : "http://saxon.sourceforge.net/",
+ "licenseComments" : "Other versions available for a commercial license",
+ "licenseConcluded" : "MPL-1.0",
+ "licenseDeclared" : "MPL-1.0",
+ "name" : "Saxon",
+ "packageFileName" : "saxonB-8.8.zip",
+ "versionInfo" : "8.8"
+ } ],
+ "files" : [ {
+ "SPDXID" : "SPDXRef-DoapSource",
+ "checksums" : [ {
+ "algorithm" : "SHA1",
+ "checksumValue" : "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12"
+ } ],
+ "copyrightText" : "Copyright 2010, 2011 Source Auditor Inc.",
+ "fileContributors" : [ "Protecode Inc.", "SPDX Technical Team Members", "Open Logic Inc.", "Source Auditor Inc.", "Black Duck Software In.c" ],
+ "fileName" : "./src/org/spdx/parser/DOAPProject.java",
+ "fileTypes" : [ "SOURCE" ],
+ "licenseConcluded" : "Apache-2.0",
+ "licenseInfoInFiles" : [ "Apache-2.0" ]
+ }, {
+ "SPDXID" : "SPDXRef-CommonsLangSrc",
+ "checksums" : [ {
+ "algorithm" : "SHA1",
+ "checksumValue" : "c2b4e1c67a2d28fced849ee1bb76e7391b93f125"
+ } ],
+ "comment" : "This file is used by Jena",
+ "copyrightText" : "Copyright 2001-2011 The Apache Software Foundation",
+ "fileContributors" : [ "Apache Software Foundation" ],
+ "fileName" : "./lib-source/commons-lang3-3.1-sources.jar",
+ "fileTypes" : [ "ARCHIVE" ],
+ "licenseConcluded" : "Apache-2.0",
+ "licenseInfoInFiles" : [ "Apache-2.0" ],
+ "noticeText" : "Apache Commons Lang\nCopyright 2001-2011 The Apache Software Foundation\n\nThis product includes software developed by\nThe Apache Software Foundation (http://www.apache.org/).\n\nThis product includes software from the Spring Framework,\nunder the Apache License 2.0 (see: StringUtils.containsWhitespace())"
+ }, {
+ "SPDXID" : "SPDXRef-JenaLib",
+ "checksums" : [ {
+ "algorithm" : "SHA1",
+ "checksumValue" : "3ab4e1c67a2d28fced849ee1bb76e7391b93f125"
+ } ],
+ "comment" : "This file belongs to Jena",
+ "copyrightText" : "(c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP",
+ "fileContributors" : [ "Apache Software Foundation", "Hewlett Packard Inc." ],
+ "fileName" : "./lib-source/jena-2.6.3-sources.jar",
+ "fileTypes" : [ "ARCHIVE" ],
+ "licenseComments" : "This license is used by Jena",
+ "licenseConcluded" : "LicenseRef-1",
+ "licenseInfoInFiles" : [ "LicenseRef-1" ]
+ }, {
+ "SPDXID" : "SPDXRef-Specification",
+ "checksums" : [ {
+ "algorithm" : "SHA1",
+ "checksumValue" : "fff4e1c67a2d28fced849ee1bb76e7391b93f125"
+ } ],
+ "comment" : "Specification Documentation",
+ "fileName" : "./docs/myspec.pdf",
+ "fileTypes" : [ "DOCUMENTATION" ]
+ }, {
+ "SPDXID" : "SPDXRef-File",
+ "annotations" : [ {
+ "annotationDate" : "2011-01-29T18:30:22Z",
+ "annotationType" : "OTHER",
+ "annotator" : "Person: File Commenter",
+ "comment" : "File level annotation"
+ } ],
+ "checksums" : [ {
+ "algorithm" : "SHA1",
+ "checksumValue" : "d6a770ba38583ed4bb4525bd96e50461655d2758"
+ }, {
+ "algorithm" : "MD5",
+ "checksumValue" : "624c1abb3664f4b35547e7c73864ad24"
+ } ],
+ "comment" : "The concluded license was taken from the package level that the file was included in.\nThis information was found in the COPYING.txt file in the xyz directory.",
+ "copyrightText" : "Copyright 2008-2010 John Smith",
+ "fileContributors" : [ "The Regents of the University of California", "Modified by Paul Mundt lethal@linux-sh.org", "IBM Corporation" ],
+ "fileName" : "./package/foo.c",
+ "fileTypes" : [ "SOURCE" ],
+ "licenseComments" : "The concluded license was taken from the package level that the file was included in.",
+ "licenseConcluded" : "(LGPL-2.0-only OR LicenseRef-2)",
+ "licenseInfoInFiles" : [ "GPL-2.0-only", "LicenseRef-2" ],
+ "noticeText" : "Copyright (c) 2001 Aaron Lehmann aaroni@vitelus.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: \nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
+ } ],
+ "snippets" : [ {
+ "SPDXID" : "SPDXRef-Snippet",
+ "comment" : "This snippet was identified as significant and highlighted in this Apache-2.0 file, when a commercial scanner identified it as being derived from file foo.c in package xyz which is licensed under GPL-2.0.",
+ "copyrightText" : "Copyright 2008-2010 John Smith",
+ "licenseComments" : "The concluded license was taken from package xyz, from which the snippet was copied into the current file. The concluded license information was found in the COPYING.txt file in package xyz.",
+ "licenseConcluded" : "GPL-2.0-only",
+ "licenseInfoInSnippets" : [ "GPL-2.0-only" ],
+ "name" : "from linux kernel",
+ "ranges" : [ {
+ "endPointer" : {
+ "offset" : 420,
+ "reference" : "SPDXRef-DoapSource"
+ },
+ "startPointer" : {
+ "offset" : 310,
+ "reference" : "SPDXRef-DoapSource"
+ }
+ }, {
+ "endPointer" : {
+ "lineNumber" : 23,
+ "reference" : "SPDXRef-DoapSource"
+ },
+ "startPointer" : {
+ "lineNumber" : 5,
+ "reference" : "SPDXRef-DoapSource"
+ }
+ } ],
+ "snippetFromFile" : "SPDXRef-DoapSource"
+ } ],
+ "relationships" : [ {
+ "spdxElementId" : "SPDXRef-DOCUMENT",
+ "relationshipType" : "CONTAINS",
+ "relatedSpdxElement" : "SPDXRef-Package"
+ }, {
+ "spdxElementId" : "SPDXRef-DOCUMENT",
+ "relationshipType" : "COPY_OF",
+ "relatedSpdxElement" : "DocumentRef-spdx-tool-1.2:SPDXRef-ToolsElement"
+ }, {
+ "spdxElementId" : "SPDXRef-Package",
+ "relationshipType" : "DYNAMIC_LINK",
+ "relatedSpdxElement" : "SPDXRef-Saxon"
+ }, {
+ "spdxElementId" : "SPDXRef-CommonsLangSrc",
+ "relationshipType" : "GENERATED_FROM",
+ "relatedSpdxElement" : "NOASSERTION"
+ }, {
+ "spdxElementId" : "SPDXRef-JenaLib",
+ "relationshipType" : "CONTAINS",
+ "relatedSpdxElement" : "SPDXRef-Package"
+ }, {
+ "spdxElementId" : "SPDXRef-Specification",
+ "relationshipType" : "SPECIFICATION_FOR",
+ "relatedSpdxElement" : "SPDXRef-fromDoap-0"
+ }, {
+ "spdxElementId" : "SPDXRef-File",
+ "relationshipType" : "GENERATED_FROM",
+ "relatedSpdxElement" : "SPDXRef-fromDoap-0"
+ } ]
+}
\ No newline at end of file
diff --git a/tests/data/formats/SPDXRdfExample.rdf b/tests/data/formats/SPDXRdfExample-v2.1.spdx.rdf
similarity index 94%
rename from tests/data/formats/SPDXRdfExample.rdf
rename to tests/data/formats/SPDXRdfExample-v2.1.spdx.rdf
index 4637b4ca9..d5912d8a8 100644
--- a/tests/data/formats/SPDXRdfExample.rdf
+++ b/tests/data/formats/SPDXRdfExample-v2.1.spdx.rdf
@@ -1,305 +1,325 @@
-
-
-
-
-
- from linux kernel
- Copyright 2008-2010 John Smith
- The concluded license was taken from package xyz, from which the snippet was copied into the current file. The concluded license information was found in the COPYING.txt file in package xyz.
- This snippet was identified as significant and highlighted in this Apache-2.0 file, when a commercial scanner identified it as being derived from file foo.c in package xyz which is licensed under GPL-2.0-or-later.
-
-
-
-
- Sample_Document-V2.1
-
-
- 2010-02-03T00:00:00Z
- This is an example of an SPDX spreadsheet format
- Tool: SourceAuditor-V1.2
- Organization: Source Auditor Inc.
- Person: Gary O'Neall
-
-
- SPDX-2.1
-
-
- DocumentRef-spdx-tool-2.1
-
-
-
- d6a770ba38583ed4bb4525bd96e50461655d2759
-
-
-
-
-
-
- >
-
-
- /*
- * (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- LicenseRef-1
-
-
-
-
- http://www.openjena.org/
- Jena
-
-
- This license is used by Jena
- Jenna-2.6.3/jena-2.6.3-sources.jar
-
- (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
-
- This file belongs to Jena
-
-
- 3ab4e1c67a2d28fced849ee1bb76e7391b93f125
-
-
-
-
-
-
-
- This is just an example. Some of the non-standard licenses look like they are actually BSD 3 clause licenses
- 2010-02-10T00:00:00Z
- Person: Joe Reviewer
-
-
-
-
-
-
- Another example reviewer.
- 2011-03-13T00:00:00Z
- Person: Suzanne Reviewer
-
-
-
-
-
- This is just an example. Some of the non-standard licenses look like they are actually BSD 3 clause licenses
- 2012-06-13T00:00:00Z
- Person: Jim Reviewer
-
-
-
-
-
-
-
-
-
-
- Copyright 2010, 2011 Source Auditor Inc.
-
-
-
-
-
- 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
-
-
-
- src/org/spdx/parser/DOAPProject.java
-
-
-
-
-
- http://www.spdx.org/tools
- true
- Organization:Linux Foundation
-
-
-
-
- 4e3211c67a2d28fced849ee1bb76e7391b93feba
- SpdxTranslatorSpdx.txt
- SpdxTranslatorSpdx.rdf
-
-
-
-
-
-
- This package includes the GRDDL parser developed by Hewlett Packard under the following license:
-© Copyright 2007 Hewlett-Packard Development Company, LP
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- LicenseRef-2
-
-
-
-
-
-
-
-
- /*
- * (c) Copyright 2009 University of Bristol
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- LicenseRef-4
-
-
-
-
- http://justasample.url.com
- http://people.apache.org/~andyc/neko/LICENSE
- CyberNeko License
- This is tye CyperNeko License
- The CyberNeko Software License, Version 1.0
-
-
-(C) Copyright 2002-2005, Andy Clark. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
-3. The end-user documentation included with the redistribution,
- if any, must include the following acknowledgment:
- "This product includes software developed by Andy Clark."
- Alternately, this acknowledgment may appear in the software itself,
- if and wherever such third-party acknowledgments normally appear.
-
-4. The names "CyberNeko" and "NekoHTML" must not be used to endorse
- or promote products derived from this software without prior
- written permission. For written permission, please contact
- andyc@cyberneko.net.
-
-5. Products derived from this software may not be called "CyberNeko",
- nor may "CyberNeko" appear in their name, without prior written
- permission of the author.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- LicenseRef-3
-
-
-
-
- Version 1.0 of the SPDX Translator application
-
-
- 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
-
-
-
- spdxtranslator-1.0.zip
- This utility translates and SPDX RDF XML document to a spreadsheet, translates a spreadsheet to an SPDX RDF XML document and translates an SPDX RDFa document to an SPDX RDF XML document.
-
- SPDX Translator
- Version 0.9.2
-
-
-
- Copyright 2010, 2011 Source Auditor Inc.
-
-
-
-
-
-
-
-
-
-
-
- Organization:SPDX
- The declared license information can be found in the NOTICE file at the root of the archive file
- SPDX Translator utility
-
-
-
-
-
- org.apache.commons:commons-lang:3.2.1
- NIST National Vulnerability Database (NVD) describes security vulnerabilities (CVEs) which affect Vendor Product Version acmecorp:acmenator:6.6.6
-
-
-
-
- This is a sample spreadsheet
-
-
-
-
-
+
+
+
+
+
+ from linux kernel
+ Copyright 2008-2010 John Smith
+ The concluded license was taken from package xyz, from which the snippet was copied into the current file. The concluded license information was found in the COPYING.txt file in package xyz.
+ This snippet was identified as significant and highlighted in this Apache-2.0 file, when a commercial scanner identified it as being derived from file foo.c in package xyz which is licensed under GPL-2.0-or-later.
+
+
+
+
+ Sample_Document-V2.1
+
+
+ 2010-02-03T00:00:00Z
+ This is an example of an SPDX spreadsheet format
+ Tool: SourceAuditor-V1.2
+ Organization: Source Auditor Inc.
+ Person: Gary O'Neall
+
+
+ SPDX-2.1
+
+
+ DocumentRef-spdx-tool-2.1
+
+
+
+ d6a770ba38583ed4bb4525bd96e50461655d2759
+
+
+
+
+
+
+ >
+
+
+ /*
+ * (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+ LicenseRef-1
+
+
+
+
+ http://www.openjena.org/
+ Jena
+
+
+ This license is used by Jena
+ Jenna-2.6.3/jena-2.6.3-sources.jar
+
+
+ (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
+
+ This file belongs to Jena
+
+
+ 3ab4e1c67a2d28fced849ee1bb76e7391b93f125
+
+
+
+
+
+ 3ab4e1c67a2d28fced849ee1bb76e7391b93f1250000000000000000
+
+
+
+
+
+
+
+ This is just an example. Some of the non-standard licenses look like they are actually BSD 3 clause licenses
+ 2010-02-10T00:00:00Z
+ Person: Joe Reviewer
+
+
+
+
+
+
+ Another example reviewer.
+ 2011-03-13T00:00:00Z
+ Person: Suzanne Reviewer
+
+
+
+
+
+ This is just an example. Some of the non-standard licenses look like they are actually BSD 3 clause licenses
+ 2012-06-13T00:00:00Z
+ Person: Jim Reviewer
+
+
+
+
+
+
+
+
+
+
+ Copyright 2010, 2011 Source Auditor Inc.
+
+
+
+
+
+
+ 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
+
+
+
+
+
+ 2fd4e1c67a2d28fced849ee1bb76e7391b93eb120000000000000000
+
+
+
+ src/org/spdx/parser/DOAPProject.java
+
+
+
+
+
+ http://www.spdx.org/tools
+ true
+ Organization:Linux Foundation
+
+
+
+
+ 4e3211c67a2d28fced849ee1bb76e7391b93feba
+ SpdxTranslatorSpdx.txt
+ SpdxTranslatorSpdx.rdf
+
+
+
+
+ 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
+
+
+
+
+
+
+
+ This package includes the GRDDL parser developed by Hewlett Packard under the following license:
+© Copyright 2007 Hewlett-Packard Development Company, LP
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ LicenseRef-2
+
+
+
+
+
+
+
+
+ /*
+ * (c) Copyright 2009 University of Bristol
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+ LicenseRef-4
+
+
+
+
+ http://justasample.url.com
+ http://people.apache.org/~andyc/neko/LICENSE
+ CyberNeko License
+ This is tye CyperNeko License
+ The CyberNeko Software License, Version 1.0
+
+
+(C) Copyright 2002-2005, Andy Clark. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+3. The end-user documentation included with the redistribution,
+ if any, must include the following acknowledgment:
+ "This product includes software developed by Andy Clark."
+ Alternately, this acknowledgment may appear in the software itself,
+ if and wherever such third-party acknowledgments normally appear.
+
+4. The names "CyberNeko" and "NekoHTML" must not be used to endorse
+ or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ andyc@cyberneko.net.
+
+5. Products derived from this software may not be called "CyberNeko",
+ nor may "CyberNeko" appear in their name, without prior written
+ permission of the author.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ LicenseRef-3
+
+
+
+
+ Version 1.0 of the SPDX Translator application
+
+
+ 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
+
+
+
+ spdxtranslator-1.0.zip
+ This utility translates and SPDX RDF XML document to a spreadsheet, translates a spreadsheet to an SPDX RDF XML document and translates an SPDX RDFa document to an SPDX RDF XML document.
+
+ SPDX Translator
+ Version 0.9.2
+
+
+
+ Copyright 2010, 2011 Source Auditor Inc.
+
+
+
+
+
+
+
+
+
+
+
+ Organization:SPDX
+ The declared license information can be found in the NOTICE file at the root of the archive file
+ SPDX Translator utility
+
+
+
+
+
+ org.apache.commons:commons-lang:3.2.1
+ NIST National Vulnerability Database (NVD) describes security vulnerabilities (CVEs) which affect Vendor Product Version acmecorp:acmenator:6.6.6
+
+
+
+
+ This is a sample spreadsheet
+
+
+
+
+
diff --git a/tests/data/formats/SPDXRdfExample-v2.2.spdx.rdf b/tests/data/formats/SPDXRdfExample-v2.2.spdx.rdf
new file mode 100644
index 000000000..280f17085
--- /dev/null
+++ b/tests/data/formats/SPDXRdfExample-v2.2.spdx.rdf
@@ -0,0 +1,1983 @@
+
+
+ from linux kernel
+ Copyright 2008-2010 John Smith
+ The concluded license was taken from package xyz, from which the snippet was copied into the current file. The concluded license information was found in the COPYING.txt file in package xyz.
+
+
+
+
+ 420
+
+
+ Copyright 2010, 2011 Source Auditor Inc.
+ Open Logic Inc.
+ ./src/org/spdx/parser/DOAPProject.java
+ Black Duck Software In.c
+ Source Auditor Inc.
+ SPDX Technical Team Members
+
+
+ This license was released January 2004
+ Apache License 2.0
+ Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+
+distributed under the License is distributed on an "AS IS" BASIS,
+
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+See the License for the specific language governing permissions and
+
+limitations under the License.
+
+
+ 0
+ 2020-11-25 - 21:56:49
+ http://www.apache.org/licenses/LICENSE-2.0
+ true
+ false
+ true
+ true
+
+
+
+
+ 1
+ 2020-11-25 - 21:56:49
+ https://opensource.org/licenses/Apache-2.0
+ true
+ false
+ true
+ true
+
+
+ <<beginOptional>> Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/<<endOptional>><<beginOptional>> TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION<<endOptional>>
+
+ <<var;name="bullet";original="1.";match=".{0,20}">> Definitions.
+
+
+
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+
+
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+
+
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+
+
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+
+
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+
+
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+
+
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+
+
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+
+
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+ <<var;name="bullet";original="2.";match=".{0,20}">> Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+ <<var;name="bullet";original="3.";match=".{0,20}">> Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+ <<var;name="bullet";original="4.";match=".{0,20}">> Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+ <<var;name="bullet";original="(a)";match=".{0,20}">> You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+ <<var;name="bullet";original="(b)";match=".{0,20}">> You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+ <<var;name="bullet";original="(c)";match=".{0,20}">> You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+ <<var;name="bullet";original="(d)";match=".{0,20}">> If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+ <<var;name="bullet";original="5.";match=".{0,20}">> Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+ <<var;name="bullet";original="6.";match=".{0,20}">> Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+ <<var;name="bullet";original="7.";match=".{0,20}">> Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+ <<var;name="bullet";original="8.";match=".{0,20}">> Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+ <<var;name="bullet";original="9.";match=".{0,20}">> Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.<<beginOptional>> END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+Copyright <<var;name="copyright";original="[yyyy] [name of copyright owner]";match=".+">>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+
+distributed under the License is distributed on an "AS IS" BASIS,
+
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+See the License for the specific language governing permissions and
+
+limitations under the License.<<endOptional>>
+ true
+ true
+ https://opensource.org/licenses/Apache-2.0
+ http://www.apache.org/licenses/LICENSE-2.0
+ Copyright <<var;name="copyright";original="[yyyy] [name of copyright owner]";match=".+">>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+
+distributed under the License is distributed on an "AS IS" BASIS,
+
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+See the License for the specific language governing permissions and
+
+limitations under the License.
+ false
+ Apache-2.0
+ Apache License
+Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+
+ Protecode Inc.
+
+
+
+
+
+ 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
+
+
+
+
+
+
+
+
+ 310
+
+
+
+
+
+
+
+
+ Copyright (C) yyyy name of author
+
+This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ https://opensource.org/licenses/GPL-2.0
+ This license was released: June 1991. This license identifier refers to the choice to use the code under GPL-2.0-only, as distinguished from use of code under GPL-2.0-or-later (i.e., GPL-2.0 or some later version). The license notice (as seen in the Standard License Header field below) states which of these applies to the code in the file. The example in the exhibit to the license shows the license notice for the "or later" approach.
+ GPL-2.0-only
+ https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
+
+
+ 0
+ 2020-11-25 - 21:52:24
+ https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
+ true
+ false
+ true
+ true
+
+
+ true
+ <<beginOptional>> GNU GENERAL PUBLIC LICENSE
+
+Version 2, June 1991<<endOptional>>
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc. <<var;name="incComma";original="";match=",|">>
+
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301<<beginOptional>>, <<endOptional>> USA
+
+Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
+
+When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and modification follow.
+
+<<var;name="termsTitle";original="";match="GNU GENERAL PUBLIC LICENSE|">> TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ <<var;name="bullet";original="0.";match=".{0,20}">> This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
+
+ Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
+
+ <<var;name="bullet";original="1.";match=".{0,20}">> You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
+
+ You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+
+ <<var;name="bullet";original="2.";match=".{0,20}">> You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+
+ <<var;name="bullet";original="a)";match=".{0,20}">> You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
+
+ <<var;name="bullet";original="b)";match=".{0,20}">> You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
+
+ <<var;name="bullet";original="c)";match=".{0,20}">> If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
+
+ These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+
+ Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
+
+ In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+
+ <<var;name="bullet";original="3.";match=".{0,20}">> You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
+
+ <<var;name="bullet";original="a)";match=".{0,20}">> Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+
+ <<var;name="bullet";original="b)";match=".{0,20}">> Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+
+ <<var;name="bullet";original="c)";match=".{0,20}">> Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
+
+ The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+
+ If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
+
+ <<var;name="bullet";original="4.";match=".{0,20}">> You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+
+ <<var;name="bullet";original="5.";match=".{0,20}">> You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
+
+ <<var;name="bullet";original="6.";match=".{0,20}">> Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
+
+ <<var;name="bullet";original="7.";match=".{0,20}">> If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
+
+ If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
+
+ It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
+
+ This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+
+ <<var;name="bullet";original="8.";match=".{0,20}">> If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
+
+ <<var;name="bullet";original="9.";match=".{0,20}">> The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
+
+ <<var;name="bullet";original="10.";match=".{0,20}">> If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ <<var;name="bullet";original="11.";match=".{0,20}">> BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ <<var;name="bullet";original="12.";match=".{0,20}">> IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.<<beginOptional>> END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
+
+<<beginOptional>><<<endOptional>>one line to give the program's name and <<var;name="ideaArticle";original="an";match="a brief|an">> idea of what it does.<<beginOptional>>><<endOptional>>
+
+Copyright (C)<<beginOptional>><<<endOptional>> <<var;name="templateYear";original="yyyy";match="yyyy|year">><<beginOptional>>> <<endOptional>><<beginOptional>> <<<endOptional>>name of author<<beginOptional>>><<endOptional>>
+
+This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301<<beginOptional>>, <<endOptional>> USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
+
+Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
+
+Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+<<beginOptional>><<<endOptional>>signature of Ty Coon<<beginOptional>> ><<endOptional>>, 1 April 1989 Ty Coon, President of Vice<<endOptional>><<beginOptional>> This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License.<<endOptional>>
+ false
+ GNU General Public License v2.0 only
+ Copyright (C) <<var;name="copyright";original="yyyy name of author";match=".+">>
+
+This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301<<beginOptional>>, <<endOptional>> USA.
+ true
+ GNU GENERAL PUBLIC LICENSE
+Version 2, June 1991
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+
+Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
+
+When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and modification follow.
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
+
+1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+
+3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+
+If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
+
+4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+
+5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
+
+6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
+
+7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
+
+This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+
+8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
+
+9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
+
+10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+
+NO WARRANTY
+
+11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
+
+ one line to give the program's name and an idea of what it does. Copyright (C) yyyy name of author
+
+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice
+
+
+
+ 1
+ 2020-11-25 - 21:52:24
+ https://opensource.org/licenses/GPL-2.0
+ false
+ false
+ true
+ true
+
+
+
+
+
+ This snippet was identified as significant and highlighted in this Apache-2.0 file, when a commercial scanner identified it as being derived from file foo.c in package xyz which is licensed under GPL-2.0.
+
+
+
+
+ 23
+
+
+
+
+
+ 5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ http://justasample.url.com
+ http://people.apache.org/~andyc/neko/LICENSE
+ LicenseRef-3
+ This is tye CyperNeko License
+ The CyberNeko Software License, Version 1.0
+
+
+(C) Copyright 2002-2005, Andy Clark. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+3. The end-user documentation included with the redistribution,
+ if any, must include the following acknowledgment:
+ "This product includes software developed by Andy Clark."
+ Alternately, this acknowledgment may appear in the software itself,
+ if and wherever such third-party acknowledgments normally appear.
+
+4. The names "CyberNeko" and "NekoHTML" must not be used to endorse
+ or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ andyc@cyberneko.net.
+
+5. Products derived from this software may not be called "CyberNeko",
+ nor may "CyberNeko" appear in their name, without prior written
+ permission of the author.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ CyberNeko License
+
+
+
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+
+Version 2, June 1991
+
+Copyright (C) 1991 Free Software Foundation, Inc.
+51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+
+Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
+
+This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too.
+
+When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it.
+
+For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
+
+Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library.
+
+Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
+
+Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license.
+
+The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such.
+
+Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better.
+
+However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries.
+
+The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library.
+
+Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one.
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you".
+
+A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
+
+The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
+
+"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
+
+Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
+
+1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
+
+You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
+
+(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+
+3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
+
+Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
+
+This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
+
+4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
+
+If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
+
+5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
+
+However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
+
+When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
+
+If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
+
+Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
+
+6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
+
+You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
+
+ a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
+
+For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+
+It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
+
+7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
+
+ b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
+
+8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+
+9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
+
+10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
+
+11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
+
+This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+
+12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
+
+13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
+
+14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+
+NO WARRANTY
+
+15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Libraries
+
+If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).
+
+To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
+
+ one line to give the library's name and an idea of what it does.
+ Copyright (C) year name of author
+
+ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names:
+
+Yoyodyne, Inc., hereby disclaims all copyright interest in
+the library `Frob' (a library for tweaking knobs) written
+by James Random Hacker.
+
+signature of Ty Coon, 1 April 1990
+Ty Coon, President of Vice
+
+That's all there is to it!
+ LGPL-2.0-only
+ https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html
+ <<beginOptional>> GNU LIBRARY GENERAL PUBLIC LICENSE
+
+Version 2, June 1991<<endOptional>> <<var;name="copyright";original="Copyright (C) 1991 Free Software Foundation, Inc.
+
+51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA";match=".{0,1000}">>
+
+Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
+
+This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too.
+
+When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it.
+
+For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
+
+Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library.
+
+Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
+
+Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license.
+
+The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such.
+
+Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better.
+
+However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries.
+
+The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library.
+
+Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one.
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ <<var;name="bullet";original="0.";match=".{0,20}">> This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
+
+ Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
+
+ <<var;name="bullet";original="1.";match=".{0,20}">> You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
+
+ You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+
+ <<var;name="bullet";original="2.";match=".{0,20}">> You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+
+ <<var;name="bullet";original="a)";match=".{0,20}">> The modified work must itself be a software library.
+
+ <<var;name="bullet";original="b)";match=".{0,20}">> You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
+
+ <<var;name="bullet";original="c)";match=".{0,20}">> You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
+
+ <<var;name="bullet";original="d)";match=".{0,20}">> If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
+
+ These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+
+ Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
+
+ In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+
+ <<var;name="bullet";original="3.";match=".{0,20}">> You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
+
+ Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
+
+ <<var;name="bullet";original="4.";match=".{0,20}">> You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
+
+ <<var;name="bullet";original="5.";match=".{0,20}">> A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
+
+ <<var;name="bullet";original="6.";match=".{0,20}">> As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
+
+ <<var;name="bullet";original="a)";match=".{0,20}">> Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
+
+ <<var;name="bullet";original="b)";match=".{0,20}">> Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
+
+ <<var;name="bullet";original="c)";match=".{0,20}">> If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
+
+ <<var;name="bullet";original="d)";match=".{0,20}">> Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+
+ It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
+
+ <<var;name="bullet";original="7.";match=".{0,20}">> You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
+
+ <<var;name="bullet";original="a)";match=".{0,20}">> Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
+
+ <<var;name="bullet";original="b)";match=".{0,20}">> Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
+
+ <<var;name="bullet";original="8.";match=".{0,20}">> You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+
+ <<var;name="bullet";original="9.";match=".{0,20}">> You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
+
+ <<var;name="bullet";original="10.";match=".{0,20}">> Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
+
+ <<var;name="bullet";original="11.";match=".{0,20}">> If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
+
+ If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
+
+ It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
+
+ This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+
+ <<var;name="bullet";original="12.";match=".{0,20}">> If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
+
+ <<var;name="bullet";original="13.";match=".{0,20}">> The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
+
+ <<var;name="bullet";original="14.";match=".{0,20}">> If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ <<var;name="bullet";original="15.";match=".{0,20}">> BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ <<var;name="bullet";original="16.";match=".{0,20}">> IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.<<beginOptional>> END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Libraries
+
+If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).
+
+To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
+
+one line to give the library's name and an idea of what it does.
+
+Copyright (C) year name of author
+
+This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names:
+
+Yoyodyne, Inc., hereby disclaims all copyright interest in
+
+the library `Frob' (a library for tweaking knobs) written
+
+by James Random Hacker.
+
+signature of Ty Coon, 1 April 1990
+
+Ty Coon, President of Vice
+
+That's all there is to it!<<endOptional>>
+ false
+ Copyright (C) <<var;name="copyright";original="year name of author";match=".+">>
+
+This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; version 2.
+
+This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ Copyright (C) year name of author
+
+This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; version 2.
+
+This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ true
+ This license was released: June 1991. This license has been superseded by LGPL-2.1. This license identifier refers to the choice to use the code under LGPL-2.0-only, as distinguished from use of code under LGPL-2.0-or-later (i.e., LGPL-2.0 or some later version). The license notice (as seen in the Standard License Header field below) states which of these applies to the code in the file. The example in the exhibit to the license shows the license notice for the "or later" approach.
+
+
+ 0
+ 2020-11-25 - 21:55:42
+ https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html
+ true
+ false
+ true
+ true
+
+
+ GNU Library General Public License v2 only
+
+
+
+
+ http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz
+
+
+
+
+
+
+ LicenseRef-1
+ /*
+ * (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+ This license is used by Jena
+
+
+
+ 3ab4e1c67a2d28fced849ee1bb76e7391b93f125
+
+
+ Hewlett Packard Inc.
+
+ (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
+ Apache Software Foundation
+
+
+
+
+
+
+
+ This file belongs to Jena
+ ./lib-source/jena-2.6.3-sources.jar
+
+
+
+
+
+
+
+
+ This is the external ref for Acme
+
+ acmecorp/acmenator/4.1.3-alpha
+
+
+ 2.11.1
+
+ true
+ The license for this project changed with the release of version x.y. The version of the project included here post-dates the license change.
+
+
+ d6a770ba38583ed4bb4525bd96e50461655d2758
+ ./package.spdx
+
+
+ http://ftp.gnu.org/gnu/glibc
+
+
+
+
+ cpe:2.3:a:pivotal_software:spring_framework:4.1.0:*:*:*:*:*:*:*
+
+
+
+ glibc
+ Person: Jane Doe (jane.doe@example.com)
+
+
+ Person: Package Commenter
+ Package level annotation
+
+ 2011-01-29T18:30:22Z
+
+
+
+
+
+
+
+
+ The GNU C Library is free software. See the file COPYING.LIB for copying conditions, and LICENSES for notices about a few contributions that require these additional notices to be distributed. License copyright years may be listed using range notation, e.g., 1996-2015, indicating that every year in the range, inclusive, is a copyrightable year that would otherwise be listed individually.
+ Organization: ExampleCodeInspect (contact@example.com)
+
+
+
+ LicenseRef-2
+ This package includes the GRDDL parser developed by Hewlett Packard under the following license:
+� Copyright 2007 Hewlett-Packard Development Company, LP
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+
+
+
+
+
+ c2b4e1c67a2d28fced849ee1bb76e7391b93f125
+
+
+ Apache Commons Lang
+Copyright 2001-2011 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+This product includes software from the Spring Framework,
+under the Apache License 2.0 (see: StringUtils.containsWhitespace())
+
+
+ Apache Software Foundation
+
+
+
+
+
+
+ ./lib-source/commons-lang3-3.1-sources.jar
+ Copyright 2001-2011 The Apache Software Foundation
+ This file is used by Jena
+
+
+
+
+
+
+ 624c1abb3664f4b35547e7c73864ad24
+
+
+
+
+
+
+ Saxon
+ The Saxon package is a collection of tools for processing XML documents.
+ http://saxon.sourceforge.net/
+ 8.8
+ Other versions available for a commercial license
+ https://sourceforge.net/projects/saxon/files/Saxon-B/8.8.0.7/saxonb8-8-0-7j.zip/download
+ saxonB-8.8.zip
+
+
+ https://opensource.org/licenses/MPL-1.0
+ MOZILLA PUBLIC LICENSE
+Version 1.0
+
+1. Definitions.
+
+ 1.1. ``Contributor'' means each entity that creates or contributes to the creation of Modifications.
+
+ 1.2. ``Contributor Version'' means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor.
+
+ 1.3. ``Covered Code'' means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof.
+
+ 1.4. ``Electronic Distribution Mechanism'' means a mechanism generally accepted in the software development community for the electronic transfer of data.
+
+ 1.5. ``Executable'' means Covered Code in any form other than Source Code.
+
+ 1.6. ``Initial Developer'' means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A.
+
+ 1.7. ``Larger Work'' means a work which combines Covered Code or portions thereof with code not governed by the terms of this License.
+
+ 1.8. ``License'' means this document.
+
+ 1.9. ``Modifications'' means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is:
+
+ A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications.
+
+ B. Any new file that contains any part of the Original Code or previous Modifications.
+
+ 1.10. ``Original Code'' means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License.
+
+ 1.11. ``Source Code'' means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or a list of source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge.
+
+ 1.12. ``You'' means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, ``You'' includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, ``control'' means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity.
+
+2. Source Code License.
+
+ 2.1. The Initial Developer Grant.
+The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims:
+
+ (a) to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, or as part of a Larger Work; and
+
+ (b) under patents now or hereafter owned or controlled by Initial Developer, to make, have made, use and sell (``Utilize'') the Original Code (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Original Code (or portions thereof) and not to any greater extent that may be necessary to Utilize further Modifications or combinations.
+
+ 2.2. Contributor Grant.
+Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims:
+
+ (a) to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code or as part of a Larger Work; and
+
+ (b) under patents now or hereafter owned or controlled by Contributor, to Utilize the Contributor Version (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Contributor Version (or portions thereof), and not to any greater extent that may be necessary to Utilize further Modifications or combinations.
+
+3. Distribution Obligations.
+
+ 3.1. Application of License.
+ The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5.
+
+ 3.2. Availability of Source Code.
+ Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party.
+
+ 3.3. Description of Modifications.
+ You must cause all Covered Code to which you contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code.
+
+ 3.4. Intellectual Property Matters
+
+ (a) Third Party Claims.
+ If You have knowledge that a party claims an intellectual property right in particular functionality or code (or its utilization under this License), you must include a text file with the source code distribution titled ``LEGAL'' which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If you obtain such knowledge after You make Your Modification available as described in Section 3.2, You shall promptly modify the LEGAL file in all copies You make available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained.
+
+ (b) Contributor APIs.
+ If Your Modification is an application programming interface and You own or control patents which are reasonably necessary to implement that API, you must also include this information in the LEGAL file.
+
+ 3.5. Required Notices.
+ You must duplicate the notice in Exhibit A in each file of the Source Code, and this License in any documentation for the Source Code, where You describe recipients' rights relating to Covered Code. If You created one or more Modification(s), You may add your name as a Contributor to the notice described in Exhibit A. If it is not possible to put such notice in a particular Source Code file due to its structure, then you must include such notice in a location (such as a relevant directory file) where a user would be likely to look for such a notice. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
+
+ 3.6. Distribution of Executable Versions.
+ You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
+
+ 3.7. Larger Works.
+ You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code.
+
+4. Inability to Comply Due to Statute or Regulation.
+If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
+
+5. Application of this License.
+This License applies to code to which the Initial Developer has attached the notice in Exhibit A, and to related Covered Code.
+
+6. Versions of the License.
+
+ 6.1. New Versions.
+ Netscape Communications Corporation (``Netscape'') may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number.
+
+ 6.2. Effect of New Versions.
+ Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netscape. No one other than Netscape has the right to modify the terms applicable to Covered Code created under this License.
+
+ 6.3. Derivative Works.
+ If you create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), you must (a) rename Your license so that the phrases ``Mozilla'', ``MOZILLAPL'', ``MOZPL'', ``Netscape'', ``NPL'' or any confusingly similar phrase do not appear anywhere in your license and (b) otherwise make it clear that your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.)
+
+7. DISCLAIMER OF WARRANTY.
+COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN ``AS IS'' BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+8. TERMINATION.
+This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
+
+9. LIMITATION OF LIABILITY.
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+10. U.S. GOVERNMENT END USERS.
+The Covered Code is a ``commercial item,'' as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of ``commercial computer software'' and ``commercial computer software documentation,'' as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein.
+
+11. MISCELLANEOUS.
+This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in, the United States of America: (a) unless otherwise agreed in writing, all disputes relating to this License (excepting any dispute relating to intellectual property rights) shall be subject to final and binding arbitration, with the losing party paying all costs of arbitration; (b) any arbitration relating to this Agreement shall be held in Santa Clara County, California, under the auspices of JAMS/EndDispute; and (c) any litigation relating to this Agreement shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License.
+
+12. RESPONSIBILITY FOR CLAIMS.
+Except in cases where another Contributor has failed to comply with Section 3.4, You are responsible for damages arising, directly or indirectly, out of Your utilization of rights under this License, based on the number of copies of Covered Code you made available, the revenues you received from utilizing such rights, and other relevant factors. You agree to work with affected parties to distribute responsibility on an equitable basis.
+
+EXHIBIT A.
+
+``The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
+
+Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
+
+The Original Code is ______________________________________.
+
+The Initial Developer of the Original Code is ________________________. Portions created by ______________________ are Copyright (C) ______ _______________________. All Rights Reserved.
+
+Contributor(s): ______________________________________.''
+
+
+ 0
+ 2020-11-25 - 21:52:42
+ http://www.mozilla.org/MPL/MPL-1.0.html
+ true
+ false
+ true
+ false
+
+
+ http://www.mozilla.org/MPL/MPL-1.0.html
+ This license has been superseded by v1.1
+
+
+ 1
+ 2020-11-25 - 21:52:43
+ https://opensource.org/licenses/MPL-1.0
+ true
+ false
+ true
+ true
+
+
+ Mozilla Public License 1.0
+ true
+ <<beginOptional>>"<<endOptional>>The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
+
+Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
+
+The Original Code is <<var;name="code";original="_____";match=".+">> . The Initial Developer of the Original Code is <<var;name="InitialDeveloper";original="_____";match=".+">> . Portions created by <<var;name="createdby";original="_____";match=".+">> are Copyright (C) <<var;name="copyright";original="_____";match=".+">> . All Rights Reserved. Contributor(s): <<var;name="contributor";original="_____";match=".+">> .<<beginOptional>>"<<endOptional>>
+ <<beginOptional>> MOZILLA PUBLIC LICENSE
+
+Version 1.0<<endOptional>>
+
+ <<var;name="bullet";original="1.";match=".{0,20}">> Definitions.
+
+ <<var;name="bullet";original="1.1.";match=".{0,20}">> "Contributor" means each entity that creates or contributes to the creation of Modifications.
+
+ <<var;name="bullet";original="1.2.";match=".{0,20}">> "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor.
+
+ <<var;name="bullet";original="1.3.";match=".{0,20}">> "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof.
+
+ <<var;name="bullet";original="1.4.";match=".{0,20}">> "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data.
+
+ <<var;name="bullet";original="1.5.";match=".{0,20}">> "Executable" means Covered Code in any form other than Source Code.
+
+ <<var;name="bullet";original="1.6.";match=".{0,20}">> "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A.
+
+ <<var;name="bullet";original="1.7.";match=".{0,20}">> "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License.
+
+ <<var;name="bullet";original="1.8.";match=".{0,20}">> "License" means this document.
+
+ <<var;name="bullet";original="1.9.";match=".{0,20}">> "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is:
+
+ <<var;name="bullet";original="A.";match=".{0,20}">> Any addition to or deletion from the contents of a file containing Original Code or previous Modifications.
+
+ <<var;name="bullet";original="B.";match=".{0,20}">> Any new file that contains any part of the Original Code or previous Modifications.
+
+ <<var;name="bullet";original="1.10.";match=".{0,20}">> "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License.
+
+ <<var;name="bullet";original="1.11.";match=".{0,20}">> "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or a list of source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge.
+
+ <<var;name="bullet";original="1.12.";match=".{0,20}">> "You" means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity.
+
+ <<var;name="bullet";original="2.";match=".{0,20}">> Source Code License.
+
+ <<var;name="bullet";original="2.1.";match=".{0,20}">> The Initial Developer Grant.
+
+ The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims:
+
+ <<var;name="bullet";original="(a)";match=".{0,20}">> to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, or as part of a Larger Work; and
+
+ <<var;name="bullet";original="(b)";match=".{0,20}">> under patents now or hereafter owned or controlled by Initial Developer, to make, have made, use and sell ("Utilize") the Original Code (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Original Code (or portions thereof) and not to any greater extent that may be necessary to Utilize further Modifications or combinations.
+
+ <<var;name="bullet";original="2.2.";match=".{0,20}">> Contributor Grant.
+
+ Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims:
+
+ <<var;name="bullet";original="(a)";match=".{0,20}">> to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code or as part of a Larger Work; and
+
+ <<var;name="bullet";original="(b)";match=".{0,20}">> under patents now or hereafter owned or controlled by Contributor, to Utilize the Contributor Version (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Contributor Version (or portions thereof), and not to any greater extent that may be necessary to Utilize further Modifications or combinations.
+
+ <<var;name="bullet";original="3.";match=".{0,20}">> Distribution Obligations.
+
+ <<var;name="bullet";original="3.1.";match=".{0,20}">> Application of License.
+
+ The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5.
+
+ <<var;name="bullet";original="3.2.";match=".{0,20}">> Availability of Source Code.
+
+ Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party.
+
+ <<var;name="bullet";original="3.3.";match=".{0,20}">> Description of Modifications.
+
+ You must cause all Covered Code to which you contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code.
+
+ <<var;name="bullet";original="3.4.";match=".{0,20}">> Intellectual Property Matters
+
+ <<var;name="bullet";original="(a)";match=".{0,20}">> Third Party Claims.
+
+ If You have knowledge that a party claims an intellectual property right in particular functionality or code (or its utilization under this License), you must include a text file with the source code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If you obtain such knowledge after You make Your Modification available as described in Section 3.2, You shall promptly modify the LEGAL file in all copies You make available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained.
+
+ <<var;name="bullet";original="(b)";match=".{0,20}">> Contributor APIs.
+
+ If Your Modification is an application programming interface and You own or control patents which are reasonably necessary to implement that API, you must also include this information in the LEGAL file.
+
+ <<var;name="bullet";original="3.5.";match=".{0,20}">> Required Notices.
+
+ You must duplicate the notice in Exhibit A in each file of the Source Code, and this License in any documentation for the Source Code, where You describe recipients' rights relating to Covered Code. If You created one or more Modification(s), You may add your name as a Contributor to the notice described in Exhibit A. If it is not possible to put such notice in a particular Source Code file due to its structure, then you must include such notice in a location (such as a relevant directory file) where a user would be likely to look for such a notice. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
+
+ <<var;name="bullet";original="3.6.";match=".{0,20}">> Distribution of Executable Versions.
+
+ You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
+
+ <<var;name="bullet";original="3.7.";match=".{0,20}">> Larger Works.
+
+ You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code.
+
+ <<var;name="bullet";original="4.";match=".{0,20}">> Inability to Comply Due to Statute or Regulation.
+
+ If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
+
+ <<var;name="bullet";original="5.";match=".{0,20}">> Application of this License.
+
+ This License applies to code to which the Initial Developer has attached the notice in Exhibit A, and to related Covered Code.
+
+ <<var;name="bullet";original="6.";match=".{0,20}">> Versions of the License.
+
+ <<var;name="bullet";original="6.1.";match=".{0,20}">> New Versions.
+
+ Netscape Communications Corporation ("Netscape") may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number.
+
+ <<var;name="bullet";original="6.2.";match=".{0,20}">> Effect of New Versions.
+
+ Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netscape. No one other than Netscape has the right to modify the terms applicable to Covered Code created under this License.
+
+ <<var;name="bullet";original="6.3.";match=".{0,20}">> Derivative Works.
+
+ If you create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), you must (a) rename Your license so that the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", "NPL" or any confusingly similar phrase do not appear anywhere in your license and (b) otherwise make it clear that your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.)
+
+ <<var;name="bullet";original="7.";match=".{0,20}">> DISCLAIMER OF WARRANTY.
+
+ COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+ <<var;name="bullet";original="8.";match=".{0,20}">> TERMINATION.
+
+ This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
+
+ <<var;name="bullet";original="9.";match=".{0,20}">> LIMITATION OF LIABILITY.
+
+ UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+ <<var;name="bullet";original="10.";match=".{0,20}">> U.S. GOVERNMENT END USERS.
+
+ The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein.
+
+ <<var;name="bullet";original="11.";match=".{0,20}">> MISCELLANEOUS.
+
+ This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in, the United States of America: (a) unless otherwise agreed in writing, all disputes relating to this License (excepting any dispute relating to intellectual property rights) shall be subject to final and binding arbitration, with the losing party paying all costs of arbitration; (b) any arbitration relating to this Agreement shall be held in Santa Clara County, California, under the auspices of JAMS/EndDispute; and (c) any litigation relating to this Agreement shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License.
+
+ <<var;name="bullet";original="12.";match=".{0,20}">> RESPONSIBILITY FOR CLAIMS.
+
+ Except in cases where another Contributor has failed to comply with Section 3.4, You are responsible for damages arising, directly or indirectly, out of Your utilization of rights under this License, based on the number of copies of Covered Code you made available, the revenues you received from utilizing such rights, and other relevant factors. You agree to work with affected parties to distribute responsibility on an equitable basis.<<beginOptional>> EXHIBIT A.
+
+<<beginOptional>>"<<endOptional>>The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
+
+Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
+
+The Original Code is <<var;name="code";original="_____";match=".+">> . The Initial Developer of the Original Code is <<var;name="InitialDeveloper";original="_____";match=".+">> . Portions created by <<var;name="createdby";original="_____";match=".+">> are Copyright (C) <<var;name="copyright";original="_____";match=".+">> . All Rights Reserved. Contributor(s): <<var;name="contributor";original="_____";match=".+">> .<<beginOptional>>"<<endOptional>><<endOptional>>
+ false
+ MPL-1.0
+ "The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
+
+Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
+
+The Original Code is _____ . The Initial Developer of the Original Code is _____ . Portions created by _____ are Copyright (C) _____ . All Rights Reserved. Contributor(s): _____ ."
+
+
+ false
+ Copyright Saxonica Ltd
+
+
+
+
+ 85ed0817af83a24ad8da68c2b5094de69833983c
+
+
+
+
+
+
+
+ uses glibc-2_11-branch from git://sourceware.org/git/glibc.git.
+ glibc-2.11.1.tar.gz
+
+
+
+ 11b6d3ee554eedf79299905a98f9b9a04e498210b59f15094c916c91d150efcd
+
+
+
+
+
+ 85ed0817af83a24ad8da68c2b5094de69833983c
+
+
+ GNU C library.
+ Copyright 2008-2010 John Smith
+ The GNU C Library defines functions that are specified by the ISO C standard, as well as additional features specific to POSIX and other derivatives of the Unix operating system, and extensions specific to GNU systems.
+
+
+
+
+
+
+
+
+
+ ./package/foo.c
+ The concluded license was taken from the package level that the file was included in.
+
+
+
+ d6a770ba38583ed4bb4525bd96e50461655d2758
+
+
+
+
+
+
+ http://www.openjena.org/
+ NOASSERTION
+
+ NOASSERTION
+ This package was converted from a DOAP Project by the same name
+ Jena
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Copyright 2008-2010 John Smith
+
+
+ Person: File Commenter
+ File level annotation
+
+ 2011-01-29T18:30:22Z
+
+
+ The Regents of the University of California
+ Copyright (c) 2001 Aaron Lehmann aaroni@vitelus.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the �Software�), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED �AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+
+ 624c1abb3664f4b35547e7c73864ad24
+
+
+ Modified by Paul Mundt lethal@linux-sh.org
+
+ IBM Corporation
+ The concluded license was taken from the package level that the file was included in.
+This information was found in the COPYING.txt file in the xyz directory.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SPDX-2.2
+
+
+ false
+ <<beginOptional>> <<beginOptional>> Creative Commons<<beginOptional>> Legal Code<<endOptional>><<endOptional>>
+
+CC0 1.0 Universal<<endOptional>><<beginOptional>> CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER.<<endOptional>>
+
+Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").
+
+Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
+
+For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
+
+ <<var;name="bullet";original="1.";match=".{0,20}">> Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:
+
+ <<var;name="bullet";original="i.";match=".{0,20}">> the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
+
+ <<var;name="bullet";original="ii.";match=".{0,20}">> moral rights retained by the original author(s) and/or performer(s);
+
+ <<var;name="bullet";original="iii.";match=".{0,20}">> publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
+
+ <<var;name="bullet";original="iv.";match=".{0,20}">> rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;
+
+ <<var;name="bullet";original="v.";match=".{0,20}">> rights protecting the extraction, dissemination, use and reuse of data in a Work;
+
+ <<var;name="bullet";original="vi.";match=".{0,20}">> database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
+
+ <<var;name="bullet";original="vii.";match=".{0,20}">> other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
+
+ <<var;name="bullet";original="2.";match=".{0,20}">> Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
+
+ <<var;name="bullet";original="3.";match=".{0,20}">> Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.
+
+ <<var;name="bullet";original="4.";match=".{0,20}">> Limitations and Disclaimers.
+
+ <<var;name="bullet";original="a.";match=".{0,20}">> No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
+
+ <<var;name="bullet";original="b.";match=".{0,20}">> Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
+
+ <<var;name="bullet";original="c.";match=".{0,20}">> Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
+
+ <<var;name="bullet";original="d.";match=".{0,20}">> Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.<<beginOptional>> <<var;name="upstreamLink";original="";match="For more information, please see <http://creativecommons.org/publicdomain/zero/1.0/>">><<endOptional>>
+ true
+ false
+
+
+ 0
+ 2020-11-25 - 21:49:19
+ https://creativecommons.org/publicdomain/zero/1.0/legalcode
+ false
+ false
+ true
+ true
+
+
+ Creative Commons Zero v1.0 Universal
+ CC0-1.0
+ Creative Commons Legal Code
+
+CC0 1.0 Universal
+
+ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
+ LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
+ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
+ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
+ REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
+ PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
+ THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
+ HEREUNDER.
+
+Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer
+exclusive Copyright and Related Rights (defined below) upon the creator
+and subsequent owner(s) (each and all, an "owner") of an original work of
+authorship and/or a database (each, a "Work").
+
+Certain owners wish to permanently relinquish those rights to a Work for
+the purpose of contributing to a commons of creative, cultural and
+scientific works ("Commons") that the public can reliably and without fear
+of later claims of infringement build upon, modify, incorporate in other
+works, reuse and redistribute as freely as possible in any form whatsoever
+and for any purposes, including without limitation commercial purposes.
+These owners may contribute to the Commons to promote the ideal of a free
+culture and the further production of creative, cultural and scientific
+works, or to gain reputation or greater distribution for their Work in
+part through the use and efforts of others.
+
+For these and/or other purposes and motivations, and without any
+expectation of additional consideration or compensation, the person
+associating CC0 with a Work (the "Affirmer"), to the extent that he or she
+is an owner of Copyright and Related Rights in the Work, voluntarily
+elects to apply CC0 to the Work and publicly distribute the Work under its
+terms, with knowledge of his or her Copyright and Related Rights in the
+Work and the meaning and intended legal effect of CC0 on those rights.
+
+1. Copyright and Related Rights. A Work made available under CC0 may be
+protected by copyright and related or neighboring rights ("Copyright and
+Related Rights"). Copyright and Related Rights include, but are not
+limited to, the following:
+
+ i. the right to reproduce, adapt, distribute, perform, display,
+ communicate, and translate a Work;
+ ii. moral rights retained by the original author(s) and/or performer(s);
+iii. publicity and privacy rights pertaining to a person's image or
+ likeness depicted in a Work;
+ iv. rights protecting against unfair competition in regards to a Work,
+ subject to the limitations in paragraph 4(a), below;
+ v. rights protecting the extraction, dissemination, use and reuse of data
+ in a Work;
+ vi. database rights (such as those arising under Directive 96/9/EC of the
+ European Parliament and of the Council of 11 March 1996 on the legal
+ protection of databases, and under any national implementation
+ thereof, including any amended or successor version of such
+ directive); and
+vii. other similar, equivalent or corresponding rights throughout the
+ world based on applicable law or treaty, and any national
+ implementations thereof.
+
+2. Waiver. To the greatest extent permitted by, but not in contravention
+of, applicable law, Affirmer hereby overtly, fully, permanently,
+irrevocably and unconditionally waives, abandons, and surrenders all of
+Affirmer's Copyright and Related Rights and associated claims and causes
+of action, whether now known or unknown (including existing as well as
+future claims and causes of action), in the Work (i) in all territories
+worldwide, (ii) for the maximum duration provided by applicable law or
+treaty (including future time extensions), (iii) in any current or future
+medium and for any number of copies, and (iv) for any purpose whatsoever,
+including without limitation commercial, advertising or promotional
+purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
+member of the public at large and to the detriment of Affirmer's heirs and
+successors, fully intending that such Waiver shall not be subject to
+revocation, rescission, cancellation, termination, or any other legal or
+equitable action to disrupt the quiet enjoyment of the Work by the public
+as contemplated by Affirmer's express Statement of Purpose.
+
+3. Public License Fallback. Should any part of the Waiver for any reason
+be judged legally invalid or ineffective under applicable law, then the
+Waiver shall be preserved to the maximum extent permitted taking into
+account Affirmer's express Statement of Purpose. In addition, to the
+extent the Waiver is so judged Affirmer hereby grants to each affected
+person a royalty-free, non transferable, non sublicensable, non exclusive,
+irrevocable and unconditional license to exercise Affirmer's Copyright and
+Related Rights in the Work (i) in all territories worldwide, (ii) for the
+maximum duration provided by applicable law or treaty (including future
+time extensions), (iii) in any current or future medium and for any number
+of copies, and (iv) for any purpose whatsoever, including without
+limitation commercial, advertising or promotional purposes (the
+"License"). The License shall be deemed effective as of the date CC0 was
+applied by Affirmer to the Work. Should any part of the License for any
+reason be judged legally invalid or ineffective under applicable law, such
+partial invalidity or ineffectiveness shall not invalidate the remainder
+of the License, and in such case Affirmer hereby affirms that he or she
+will not (i) exercise any of his or her remaining Copyright and Related
+Rights in the Work or (ii) assert any associated claims and causes of
+action with respect to the Work, in either case contrary to Affirmer's
+express Statement of Purpose.
+
+4. Limitations and Disclaimers.
+
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
+ surrendered, licensed or otherwise affected by this document.
+ b. Affirmer offers the Work as-is and makes no representations or
+ warranties of any kind concerning the Work, express, implied,
+ statutory or otherwise, including without limitation warranties of
+ title, merchantability, fitness for a particular purpose, non
+ infringement, or the absence of latent or other defects, accuracy, or
+ the present or absence of errors, whether or not discoverable, all to
+ the greatest extent permissible under applicable law.
+ c. Affirmer disclaims responsibility for clearing rights of other persons
+ that may apply to the Work or any use thereof, including without
+ limitation any person's Copyright and Related Rights in the Work.
+ Further, Affirmer disclaims responsibility for obtaining any necessary
+ consents, permissions or other rights required for any use of the
+ Work.
+ d. Affirmer understands and acknowledges that Creative Commons is not a
+ party to this document and has no duty or obligation with respect to
+ this CC0 or use of the Work.
+
+ https://creativecommons.org/publicdomain/zero/1.0/legalcode
+
+
+
+
+
+ LicenseRef-Beerware-4.2
+ "THE BEER-WARE LICENSE" (Revision 42):
+phk@FreeBSD.ORG wrote this file. As long as you retain this notice you
+can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return Poul-Henning Kamp </
+LicenseName: Beer-Ware License (Version 42)
+LicenseCrossReference: http://people.freebsd.org/~phk/
+LicenseComment:
+The beerware license has a couple of other standard variants.
+
+
+
+
+
+
+
+
+ d6a770ba38583ed4bb4525bd96e50461655d2759
+
+
+ DocumentRef-spdx-tool-1.2
+
+
+
+
+ LicenseRef-4
+ /*
+ * (c) Copyright 2009 University of Bristol
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+
+
+ This package has been shipped in source and binary form.
+The binaries were created with gcc 4.5.1 and expect to link to
+compatible system run time libraries.
+ 2010-01-29T18:30:22Z
+ Person: Jane Doe ()
+ Organization: ExampleCodeInspect ()
+ Tool: LicenseFind-1.0
+ 3.9
+
+
+
+ This document was created using SPDX 2.0 using licenses from the web site.
+
+
+ Person: Suzanne Reviewer
+ Another example reviewer.
+
+ 2011-03-13T00:00:00Z
+
+
+
+
+ Person: Joe Reviewer
+ This is just an example. Some of the non-standard licenses look like they are actually BSD 3 clause licenses
+
+ 2010-02-10T00:00:00Z
+
+
+ SPDX-Tools-v2.0
+
+
+ Person: Jane Doe ()
+ Document level annotation
+
+ 2010-01-29T18:30:22Z
+
+
+
+
+
+ http://commons.apache.org/proper/commons-lang/
+ NOASSERTION
+
+ NOASSERTION
+ This package was converted from a DOAP Project by the same name
+ Apache Commons Lang
+
+ false
+
+
diff --git a/tests/data/formats/SPDXRdfExample-v2.3.spdx.rdf b/tests/data/formats/SPDXRdfExample-v2.3.spdx.rdf
new file mode 100644
index 000000000..fbc0feb04
--- /dev/null
+++ b/tests/data/formats/SPDXRdfExample-v2.3.spdx.rdf
@@ -0,0 +1,4342 @@
+
+
+
+ from linux kernel
+ Copyright 2008-2010 John Smith
+ The concluded license was taken from package xyz, from which the snippet was copied into the current file. The concluded license information was found in the COPYING.txt file in package xyz.
+
+
+ Copyright 2010, 2011 Source Auditor Inc.
+ Open Logic Inc.
+ ./src/org/spdx/parser/DOAPProject.java
+ Black Duck Software In.c
+ Source Auditor Inc.
+ SPDX Technical Team Members
+
+
+ <<beginOptional>>Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/
+
+<<endOptional>><<beginOptional>> TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+<<endOptional>>
+
+ <<var;name="bullet";original="1.";match=".{0,20}">> Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+ <<var;name="bullet";original="2.";match=".{0,20}">> Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+ <<var;name="bullet";original="3.";match=".{0,20}">> Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+ <<var;name="bullet";original="4.";match=".{0,20}">> Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+ <<var;name="bullet";original="(a)";match=".{0,20}">> You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+ <<var;name="bullet";original="(b)";match=".{0,20}">> You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+ <<var;name="bullet";original="(c)";match=".{0,20}">> You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+ <<var;name="bullet";original="(d)";match=".{0,20}">> If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+ <<var;name="bullet";original="5.";match=".{0,20}">> Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+ <<var;name="bullet";original="6.";match=".{0,20}">> Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+ <<var;name="bullet";original="7.";match=".{0,20}">> Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+ <<var;name="bullet";original="8.";match=".{0,20}">> Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+ <<var;name="bullet";original="9.";match=".{0,20}">> Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.<<beginOptional>> END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+Copyright <<var;name="copyright";original="[yyyy] [name of copyright owner]";match=".+">>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+
+distributed under the License is distributed on an "AS IS" BASIS,
+
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+See the License for the specific language governing permissions and
+
+limitations under the License.
+
+<<endOptional>>
+ This license was released January 2004
+ Apache License 2.0
+
+
+ 0
+ 2022-05-09T00:09:00Z
+ https://www.apache.org/licenses/LICENSE-2.0
+ true
+ false
+ true
+ true
+
+
+
+ <p>Copyright <var class="replacable-license-text"> [yyyy] [name of copyright owner]</var></p>
+
+ <p>Licensed under the Apache License, Version 2.0 (the "License");
+ <br />
+
+you may not use this file except in compliance with the License.
+ <br />
+
+You may obtain a copy of the License at
+ </p>
+
+ <p>http://www.apache.org/licenses/LICENSE-2.0</p>
+
+ <p>Unless required by applicable law or agreed to in writing, software
+ <br />
+
+distributed under the License is distributed on an "AS IS" BASIS,
+ <br />
+
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ <br />
+
+See the License for the specific language governing permissions and
+ <br />
+
+limitations under the License.
+ </p>
+
+
+ https://www.apache.org/licenses/LICENSE-2.0
+ Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+
+distributed under the License is distributed on an "AS IS" BASIS,
+
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+See the License for the specific language governing permissions and
+
+limitations under the License.
+
+
+ Copyright <<var;name="copyright";original="[yyyy] [name of copyright owner]";match=".+">>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+
+distributed under the License is distributed on an "AS IS" BASIS,
+
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+See the License for the specific language governing permissions and
+
+limitations under the License.
+
+
+
+ <div class="optional-license-text">
+ <p>Apache License
+ <br />
+
+Version 2.0, January 2004
+ <br />
+
+http://www.apache.org/licenses/
+ </p>
+
+ </div>
+ <div class="optional-license-text">
+ <p>TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION</p>
+
+ </div>
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> 1.</var>
+ Definitions.
+
+<ul style="list-style:none">
+
+<li>
+ <p>"License" shall mean the terms and conditions for use, reproduction, and distribution
+ as defined by Sections 1 through 9 of this document.</p>
+
+ </li>
+
+<li>
+ <p>"Licensor" shall mean the copyright owner or entity authorized by the copyright owner
+ that is granting the License.</p>
+
+ </li>
+
+<li>
+ <p>"Legal Entity" shall mean the union of the acting entity and all other entities that
+ control, are controlled by, or are under common control with that entity. For the purposes of
+ this definition, "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or otherwise, or (ii) ownership of
+ fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such
+ entity.</p>
+
+ </li>
+
+<li>
+ <p>"You" (or "Your") shall mean an individual or Legal Entity exercising
+ permissions granted by this License.</p>
+
+ </li>
+
+<li>
+ <p>"Source" form shall mean the preferred form for making modifications, including but not
+ limited to software source code, documentation source, and configuration files.</p>
+
+ </li>
+
+<li>
+ <p>"Object" form shall mean any form resulting from mechanical transformation or
+ translation of a Source form, including but not limited to compiled object code, generated
+ documentation, and conversions to other media types.</p>
+
+ </li>
+
+<li>
+ <p>"Work" shall mean the work of authorship, whether in Source or Object form, made
+ available under the License, as indicated by a copyright notice that is included in or
+ attached to the work (an example is provided in the Appendix below).</p>
+
+ </li>
+
+<li>
+ <p>"Derivative Works" shall mean any work, whether in Source or Object form, that is based
+ on (or derived from) the Work and for which the editorial revisions, annotations,
+ elaborations, or other modifications represent, as a whole, an original work of authorship.
+ For the purposes of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative
+ Works thereof.</p>
+
+ </li>
+
+<li>
+ <p>"Contribution" shall mean any work of authorship, including the original version of the
+ Work and any modifications or additions to that Work or Derivative Works thereof, that is
+ intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an
+ individual or Legal Entity authorized to submit on behalf of the copyright owner. For the
+ purposes of this definition, "submitted" means any form of electronic, verbal, or
+ written communication sent to the Licensor or its representatives, including but not limited
+ to communication on electronic mailing lists, source code control systems, and issue tracking
+ systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and
+ improving the Work, but excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."</p>
+
+ </li>
+
+<li>
+ <p>"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom
+ a Contribution has been received by Licensor and subsequently incorporated within the
+ Work.</p>
+
+ </li>
+
+</ul>
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 2.</var>
+ Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor
+ hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
+ irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or
+ Object form.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 3.</var>
+ Grant of Patent License. Subject to the terms and conditions of this License, each Contributor
+ hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
+ irrevocable (except as stated in this section) patent license to make, have made, use, offer
+ to sell, sell, import, and otherwise transfer the Work, where such license applies only to
+ those patent claims licensable by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s) with the Work to which such
+ Contribution(s) was submitted. If You institute patent litigation against any entity
+ (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a
+ Contribution incorporated within the Work constitutes direct or contributory patent
+ infringement, then any patent licenses granted to You under this License for that Work shall
+ terminate as of the date such litigation is filed.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 4.</var>
+ Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof
+ in any medium, with or without modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> (a)</var>
+ You must give any other recipients of the Work or Derivative Works a copy of this License; and
+ </li>
+
+<li>
+ <var class="replacable-license-text"> (b)</var>
+ You must cause any modified files to carry prominent notices stating that You changed the files; and
+ </li>
+
+<li>
+ <var class="replacable-license-text"> (c)</var>
+ You must retain, in the Source form of any Derivative Works that You distribute, all
+ copyright, patent, trademark, and attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of the Derivative Works; and
+ </li>
+
+<li>
+ <var class="replacable-license-text"> (d)</var>
+ If the Work includes a "NOTICE" text file as part of its distribution, then any
+ Derivative Works that You distribute must include a readable copy of the attribution
+ notices contained within such NOTICE file, excluding those notices that do not pertain to
+ any part of the Derivative Works, in at least one of the following places: within a NOTICE
+ text file distributed as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or, within a display generated
+ by the Derivative Works, if and wherever such third-party notices normally appear. The
+ contents of the NOTICE file are for informational purposes only and do not modify the
+ License. You may add Your own attribution notices within Derivative Works that You
+ distribute, alongside or as an addendum to the NOTICE text from the Work, provided that
+ such additional attribution notices cannot be construed as modifying the License.
+ <p>You may add Your own copyright statement to Your modifications and may provide additional or
+ different license terms and conditions for use, reproduction, or distribution of Your
+ modifications, or for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with the conditions stated
+ in this License.</p>
+
+ </li>
+
+</ul>
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 5.</var>
+ Submission of Contributions. Unless You explicitly state otherwise, any Contribution
+ intentionally submitted for inclusion in the Work by You to the Licensor shall be under the
+ terms and conditions of this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate
+ license agreement you may have executed with Licensor regarding such Contributions.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 6.</var>
+ Trademarks. This License does not grant permission to use the trade names, trademarks, service
+ marks, or product names of the Licensor, except as required for reasonable and customary use
+ in describing the origin of the Work and reproducing the content of the NOTICE file.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 7.</var>
+ Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor
+ provides the Work (and each Contributor provides its Contributions) on an "AS IS"
+ BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including,
+ without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY,
+ or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any risks associated with Your
+ exercise of permissions under this License.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 8.</var>
+ Limitation of Liability. In no event and under no legal theory, whether in tort (including
+ negligence), contract, or otherwise, unless required by applicable law (such as deliberate and
+ grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for
+ damages, including any direct, indirect, special, incidental, or consequential damages of any
+ character arising as a result of this License or out of the use or inability to use the Work
+ (including but not limited to damages for loss of goodwill, work stoppage, computer failure or
+ malfunction, or any and all other commercial damages or losses), even if such Contributor has
+ been advised of the possibility of such damages.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 9.</var>
+ Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works
+ thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty,
+ indemnity, or other liability obligations and/or rights consistent with this License. However,
+ in accepting such obligations, You may act only on Your own behalf and on Your sole
+ responsibility, not on behalf of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability incurred by, or claims asserted
+ against, such Contributor by reason of your accepting any such warranty or additional
+ liability.
+ </li>
+
+</ul>
+
+ <div class="optional-license-text">
+ <p>END OF TERMS AND CONDITIONS</p>
+
+ <p>APPENDIX: How to apply the Apache License to your work.</p>
+
+ <p>To apply the Apache License to your work, attach the following boilerplate notice, with the fields
+ enclosed by brackets "[]" replaced with your own identifying information. (Don't
+ include the brackets!) The text should be enclosed in the appropriate comment syntax for the file
+ format. We also recommend that a file or class name and description of purpose be included on the same
+ "printed page" as the copyright notice for easier identification within third-party
+ archives.</p>
+
+ <p>Copyright <var class="replacable-license-text"> [yyyy] [name of copyright owner]</var></p>
+
+ <p>Licensed under the Apache License, Version 2.0 (the "License");
+ <br />
+
+you may not use this file except in compliance with the License.
+ <br />
+
+You may obtain a copy of the License at
+ </p>
+
+ <p>http://www.apache.org/licenses/LICENSE-2.0</p>
+
+ <p>Unless required by applicable law or agreed to in writing, software
+ <br />
+
+distributed under the License is distributed on an "AS IS" BASIS,
+ <br />
+
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ <br />
+
+See the License for the specific language governing permissions and
+ <br />
+
+limitations under the License.
+ </p>
+
+ </div>
+
+ true
+ true
+ https://opensource.org/licenses/Apache-2.0
+ false
+ Apache-2.0
+
+
+ 1
+ 2022-05-09T00:09:01Z
+ https://opensource.org/licenses/Apache-2.0
+ true
+ false
+ true
+ true
+
+
+ Apache License
+Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+
+ Protecode Inc.
+
+
+
+
+
+ 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
+
+
+
+
+
+
+ <<beginOptional>>GNU GENERAL PUBLIC LICENSE
+
+Version 2, June 1991
+
+<<endOptional>>
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc. <<var;name="incComma";original="";match=",|">>
+
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301<<beginOptional>>, <<endOptional>> USA
+
+Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
+
+When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and modification follow.
+
+<<var;name="termsTitle";original="";match="GNU GENERAL PUBLIC LICENSE|">> TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ <<var;name="bullet";original="0.";match=".{0,20}">> This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
+
+ Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
+
+ <<var;name="bullet";original="1.";match=".{0,20}">> You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
+
+ You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+
+ <<var;name="bullet";original="2.";match=".{0,20}">> You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+
+ <<var;name="bullet";original="a)";match=".{0,20}">> You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
+
+ <<var;name="bullet";original="b)";match=".{0,20}">> You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
+
+ <<var;name="bullet";original="c)";match=".{0,20}">> If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
+
+ These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+
+ Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
+
+ In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+
+ <<var;name="bullet";original="3.";match=".{0,20}">> You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
+
+ <<var;name="bullet";original="a)";match=".{0,20}">> Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+
+ <<var;name="bullet";original="b)";match=".{0,20}">> Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+
+ <<var;name="bullet";original="c)";match=".{0,20}">> Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
+
+ The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+
+ If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
+
+ <<var;name="bullet";original="4.";match=".{0,20}">> You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+
+ <<var;name="bullet";original="5.";match=".{0,20}">> You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
+
+ <<var;name="bullet";original="6.";match=".{0,20}">> Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
+
+ <<var;name="bullet";original="7.";match=".{0,20}">> If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
+
+ If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
+
+ It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
+
+ This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+
+ <<var;name="bullet";original="8.";match=".{0,20}">> If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
+
+ <<var;name="bullet";original="9.";match=".{0,20}">> The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
+
+ <<var;name="bullet";original="10.";match=".{0,20}">> If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ <<var;name="bullet";original="11.";match=".{0,20}">> BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ <<var;name="bullet";original="12.";match=".{0,20}">> IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.<<beginOptional>> END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
+
+<<beginOptional>><<<endOptional>>one line to give the program's name and <<var;name="ideaArticle";original="an";match="a brief|an">> idea of what it does.<<beginOptional>>><<endOptional>>
+
+Copyright (C)<<beginOptional>><<<endOptional>> <<var;name="templateYear";original="yyyy";match="yyyy|year">><<beginOptional>>> <<endOptional>><<beginOptional>> <<<endOptional>>name of author<<beginOptional>>><<endOptional>>
+
+This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301<<beginOptional>>, <<endOptional>> USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
+
+Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
+
+Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+<<beginOptional>><<<endOptional>>signature of Ty Coon<<beginOptional>> ><<endOptional>>, 1 April 1989 Ty Coon, President of Vice
+
+<<endOptional>><<beginOptional>> This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License.
+
+<<endOptional>>
+ https://opensource.org/licenses/GPL-2.0
+ This license was released: June 1991. This license identifier refers to the choice to use the code under GPL-2.0-only, as distinguished from use of code under GPL-2.0-or-later (i.e., GPL-2.0 or some later version). The license notice (as seen in the Standard License Header field below) states which of these applies to the code in the file. The example in the exhibit to the license shows the license notice for the "or later" approach.
+ GPL-2.0-only
+ https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
+
+
+ 0
+ 2022-05-09T00:00:00Z
+ https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
+ true
+ false
+ true
+ true
+
+
+ true
+
+
+ 1
+ 2022-05-09T00:00:00Z
+ https://opensource.org/licenses/GPL-2.0
+ false
+ false
+ true
+ true
+
+
+ Copyright (C) <<var;name="copyright";original="yyyy name of author";match=".+">>
+
+This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301<<beginOptional>>, <<endOptional>> USA.
+
+
+ false
+ GNU General Public License v2.0 only
+
+ <div class="optional-license-text">
+ <p>
+ GNU GENERAL PUBLIC LICENSE<br />
+
+ Version 2, June 1991
+ </p>
+
+ </div>
+ <p>
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.<var class="replacable-license-text"> </var><br />
+
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301<var class="optional-license-text">, </var>
+ USA
+ </p>
+
+ <p>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+ </p>
+
+ <p>
+ Preamble
+ </p>
+
+ <p>
+ The licenses for most software are designed to take away your freedom
+ to share and change it. By contrast, the GNU General Public License is
+ intended to guarantee your freedom to share and change free software--to
+ make sure the software is free for all its users. This General Public
+ License applies to most of the Free Software Foundation's software
+ and to any other program whose authors commit to using it. (Some other
+ Free Software Foundation software is covered by the GNU Lesser General
+ Public License instead.) You can apply it to your programs, too.
+ </p>
+
+ <p>
+ When we speak of free software, we are referring to freedom, not price.
+ Our General Public Licenses are designed to make sure that you have
+ the freedom to distribute copies of free software (and charge for
+ this service if you wish), that you receive source code or can get
+ it if you want it, that you can change the software or use pieces of
+ it in new free programs; and that you know you can do these things.
+ </p>
+
+ <p>
+ To protect your rights, we need to make restrictions that forbid
+ anyone to deny you these rights or to ask you to surrender the
+ rights. These restrictions translate to certain responsibilities for
+ you if you distribute copies of the software, or if you modify it.
+ </p>
+
+ <p>
+ For example, if you distribute copies of such a program, whether gratis
+ or for a fee, you must give the recipients all the rights that you
+ have. You must make sure that they, too, receive or can get the source
+ code. And you must show them these terms so they know their rights.
+ </p>
+
+ <p>
+ We protect your rights with two steps: (1) copyright the
+ software, and (2) offer you this license which gives you legal
+ permission to copy, distribute and/or modify the software.
+ </p>
+
+ <p>
+ Also, for each author's protection and ours, we want to make
+ certain that everyone understands that there is no warranty for
+ this free software. If the software is modified by someone else
+ and passed on, we want its recipients to know that what they
+ have is not the original, so that any problems introduced by
+ others will not reflect on the original authors' reputations.
+ </p>
+
+ <p>
+ Finally, any free program is threatened constantly by software patents.
+ We wish to avoid the danger that redistributors of a free program
+ will individually obtain patent licenses, in effect making the program
+ proprietary. To prevent this, we have made it clear that any patent
+ must be licensed for everyone's free use or not licensed at all.
+ </p>
+
+ <p>
+ The precise terms and conditions for copying,
+ distribution and modification follow.
+ </p>
+
+ <p>
+ <var class="replacable-license-text"> </var>
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+ </p>
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> 0.</var>
+ This License applies to any program or other work which contains a
+ notice placed by the copyright holder saying it may be distributed
+ under the terms of this General Public License. The "Program", below,
+ refers to any such program or work, and a "work based on the Program"
+ means either the Program or any derivative work under copyright law:
+ that is to say, a work containing the Program or a portion of it,
+ either verbatim or with modifications and/or translated into another
+ language. (Hereinafter, translation is included without limitation
+ in the term "modification".) Each licensee is addressed as "you".
+ <p>
+ Activities other than copying, distribution and modification are
+ not covered by this License; they are outside its scope. The act
+ of running the Program is not restricted, and the output from the
+ Program is covered only if its contents constitute a work based
+ on the Program (independent of having been made by running the
+ Program). Whether that is true depends on what the Program does.
+ </p>
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 1.</var>
+ You may copy and distribute verbatim copies of the Program's source
+ code as you receive it, in any medium, provided that you conspicuously
+ and appropriately publish on each copy an appropriate copyright notice
+ and disclaimer of warranty; keep intact all the notices that refer to
+ this License and to the absence of any warranty; and give any other
+ recipients of the Program a copy of this License along with the Program.
+ <p>
+ You may charge a fee for the physical act of
+ transferring a copy, and you may at your option
+ offer warranty protection in exchange for a fee.
+ </p>
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 2.</var>
+ You may modify your copy or copies of the Program or any portion
+ of it, thus forming a work based on the Program, and copy and
+ distribute such modifications or work under the terms of Section
+ 1 above, provided that you also meet all of these conditions:
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> a)</var>
+ You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> b)</var>
+ You must cause any work that you distribute or publish,
+ that in whole or in part contains or is derived from the
+ Program or any part thereof, to be licensed as a whole at no
+ charge to all third parties under the terms of this License.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> c)</var>
+ If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display
+ an announcement including an appropriate copyright notice and
+ a notice that there is no warranty (or else, saying that you
+ provide a warranty) and that users may redistribute the program
+ under these conditions, and telling the user how to view a copy
+ of this License. (Exception: if the Program itself is interactive
+ but does not normally print such an announcement, your work
+ based on the Program is not required to print an announcement.)
+ </li>
+
+</ul>
+ <p>
+ These requirements apply to the modified work as a whole. If
+ identifiable sections of that work are not derived from the
+ Program, and can be reasonably considered independent and separate
+ works in themselves, then this License, and its terms, do not
+ apply to those sections when you distribute them as separate
+ works. But when you distribute the same sections as part of a
+ whole which is a work based on the Program, the distribution
+ of the whole must be on the terms of this License, whose
+ permissions for other licensees extend to the entire whole,
+ and thus to each and every part regardless of who wrote it.
+ </p>
+
+ <p>
+ Thus, it is not the intent of this section to claim rights or
+ contest your rights to work written entirely by you; rather,
+ the intent is to exercise the right to control the distribution
+ of derivative or collective works based on the Program.
+ </p>
+
+ <p>
+ In addition, mere aggregation of another work not based on
+ the Program with the Program (or with a work based on the
+ Program) on a volume of a storage or distribution medium does
+ not bring the other work under the scope of this License.
+ </p>
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 3.</var>
+ You may copy and distribute the Program (or a work based on it,
+ under Section 2) in object code or executable form under the terms of
+ Sections 1 and 2 above provided that you also do one of the following:
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> a)</var>
+ Accompany it with the complete corresponding machine-readable source
+ code, which must be distributed under the terms of Sections 1 and
+ 2 above on a medium customarily used for software interchange; or,
+ </li>
+
+<li>
+ <var class="replacable-license-text"> b)</var>
+ Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to
+ be distributed under the terms of Sections 1 and 2 above
+ on a medium customarily used for software interchange; or,
+ </li>
+
+<li>
+ <var class="replacable-license-text"> c)</var>
+ Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative
+ is allowed only for noncommercial distribution and only if
+ you received the program in object code or executable form
+ with such an offer, in accord with Subsection b above.)
+ </li>
+
+</ul>
+ <p>
+ The source code for a work means the preferred form of the work
+ for making modifications to it. For an executable work, complete
+ source code means all the source code for all modules it contains,
+ plus any associated interface definition files, plus the scripts
+ used to control compilation and installation of the executable.
+ However, as a special exception, the source code distributed
+ need not include anything that is normally distributed (in either
+ source or binary form) with the major components (compiler,
+ kernel, and so on) of the operating system on which the executable
+ runs, unless that component itself accompanies the executable.
+ </p>
+
+ <p>
+ If distribution of executable or object code is made by offering
+ access to copy from a designated place, then offering equivalent
+ access to copy the source code from the same place counts as
+ distribution of the source code, even though third parties are
+ not compelled to copy the source along with the object code.
+ </p>
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 4.</var>
+ You may not copy, modify, sublicense, or distribute the Program
+ except as expressly provided under this License. Any attempt
+ otherwise to copy, modify, sublicense or distribute the Program
+ is void, and will automatically terminate your rights under
+ this License. However, parties who have received copies, or
+ rights, from you under this License will not have their licenses
+ terminated so long as such parties remain in full compliance.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 5.</var>
+ You are not required to accept this License, since you have
+ not signed it. However, nothing else grants you permission to
+ modify or distribute the Program or its derivative works. These
+ actions are prohibited by law if you do not accept this License.
+ Therefore, by modifying or distributing the Program (or any
+ work based on the Program), you indicate your acceptance of this
+ License to do so, and all its terms and conditions for copying,
+ distributing or modifying the Program or works based on it.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 6.</var>
+ Each time you redistribute the Program (or any work based on the
+ Program), the recipient automatically receives a license from the
+ original licensor to copy, distribute or modify the Program subject to
+ these terms and conditions. You may not impose any further restrictions
+ on the recipients' exercise of the rights granted herein. You are not
+ responsible for enforcing compliance by third parties to this License.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 7.</var>
+ If, as a consequence of a court judgment or allegation of patent
+ infringement or for any other reason (not limited to patent issues),
+ conditions are imposed on you (whether by court order, agreement
+ or otherwise) that contradict the conditions of this License,
+ they do not excuse you from the conditions of this License. If you
+ cannot distribute so as to satisfy simultaneously your obligations
+ under this License and any other pertinent obligations, then as a
+ consequence you may not distribute the Program at all. For example,
+ if a patent license would not permit royalty-free redistribution of
+ the Program by all those who receive copies directly or indirectly
+ through you, then the only way you could satisfy both it and this
+ License would be to refrain entirely from distribution of the Program.
+ <p>
+ If any portion of this section is held invalid or
+ unenforceable under any particular circumstance, the
+ balance of the section is intended to apply and the section
+ as a whole is intended to apply in other circumstances.
+ </p>
+
+ <p>
+ It is not the purpose of this section to induce you to infringe
+ any patents or other property right claims or to contest
+ validity of any such claims; this section has the sole purpose
+ of protecting the integrity of the free software distribution
+ system, which is implemented by public license practices. Many
+ people have made generous contributions to the wide range of
+ software distributed through that system in reliance on consistent
+ application of that system; it is up to the author/donor to
+ decide if he or she is willing to distribute software through
+ any other system and a licensee cannot impose that choice.
+ </p>
+
+ <p>
+ This section is intended to make thoroughly clear what is
+ believed to be a consequence of the rest of this License.
+ </p>
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 8.</var>
+ If the distribution and/or use of the Program is restricted in
+ certain countries either by patents or by copyrighted interfaces,
+ the original copyright holder who places the Program under this
+ License may add an explicit geographical distribution limitation
+ excluding those countries, so that distribution is permitted only
+ in or among countries not thus excluded. In such case, this License
+ incorporates the limitation as if written in the body of this License.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 9.</var>
+ The Free Software Foundation may publish revised and/or new
+ versions of the General Public License from time to time. Such
+ new versions will be similar in spirit to the present version,
+ but may differ in detail to address new problems or concerns.
+ <p>
+ Each version is given a distinguishing version number. If the
+ Program specifies a version number of this License which applies
+ to it and "any later version", you have the option of following
+ the terms and conditions either of that version or of any later
+ version published by the Free Software Foundation. If the Program
+ does not specify a version number of this License, you may choose
+ any version ever published by the Free Software Foundation.
+ </p>
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 10.</var>
+ If you wish to incorporate parts of the Program into other free
+ programs whose distribution conditions are different, write to the
+ author to ask for permission. For software which is copyrighted by the
+ Free Software Foundation, write to the Free Software Foundation; we
+ sometimes make exceptions for this. Our decision will be guided by the
+ two goals of preserving the free status of all derivatives of our free
+ software and of promoting the sharing and reuse of software generally.
+ <p>
+ NO WARRANTY
+ </p>
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 11.</var>
+ BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
+ WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
+ PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND,
+ EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
+ THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU
+ ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 12.</var>
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
+ DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
+ DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM
+ (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
+ INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
+ THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
+ OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ </li>
+
+</ul>
+ <div class="optional-license-text">
+ <p>
+ END OF TERMS AND CONDITIONS
+ </p>
+
+ <p>
+ How to Apply These Terms to Your New Programs
+ </p>
+
+ <p>
+ If you develop a new program, and you want it to be
+ of the greatest possible use to the public, the best
+ way to achieve this is to make it free software which
+ everyone can redistribute and change under these terms.
+ </p>
+
+ <p>
+ To do so, attach the following notices to the program. It is safest
+ to attach them to the start of each source file to most effectively
+ convey the exclusion of warranty; and each file should have at least
+ the "copyright" line and a pointer to where the full notice is found.
+ </p>
+
+ <p>
+ <var class="optional-license-text"><</var>one line to give the program's name and <var class="replacable-license-text"> an</var> idea of what it does.<var class="optional-license-text">></var>
+ <br />
+
+ Copyright (C)
+ <var class="optional-license-text"><</var><var class="replacable-license-text"> yyyy</var><var class="optional-license-text">> </var>
+ <var class="optional-license-text"> <</var>name of author<var class="optional-license-text">></var>
+ </p>
+
+ <p>
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version
+ 2 of the License, or (at your option) any later version.
+ </p>
+
+ <p>
+ This program is distributed in the hope that it will be
+ useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the GNU General Public License for more details.
+ </p>
+
+ <p>
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301<var class="optional-license-text">, </var>
+ USA.
+ </p>
+
+ <p>
+ Also add information on how to
+ contact you by electronic and paper mail.
+ </p>
+
+ <p>
+ If the program is interactive, make it output a short
+ notice like this when it starts in an interactive mode:
+ </p>
+
+ <p>
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
+ type `show w'. This is free software, and you are welcome to
+ redistribute it under certain conditions; type `show c' for details.
+ </p>
+
+ <p>
+ The hypothetical commands `show w' and `show c' should show the
+ appropriate parts of the General Public License. Of course, the commands
+ you use may be called something other than `show w' and `show c'; they
+ could even be mouse-clicks or menu items--whatever suits your program.
+ </p>
+
+ <p>
+ You should also get your employer (if you work as a programmer)
+ or your school, if any, to sign a "copyright disclaimer" for
+ the program, if necessary. Here is a sample; alter the names:
+ </p>
+
+ <p>
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+ </p>
+
+ <p>
+ <var class="optional-license-text"><</var>signature of Ty Coon<var class="optional-license-text"> ></var>,
+ 1 April 1989 Ty Coon, President of Vice
+ </p>
+
+ </div>
+ <div class="optional-license-text">
+ <p>
+ This General Public License does not permit incorporating your program into
+ proprietary programs. If your program is a subroutine library, you may
+ consider it more useful to permit linking proprietary applications with the
+ library. If this is what you want to do, use the GNU Lesser General
+ Public License instead of this License.
+ </p>
+
+ </div>
+
+ true
+ GNU GENERAL PUBLIC LICENSE
+Version 2, June 1991
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+
+Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
+
+When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and modification follow.
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
+
+1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+
+3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+
+If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
+
+4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+
+5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
+
+6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
+
+7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
+
+This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+
+8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
+
+9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
+
+10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+
+NO WARRANTY
+
+11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
+
+ one line to give the program's name and an idea of what it does. Copyright (C) yyyy name of author
+
+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice
+
+ Copyright (C) yyyy name of author
+
+This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+
+ Copyright (C) <var class="replacable-license-text"> yyyy name of author</var>
+ <p>
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; version 2.
+ </p>
+
+ <p>
+ This program is distributed in the hope that it will be
+ useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the GNU General Public License for more details.
+ </p>
+
+ <p>
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301<var class="optional-license-text">, </var>
+ USA.
+ </p>
+
+
+
+
+
+
+
+
+
+ 23
+
+
+
+
+
+ 5
+
+
+
+
+
+ This snippet was identified as significant and highlighted in this Apache-2.0 file, when a commercial scanner identified it as being derived from file foo.c in package xyz which is licensed under GPL-2.0.
+
+
+
+
+ 420
+
+
+
+
+
+ 310
+
+
+
+
+
+
+
+
+
+
+ This package has been shipped in source and binary form.
+The binaries were created with gcc 4.5.1 and expect to link to
+compatible system run time libraries.
+ 2010-01-29T18:30:22Z
+ Person: Jane Doe ()
+ Organization: ExampleCodeInspect ()
+ Tool: LicenseFind-1.0
+ 3.17
+
+
+
+
+
+
+ http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz
+
+
+
+
+ Apache Commons Lang
+Copyright 2001-2011 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+This product includes software from the Spring Framework,
+under the Apache License 2.0 (see: StringUtils.containsWhitespace())
+
+
+
+
+ c2b4e1c67a2d28fced849ee1bb76e7391b93f125
+
+
+
+ Apache Software Foundation
+
+
+
+
+
+
+ ./lib-source/commons-lang3-3.1-sources.jar
+ Copyright 2001-2011 The Apache Software Foundation
+ This file is used by Jena
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ http://www.openjena.org/
+
+
+
+
+ pkg:maven/org.apache.jena/apache-jena@3.12.0
+
+
+ 3.12.0
+ https://search.maven.org/remotecontent?filepath=org/apache/jena/apache-jena/3.12.0/apache-jena-3.12.0.tar.gz
+ Jena
+ false
+
+
+
+
+
+ Specification Documentation
+
+
+
+ fff4e1c67a2d28fced849ee1bb76e7391b93f125
+
+
+ ./docs/myspec.pdf
+
+
+
+
+
+
+
+
+
+ aaabd89c926ab525c242e6621f2f5fa73aa4afe3d9e24aed727faaadd6af38b620bdb623dd2b4788b1c8086984af8706
+
+
+ The license for this project changed with the release of version x.y. The version of the project included here post-dates the license change.
+ true
+
+ 2.11.1
+
+
+
+ 624c1abb3664f4b35547e7c73864ad24
+
+
+ 2011-01-29T18:30:22Z
+
+
+ LicenseRef-1
+ /*
+ * (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+ http://ftp.gnu.org/gnu/glibc
+ glibc
+ Person: Jane Doe (jane.doe@example.com)
+
+
+
+ This is the external ref for Acme
+
+ acmecorp/acmenator/4.1.3-alpha
+
+
+
+
+
+
+ cpe:2.3:a:pivotal_software:spring_framework:4.1.0:*:*:*:*:*:*:*
+
+
+
+
+
+
+ http://justasample.url.com
+ http://people.apache.org/~andyc/neko/LICENSE
+ LicenseRef-3
+ This is tye CyperNeko License
+ The CyberNeko Software License, Version 1.0
+
+
+(C) Copyright 2002-2005, Andy Clark. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+3. The end-user documentation included with the redistribution,
+ if any, must include the following acknowledgment:
+ "This product includes software developed by Andy Clark."
+ Alternately, this acknowledgment may appear in the software itself,
+ if and wherever such third-party acknowledgments normally appear.
+
+4. The names "CyberNeko" and "NekoHTML" must not be used to endorse
+ or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ andyc@cyberneko.net.
+
+5. Products derived from this software may not be called "CyberNeko",
+ nor may "CyberNeko" appear in their name, without prior written
+ permission of the author.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ CyberNeko License
+
+
+
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+
+Version 2, June 1991
+
+Copyright (C) 1991 Free Software Foundation, Inc.
+51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+
+Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
+
+This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too.
+
+When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it.
+
+For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
+
+Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library.
+
+Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
+
+Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license.
+
+The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such.
+
+Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better.
+
+However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries.
+
+The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library.
+
+Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one.
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you".
+
+A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
+
+The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
+
+"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
+
+Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
+
+1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
+
+You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
+
+(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+
+3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
+
+Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
+
+This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
+
+4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
+
+If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
+
+5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
+
+However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
+
+When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
+
+If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
+
+Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
+
+6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
+
+You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
+
+ a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
+
+For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+
+It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
+
+7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
+
+ b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
+
+8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+
+9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
+
+10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
+
+11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
+
+This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+
+12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
+
+13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
+
+14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+
+NO WARRANTY
+
+15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Libraries
+
+If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).
+
+To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
+
+ one line to give the library's name and an idea of what it does.
+ Copyright (C) year name of author
+
+ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names:
+
+Yoyodyne, Inc., hereby disclaims all copyright interest in
+the library `Frob' (a library for tweaking knobs) written
+by James Random Hacker.
+
+signature of Ty Coon, 1 April 1990
+Ty Coon, President of Vice
+
+That's all there is to it!
+ LGPL-2.0-only
+ https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html
+ false
+
+ <div class="optional-license-text">
+ <p>
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ </p>
+
+ <p>
+ Version 2, June 1991
+ </p>
+
+ </div>
+ <div class="replacable-license-text">
+ <p>
+ Copyright (C) 1991 Free Software Foundation, Inc.<br />
+
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ </p>
+
+ </div>
+ <p>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+ </p>
+
+ <p>
+ [This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+ </p>
+
+ <p>
+ Preamble
+ </p>
+
+ <p>
+ The licenses for most software are designed to take away your
+ freedom to share and change it. By contrast, the GNU General Public
+ Licenses are intended to guarantee your freedom to share and change
+ free software--to make sure the software is free for all its users.
+ </p>
+
+ <p>
+ This license, the Library General Public License, applies
+ to some specially designated Free Software Foundation
+ software, and to any other libraries whose authors
+ decide to use it. You can use it for your libraries, too.
+ </p>
+
+ <p>
+ When we speak of free software, we are referring to freedom, not price.
+ Our General Public Licenses are designed to make sure that you have
+ the freedom to distribute copies of free software (and charge for
+ this service if you wish), that you receive source code or can get
+ it if you want it, that you can change the software or use pieces of
+ it in new free programs; and that you know you can do these things.
+ </p>
+
+ <p>
+ To protect your rights, we need to make restrictions that forbid
+ anyone to deny you these rights or to ask you to surrender the
+ rights. These restrictions translate to certain responsibilities for
+ you if you distribute copies of the library, or if you modify it.
+ </p>
+
+ <p>
+ For example, if you distribute copies of the library, whether gratis
+ or for a fee, you must give the recipients all the rights that we
+ gave you. You must make sure that they, too, receive or can get the
+ source code. If you link a program with the library, you must provide
+ complete object files to the recipients so that they can relink them
+ with the library, after making changes to the library and recompiling
+ it. And you must show them these terms so they know their rights.
+ </p>
+
+ <p>
+ Our method of protecting your rights has two steps: (1) copyright
+ the library, and (2) offer you this license which gives you
+ legal permission to copy, distribute and/or modify the library.
+ </p>
+
+ <p>
+ Also, for each distributor's protection, we want to make certain
+ that everyone understands that there is no warranty for this
+ free library. If the library is modified by someone else and
+ passed on, we want its recipients to know that what they have
+ is not the original version, so that any problems introduced by
+ others will not reflect on the original authors' reputations.
+ </p>
+
+ <p>
+ Finally, any free program is threatened constantly by software
+ patents. We wish to avoid the danger that companies distributing
+ free software will individually obtain patent licenses, thus
+ in effect transforming the program into proprietary software.
+ To prevent this, we have made it clear that any patent must
+ be licensed for everyone's free use or not licensed at all.
+ </p>
+
+ <p>
+ Most GNU software, including some libraries, is covered by the
+ ordinary GNU General Public License, which was designed for utility
+ programs. This license, the GNU Library General Public License,
+ applies to certain designated libraries. This license is quite
+ different from the ordinary one; be sure to read it in full, and don't
+ assume that anything in it is the same as in the ordinary license.
+ </p>
+
+ <p>
+ The reason we have a separate public license for some libraries is
+ that they blur the distinction we usually make between modifying
+ or adding to a program and simply using it. Linking a program with
+ a library, without changing the library, is in some sense simply
+ using the library, and is analogous to running a utility program
+ or application program. However, in a textual and legal sense, the
+ linked executable is a combined work, a derivative of the original
+ library, and the ordinary General Public License treats it as such.
+ </p>
+
+ <p>
+ Because of this blurred distinction, using the ordinary General
+ Public License for libraries did not effectively promote software
+ sharing, because most developers did not use the libraries. We
+ concluded that weaker conditions might promote sharing better.
+ </p>
+
+ <p>
+ However, unrestricted linking of non-free programs would deprive the
+ users of those programs of all benefit from the free status of the
+ libraries themselves. This Library General Public License is intended
+ to permit developers of non-free programs to use free libraries, while
+ preserving your freedom as a user of such programs to change the free
+ libraries that are incorporated in them. (We have not seen how to
+ achieve this as regards changes in header files, but we have achieved
+ it as regards changes in the actual functions of the Library.) The
+ hope is that this will lead to faster development of free libraries.
+ </p>
+
+ <p>
+ The precise terms and conditions for copying, distribution
+ and modification follow. Pay close attention to the difference
+ between a "work based on the library" and a "work that uses
+ the library". The former contains code derived from the
+ library, while the latter only works together with the library.
+ </p>
+
+ <p>
+ Note that it is possible for a library to be covered by the
+ ordinary General Public License rather than by this special one.
+ </p>
+
+ <p>
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+ </p>
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> 0.</var>
+ This License Agreement applies to any software library
+ which contains a notice placed by the copyright holder or
+ other authorized party saying it may be distributed under
+ the terms of this Library General Public License (also
+ called "this License"). Each licensee is addressed as "you".
+ <p>
+ A "library" means a collection of software functions and/or data
+ prepared so as to be conveniently linked with application programs
+ (which use some of those functions and data) to form executables.
+ </p>
+
+ <p>
+ The "Library", below, refers to any such software library or work
+ which has been distributed under these terms. A "work based on
+ the Library" means either the Library or any derivative work under
+ copyright law: that is to say, a work containing the Library or a
+ portion of it, either verbatim or with modifications and/or translated
+ straightforwardly into another language. (Hereinafter, translation
+ is included without limitation in the term "modification".)
+ </p>
+
+ <p>
+ "Source code" for a work means the preferred form of the work
+ for making modifications to it. For a library, complete source
+ code means all the source code for all modules it contains,
+ plus any associated interface definition files, plus the scripts
+ used to control compilation and installation of the library.
+ </p>
+
+ <p>
+ Activities other than copying, distribution and modification are
+ not covered by this License; they are outside its scope. The act of
+ running a program using the Library is not restricted, and output
+ from such a program is covered only if its contents constitute a
+ work based on the Library (independent of the use of the Library
+ in a tool for writing it). Whether that is true depends on what
+ the Library does and what the program that uses the Library does.
+ </p>
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 1.</var>
+ You may copy and distribute verbatim copies of the Library's complete
+ source code as you receive it, in any medium, provided that you
+ conspicuously and appropriately publish on each copy an appropriate
+ copyright notice and disclaimer of warranty; keep intact all the
+ notices that refer to this License and to the absence of any warranty;
+ and distribute a copy of this License along with the Library.
+ <p>
+ You may charge a fee for the physical act of
+ transferring a copy, and you may at your option
+ offer warranty protection in exchange for a fee.
+ </p>
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 2.</var>
+ You may modify your copy or copies of the Library or any portion
+ of it, thus forming a work based on the Library, and copy and
+ distribute such modifications or work under the terms of Section
+ 1 above, provided that you also meet all of these conditions:
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> a)</var>
+ The modified work must itself be a software library.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> b)</var>
+ You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> c)</var>
+ You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> d)</var>
+ If a facility in the modified Library refers to a function
+ or a table of data to be supplied by an application program
+ that uses the facility, other than as an argument passed
+ when the facility is invoked, then you must make a good faith
+ effort to ensure that, in the event an application does not
+ supply such function or table, the facility still operates,
+ and performs whatever part of its purpose remains meaningful.
+ <p>
+ (For example, a function in a library to compute square roots
+ has a purpose that is entirely well-defined independent of
+ the application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function
+ must be optional: if the application does not supply it,
+ the square root function must still compute square roots.)
+ </p>
+
+ </li>
+
+</ul>
+ <p>
+ These requirements apply to the modified work as a whole. If
+ identifiable sections of that work are not derived from the
+ Library, and can be reasonably considered independent and separate
+ works in themselves, then this License, and its terms, do not
+ apply to those sections when you distribute them as separate
+ works. But when you distribute the same sections as part of a
+ whole which is a work based on the Library, the distribution
+ of the whole must be on the terms of this License, whose
+ permissions for other licensees extend to the entire whole,
+ and thus to each and every part regardless of who wrote it.
+ </p>
+
+ <p>
+ Thus, it is not the intent of this section to claim rights or
+ contest your rights to work written entirely by you; rather,
+ the intent is to exercise the right to control the distribution
+ of derivative or collective works based on the Library.
+ </p>
+
+ <p>
+ In addition, mere aggregation of another work not based on
+ the Library with the Library (or with a work based on the
+ Library) on a volume of a storage or distribution medium does
+ not bring the other work under the scope of this License.
+ </p>
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 3.</var>
+ You may opt to apply the terms of the ordinary GNU General
+ Public License instead of this License to a given copy of the
+ Library. To do this, you must alter all the notices that refer
+ to this License, so that they refer to the ordinary GNU General
+ Public License, version 2, instead of to this License. (If a
+ newer version than version 2 of the ordinary GNU General Public
+ License has appeared, then you can specify that version instead
+ if you wish.) Do not make any other change in these notices.
+ <p>
+ Once this change is made in a given copy, it is irreversible for
+ that copy, so the ordinary GNU General Public License applies to
+ all subsequent copies and derivative works made from that copy.
+ </p>
+
+ <p>
+ This option is useful when you wish to copy part of the
+ code of the Library into a program that is not a library.
+ </p>
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 4.</var>
+ You may copy and distribute the Library (or a portion or derivative
+ of it, under Section 2) in object code or executable form under
+ the terms of Sections 1 and 2 above provided that you accompany
+ it with the complete corresponding machine-readable source code,
+ which must be distributed under the terms of Sections 1 and 2
+ above on a medium customarily used for software interchange.
+ <p>
+ If distribution of object code is made by offering access to copy
+ from a designated place, then offering equivalent access to copy
+ the source code from the same place satisfies the requirement
+ to distribute the source code, even though third parties are
+ not compelled to copy the source along with the object code.
+ </p>
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 5.</var>
+ A program that contains no derivative of any portion of the
+ Library, but is designed to work with the Library by being compiled
+ or linked with it, is called a "work that uses the Library".
+ Such a work, in isolation, is not a derivative work of the
+ Library, and therefore falls outside the scope of this License.
+ <p>
+ However, linking a "work that uses the Library" with the Library
+ creates an executable that is a derivative of the Library (because
+ it contains portions of the Library), rather than a "work that uses
+ the library". The executable is therefore covered by this License.
+ Section 6 states terms for distribution of such executables.
+ </p>
+
+ <p>
+ When a "work that uses the Library" uses material from a header
+ file that is part of the Library, the object code for the work may
+ be a derivative work of the Library even though the source code is
+ not. Whether this is true is especially significant if the work can
+ be linked without the Library, or if the work is itself a library.
+ The threshold for this to be true is not precisely defined by law.
+ </p>
+
+ <p>
+ If such an object file uses only numerical parameters, data
+ structure layouts and accessors, and small macros and small inline
+ functions (ten lines or less in length), then the use of the
+ object file is unrestricted, regardless of whether it is legally
+ a derivative work. (Executables containing this object code
+ plus portions of the Library will still fall under Section 6.)
+ </p>
+
+ <p>
+ Otherwise, if the work is a derivative of the Library, you may
+ distribute the object code for the work under the terms of Section
+ 6. Any executables containing that work also fall under Section 6,
+ whether or not they are linked directly with the Library itself.
+ </p>
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 6.</var>
+ As an exception to the Sections above, you may also compile or
+ link a "work that uses the Library" with the Library to produce
+ a work containing portions of the Library, and distribute
+ that work under terms of your choice, provided that the terms
+ permit modification of the work for the customer's own use
+ and reverse engineering for debugging such modifications.
+ <p>
+ You must give prominent notice with each copy of the work
+ that the Library is used in it and that the Library and its
+ use are covered by this License. You must supply a copy of
+ this License. If the work during execution displays copyright
+ notices, you must include the copyright notice for the Library
+ among them, as well as a reference directing the user to the
+ copy of this License. Also, you must do one of these things:
+ </p>
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> a)</var>
+ Accompany the work with the complete corresponding machine-readable
+ source code for the Library including whatever changes were used in
+ the work (which must be distributed under Sections 1 and 2 above);
+ and, if the work is an executable linked with the Library, with the
+ complete machine-readable "work that uses the Library", as object
+ code and/or source code, so that the user can modify the Library
+ and then relink to produce a modified executable containing the
+ modified Library. (It is understood that the user who changes the
+ contents of definitions files in the Library will not necessarily be
+ able to recompile the application to use the modified definitions.)
+ </li>
+
+<li>
+ <var class="replacable-license-text"> b)</var>
+ Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no
+ more than the cost of performing this distribution.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> c)</var>
+ If distribution of the work is made by offering access to
+ copy from a designated place, offer equivalent access to
+ copy the above specified materials from the same place.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> d)</var>
+ Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+ </li>
+
+</ul>
+ <p>
+ For an executable, the required form of the "work that uses
+ the Library" must include any data and utility programs needed
+ for reproducing the executable from it. However, as a special
+ exception, the source code distributed need not include
+ anything that is normally distributed (in either source or
+ binary form) with the major components (compiler, kernel,
+ and so on) of the operating system on which the executable
+ runs, unless that component itself accompanies the executable.
+ </p>
+
+ <p>
+ It may happen that this requirement contradicts the
+ license restrictions of other proprietary libraries that
+ do not normally accompany the operating system. Such
+ a contradiction means you cannot use both them and the
+ Library together in an executable that you distribute.
+ </p>
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 7.</var>
+ You may place library facilities that are a work based on the
+ Library side-by-side in a single library together with other library
+ facilities not covered by this License, and distribute such a
+ combined library, provided that the separate distribution of the
+ work based on the Library and of the other library facilities is
+ otherwise permitted, and provided that you do these two things:
+ </li>
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> a)</var>
+ Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities.
+ This must be distributed under the terms of the Sections above.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> b)</var>
+ Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+ </li>
+
+</ul>
+
+<li>
+ <var class="replacable-license-text"> 8.</var>
+ You may not copy, modify, sublicense, link with, or distribute the
+ Library except as expressly provided under this License. Any attempt
+ otherwise to copy, modify, sublicense, link with, or distribute
+ the Library is void, and will automatically terminate your rights
+ under this License. However, parties who have received copies, or
+ rights, from you under this License will not have their licenses
+ terminated so long as such parties remain in full compliance.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 9.</var>
+ You are not required to accept this License, since you have
+ not signed it. However, nothing else grants you permission to
+ modify or distribute the Library or its derivative works. These
+ actions are prohibited by law if you do not accept this License.
+ Therefore, by modifying or distributing the Library (or any
+ work based on the Library), you indicate your acceptance of this
+ License to do so, and all its terms and conditions for copying,
+ distributing or modifying the Library or works based on it.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 10.</var>
+ Each time you redistribute the Library (or any work based on
+ the Library), the recipient automatically receives a license
+ from the original licensor to copy, distribute, link with or
+ modify the Library subject to these terms and conditions. You
+ may not impose any further restrictions on the recipients'
+ exercise of the rights granted herein. You are not responsible
+ for enforcing compliance by third parties to this License.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 11.</var>
+ If, as a consequence of a court judgment or allegation of patent
+ infringement or for any other reason (not limited to patent issues),
+ conditions are imposed on you (whether by court order, agreement
+ or otherwise) that contradict the conditions of this License,
+ they do not excuse you from the conditions of this License. If you
+ cannot distribute so as to satisfy simultaneously your obligations
+ under this License and any other pertinent obligations, then as a
+ consequence you may not distribute the Library at all. For example,
+ if a patent license would not permit royalty-free redistribution of
+ the Library by all those who receive copies directly or indirectly
+ through you, then the only way you could satisfy both it and this
+ License would be to refrain entirely from distribution of the Library.
+ <p>
+ If any portion of this section is held invalid or
+ unenforceable under any particular circumstance, the
+ balance of the section is intended to apply, and the section
+ as a whole is intended to apply in other circumstances.
+ </p>
+
+ <p>
+ It is not the purpose of this section to induce you to infringe
+ any patents or other property right claims or to contest
+ validity of any such claims; this section has the sole purpose
+ of protecting the integrity of the free software distribution
+ system which is implemented by public license practices. Many
+ people have made generous contributions to the wide range of
+ software distributed through that system in reliance on consistent
+ application of that system; it is up to the author/donor to
+ decide if he or she is willing to distribute software through
+ any other system and a licensee cannot impose that choice.
+ </p>
+
+ <p>
+ This section is intended to make thoroughly clear what is
+ believed to be a consequence of the rest of this License.
+ </p>
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 12.</var>
+ If the distribution and/or use of the Library is restricted in
+ certain countries either by patents or by copyrighted interfaces,
+ the original copyright holder who places the Library under this
+ License may add an explicit geographical distribution limitation
+ excluding those countries, so that distribution is permitted only
+ in or among countries not thus excluded. In such case, this License
+ incorporates the limitation as if written in the body of this License.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 13.</var>
+ The Free Software Foundation may publish revised and/or new versions
+ of the Library General Public License from time to time. Such
+ new versions will be similar in spirit to the present version,
+ but may differ in detail to address new problems or concerns.
+ <p>
+ Each version is given a distinguishing version number. If
+ the Library specifies a version number of this License which
+ applies to it and "any later version", you have the option of
+ following the terms and conditions either of that version or of
+ any later version published by the Free Software Foundation. If
+ the Library does not specify a license version number, you may
+ choose any version ever published by the Free Software Foundation.
+ </p>
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 14.</var>
+ If you wish to incorporate parts of the Library into other free programs
+ whose distribution conditions are incompatible with these, write to
+ the author to ask for permission. For software which is copyrighted by
+ the Free Software Foundation, write to the Free Software Foundation; we
+ sometimes make exceptions for this. Our decision will be guided by the
+ two goals of preserving the free status of all derivatives of our free
+ software and of promoting the sharing and reuse of software generally.
+ <p>
+ NO WARRANTY
+ </p>
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 15.</var>
+ BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+ FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
+ WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
+ PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND,
+ EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
+ THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU
+ ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 16.</var>
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+ REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
+ DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
+ DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY
+ (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
+ INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
+ THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER
+ OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ </li>
+
+</ul>
+ <div class="optional-license-text">
+ <p>
+ END OF TERMS AND CONDITIONS
+ </p>
+
+ <p>
+ How to Apply These Terms to Your New Libraries
+ </p>
+
+ <p>
+ If you develop a new library, and you want it to be of the greatest
+ possible use to the public, we recommend making it free software
+ that everyone can redistribute and change. You can do so by
+ permitting redistribution under these terms (or, alternatively,
+ under the terms of the ordinary General Public License).
+ </p>
+
+ <p>
+ To apply these terms, attach the following notices to the
+ library. It is safest to attach them to the start of each
+ source file to most effectively convey the exclusion of
+ warranty; and each file should have at least the "copyright"
+ line and a pointer to where the full notice is found.
+ </p>
+
+ <p>
+ one line to give the library's name
+ and an idea of what it does.<br />
+
+ Copyright (C) year name of author
+ </p>
+
+ <p>
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+ </p>
+
+ <p>
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty
+ of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+ the GNU Library General Public License for more details.
+ </p>
+
+ <p>
+ You should have received a copy of the GNU Library
+ General Public License along with this library; if
+ not, write to the Free Software Foundation, Inc., 51
+ Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ </p>
+
+ <p>
+ Also add information on how to contact you by electronic and paper mail.
+ </p>
+
+ <p>
+ You should also get your employer (if you work as a programmer)
+ or your school, if any, to sign a "copyright disclaimer" for
+ the library, if necessary. Here is a sample; alter the names:
+ </p>
+
+ <p>
+ Yoyodyne, Inc., hereby disclaims all copyright interest in<br />
+
+ the library `Frob' (a library for tweaking knobs) written<br />
+
+ by James Random Hacker.
+ </p>
+
+ <p>
+ signature of Ty Coon, 1 April 1990<br />
+
+ Ty Coon, President of Vice
+ </p>
+
+ <p>
+ That's all there is to it!
+ </p>
+
+ </div>
+
+
+
+ 0
+ 2022-05-09T00:07:17Z
+ https://www.gnu.org/licenses/old-licenses/lgpl-2.0-standalone.html
+ true
+ false
+ true
+ true
+
+
+ true
+ Copyright (C) year name of author
+
+This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; version 2.
+
+This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+ <<beginOptional>>GNU LIBRARY GENERAL PUBLIC LICENSE
+
+Version 2, June 1991
+
+<<endOptional>> <<var;name="copyright";original="Copyright (C) 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA ";match=".{0,5000}">>
+
+Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
+
+This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too.
+
+When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it.
+
+For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
+
+Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library.
+
+Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
+
+Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license.
+
+The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such.
+
+Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better.
+
+However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries.
+
+The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library.
+
+Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one.
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ <<var;name="bullet";original="0.";match=".{0,20}">> This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
+
+ Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
+
+ <<var;name="bullet";original="1.";match=".{0,20}">> You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
+
+ You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+
+ <<var;name="bullet";original="2.";match=".{0,20}">> You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+
+ <<var;name="bullet";original="a)";match=".{0,20}">> The modified work must itself be a software library.
+
+ <<var;name="bullet";original="b)";match=".{0,20}">> You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
+
+ <<var;name="bullet";original="c)";match=".{0,20}">> You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
+
+ <<var;name="bullet";original="d)";match=".{0,20}">> If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
+
+ These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+
+ Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
+
+ In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+
+ <<var;name="bullet";original="3.";match=".{0,20}">> You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
+
+ Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
+
+ <<var;name="bullet";original="4.";match=".{0,20}">> You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
+
+ <<var;name="bullet";original="5.";match=".{0,20}">> A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
+
+ <<var;name="bullet";original="6.";match=".{0,20}">> As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
+
+ <<var;name="bullet";original="a)";match=".{0,20}">> Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
+
+ <<var;name="bullet";original="b)";match=".{0,20}">> Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
+
+ <<var;name="bullet";original="c)";match=".{0,20}">> If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
+
+ <<var;name="bullet";original="d)";match=".{0,20}">> Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+
+ It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
+
+ <<var;name="bullet";original="7.";match=".{0,20}">> You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
+
+ <<var;name="bullet";original="a)";match=".{0,20}">> Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
+
+ <<var;name="bullet";original="b)";match=".{0,20}">> Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
+
+ <<var;name="bullet";original="8.";match=".{0,20}">> You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+
+ <<var;name="bullet";original="9.";match=".{0,20}">> You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
+
+ <<var;name="bullet";original="10.";match=".{0,20}">> Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
+
+ <<var;name="bullet";original="11.";match=".{0,20}">> If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
+
+ If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
+
+ It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
+
+ This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+
+ <<var;name="bullet";original="12.";match=".{0,20}">> If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
+
+ <<var;name="bullet";original="13.";match=".{0,20}">> The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
+
+ <<var;name="bullet";original="14.";match=".{0,20}">> If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ <<var;name="bullet";original="15.";match=".{0,20}">> BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ <<var;name="bullet";original="16.";match=".{0,20}">> IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.<<beginOptional>> END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Libraries
+
+If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).
+
+To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
+
+one line to give the library's name and an idea of what it does.
+
+Copyright (C) year name of author
+
+This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names:
+
+Yoyodyne, Inc., hereby disclaims all copyright interest in
+
+the library `Frob' (a library for tweaking knobs) written
+
+by James Random Hacker.
+
+signature of Ty Coon, 1 April 1990
+
+Ty Coon, President of Vice
+
+That's all there is to it!
+
+<<endOptional>>
+ This license was released: June 1991. This license has been superseded by LGPL-2.1. This license identifier refers to the choice to use the code under LGPL-2.0-only, as distinguished from use of code under LGPL-2.0-or-later (i.e., LGPL-2.0 or some later version). The license notice (as seen in the Standard License Header field below) states which of these applies to the code in the file. The example in the exhibit to the license shows the license notice for the "or later" approach.
+ GNU Library General Public License v2 only
+ Copyright (C) <<var;name="copyright";original="year name of author";match=".+">>
+
+This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; version 2.
+
+This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+
+ Copyright (C) <var class="replacable-license-text"> year name of author</var>
+ <p>This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; version 2.</p>
+
+ <p>This library is distributed
+ in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
+ even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the GNU Library General Public License for more details.</p>
+
+ <p>You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ </p>
+
+
+
+
+
+
+ The GNU C Library is free software. See the file COPYING.LIB for copying conditions, and LICENSES for notices about a few contributions that require these additional notices to be distributed. License copyright years may be listed using range notation, e.g., 1996-2015, indicating that every year in the range, inclusive, is a copyrightable year that would otherwise be listed individually.
+
+
+
+
+
+
+ Organization: ExampleCodeInspect (contact@example.com)
+
+
+
+ 11b6d3ee554eedf79299905a98f9b9a04e498210b59f15094c916c91d150efcd
+
+
+
+
+ LicenseRef-2
+ This package includes the GRDDL parser developed by Hewlett Packard under the following license:
+© Copyright 2007 Hewlett-Packard Development Company, LP
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+
+
+
+
+
+ This license is used by Jena
+
+
+
+ 3ab4e1c67a2d28fced849ee1bb76e7391b93f125
+
+
+ Hewlett Packard Inc.
+
+ (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
+ Apache Software Foundation
+
+
+
+
+
+
+
+ This file belongs to Jena
+ ./lib-source/jena-2.6.3-sources.jar
+
+
+
+
+
+ 2012-01-29T18:30:22Z
+
+
+ d6a770ba38583ed4bb4525bd96e50461655d2758
+ ./package.spdx
+
+
+
+
+
+ 85ed0817af83a24ad8da68c2b5094de69833983c
+
+
+
+
+ Person: Package Commenter
+ Package level annotation
+
+ 2011-01-29T18:30:22Z
+
+
+ uses glibc-2_11-branch from git://sourceware.org/git/glibc.git.
+ glibc-2.11.1.tar.gz
+ 2014-01-29T18:30:22Z
+ GNU C library.
+
+
+
+
+ Saxon
+
+
+
+ 85ed0817af83a24ad8da68c2b5094de69833983c
+
+
+ The Saxon package is a collection of tools for processing XML documents.
+ http://saxon.sourceforge.net/
+ 8.8
+ Other versions available for a commercial license
+ https://sourceforge.net/projects/saxon/files/Saxon-B/8.8.0.7/saxonb8-8-0-7j.zip/download
+ saxonB-8.8.zip
+
+
+ https://opensource.org/licenses/MPL-1.0
+ MOZILLA PUBLIC LICENSE
+Version 1.0
+
+1. Definitions.
+
+ 1.1. ``Contributor'' means each entity that creates or contributes to the creation of Modifications.
+
+ 1.2. ``Contributor Version'' means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor.
+
+ 1.3. ``Covered Code'' means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof.
+
+ 1.4. ``Electronic Distribution Mechanism'' means a mechanism generally accepted in the software development community for the electronic transfer of data.
+
+ 1.5. ``Executable'' means Covered Code in any form other than Source Code.
+
+ 1.6. ``Initial Developer'' means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A.
+
+ 1.7. ``Larger Work'' means a work which combines Covered Code or portions thereof with code not governed by the terms of this License.
+
+ 1.8. ``License'' means this document.
+
+ 1.9. ``Modifications'' means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is:
+
+ A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications.
+
+ B. Any new file that contains any part of the Original Code or previous Modifications.
+
+ 1.10. ``Original Code'' means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License.
+
+ 1.11. ``Source Code'' means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or a list of source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge.
+
+ 1.12. ``You'' means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, ``You'' includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, ``control'' means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity.
+
+2. Source Code License.
+
+ 2.1. The Initial Developer Grant.
+The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims:
+
+ (a) to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, or as part of a Larger Work; and
+
+ (b) under patents now or hereafter owned or controlled by Initial Developer, to make, have made, use and sell (``Utilize'') the Original Code (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Original Code (or portions thereof) and not to any greater extent that may be necessary to Utilize further Modifications or combinations.
+
+ 2.2. Contributor Grant.
+Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims:
+
+ (a) to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code or as part of a Larger Work; and
+
+ (b) under patents now or hereafter owned or controlled by Contributor, to Utilize the Contributor Version (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Contributor Version (or portions thereof), and not to any greater extent that may be necessary to Utilize further Modifications or combinations.
+
+3. Distribution Obligations.
+
+ 3.1. Application of License.
+ The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5.
+
+ 3.2. Availability of Source Code.
+ Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party.
+
+ 3.3. Description of Modifications.
+ You must cause all Covered Code to which you contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code.
+
+ 3.4. Intellectual Property Matters
+
+ (a) Third Party Claims.
+ If You have knowledge that a party claims an intellectual property right in particular functionality or code (or its utilization under this License), you must include a text file with the source code distribution titled ``LEGAL'' which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If you obtain such knowledge after You make Your Modification available as described in Section 3.2, You shall promptly modify the LEGAL file in all copies You make available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained.
+
+ (b) Contributor APIs.
+ If Your Modification is an application programming interface and You own or control patents which are reasonably necessary to implement that API, you must also include this information in the LEGAL file.
+
+ 3.5. Required Notices.
+ You must duplicate the notice in Exhibit A in each file of the Source Code, and this License in any documentation for the Source Code, where You describe recipients' rights relating to Covered Code. If You created one or more Modification(s), You may add your name as a Contributor to the notice described in Exhibit A. If it is not possible to put such notice in a particular Source Code file due to its structure, then you must include such notice in a location (such as a relevant directory file) where a user would be likely to look for such a notice. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
+
+ 3.6. Distribution of Executable Versions.
+ You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
+
+ 3.7. Larger Works.
+ You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code.
+
+4. Inability to Comply Due to Statute or Regulation.
+If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
+
+5. Application of this License.
+This License applies to code to which the Initial Developer has attached the notice in Exhibit A, and to related Covered Code.
+
+6. Versions of the License.
+
+ 6.1. New Versions.
+ Netscape Communications Corporation (``Netscape'') may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number.
+
+ 6.2. Effect of New Versions.
+ Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netscape. No one other than Netscape has the right to modify the terms applicable to Covered Code created under this License.
+
+ 6.3. Derivative Works.
+ If you create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), you must (a) rename Your license so that the phrases ``Mozilla'', ``MOZILLAPL'', ``MOZPL'', ``Netscape'', ``NPL'' or any confusingly similar phrase do not appear anywhere in your license and (b) otherwise make it clear that your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.)
+
+7. DISCLAIMER OF WARRANTY.
+COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN ``AS IS'' BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+8. TERMINATION.
+This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
+
+9. LIMITATION OF LIABILITY.
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+10. U.S. GOVERNMENT END USERS.
+The Covered Code is a ``commercial item,'' as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of ``commercial computer software'' and ``commercial computer software documentation,'' as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein.
+
+11. MISCELLANEOUS.
+This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in, the United States of America: (a) unless otherwise agreed in writing, all disputes relating to this License (excepting any dispute relating to intellectual property rights) shall be subject to final and binding arbitration, with the losing party paying all costs of arbitration; (b) any arbitration relating to this Agreement shall be held in Santa Clara County, California, under the auspices of JAMS/EndDispute; and (c) any litigation relating to this Agreement shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License.
+
+12. RESPONSIBILITY FOR CLAIMS.
+Except in cases where another Contributor has failed to comply with Section 3.4, You are responsible for damages arising, directly or indirectly, out of Your utilization of rights under this License, based on the number of copies of Covered Code you made available, the revenues you received from utilizing such rights, and other relevant factors. You agree to work with affected parties to distribute responsibility on an equitable basis.
+
+EXHIBIT A.
+
+``The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
+
+Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
+
+The Original Code is ______________________________________.
+
+The Initial Developer of the Original Code is ________________________. Portions created by ______________________ are Copyright (C) ______ _______________________. All Rights Reserved.
+
+Contributor(s): ______________________________________.''
+ This license has been superseded by v1.1
+ http://www.mozilla.org/MPL/MPL-1.0.html
+ Mozilla Public License 1.0
+ "The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
+
+Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
+
+The Original Code is _____ . The Initial Developer of the Original Code is _____ . Portions created by _____ are Copyright (C) _____ . All Rights Reserved. Contributor(s): _____ ."
+
+
+ <<beginOptional>>"<<endOptional>>The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
+
+Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
+
+The Original Code is <<var;name="code";original="_____";match=".+">> . The Initial Developer of the Original Code is <<var;name="InitialDeveloper";original="_____";match=".+">> . Portions created by <<var;name="createdby";original="_____";match=".+">> are Copyright (C) <<var;name="copyright";original="_____";match=".+">> . All Rights Reserved. Contributor(s): <<var;name="contributor";original="_____";match=".+">> .<<beginOptional>>"<<endOptional>>
+
+
+ <<beginOptional>>MOZILLA PUBLIC LICENSE
+
+Version 1.0
+
+<<endOptional>>
+
+ <<var;name="bullet";original="1.";match=".{0,20}">> Definitions.
+
+ <<var;name="bullet";original="1.1.";match=".{0,20}">> "Contributor" means each entity that creates or contributes to the creation of Modifications.
+
+ <<var;name="bullet";original="1.2.";match=".{0,20}">> "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor.
+
+ <<var;name="bullet";original="1.3.";match=".{0,20}">> "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof.
+
+ <<var;name="bullet";original="1.4.";match=".{0,20}">> "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data.
+
+ <<var;name="bullet";original="1.5.";match=".{0,20}">> "Executable" means Covered Code in any form other than Source Code.
+
+ <<var;name="bullet";original="1.6.";match=".{0,20}">> "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A.
+
+ <<var;name="bullet";original="1.7.";match=".{0,20}">> "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License.
+
+ <<var;name="bullet";original="1.8.";match=".{0,20}">> "License" means this document.
+
+ <<var;name="bullet";original="1.9.";match=".{0,20}">> "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is:
+
+ <<var;name="bullet";original="A.";match=".{0,20}">> Any addition to or deletion from the contents of a file containing Original Code or previous Modifications.
+
+ <<var;name="bullet";original="B.";match=".{0,20}">> Any new file that contains any part of the Original Code or previous Modifications.
+
+ <<var;name="bullet";original="1.10.";match=".{0,20}">> "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License.
+
+ <<var;name="bullet";original="1.11.";match=".{0,20}">> "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or a list of source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge.
+
+ <<var;name="bullet";original="1.12.";match=".{0,20}">> "You" means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity.
+
+ <<var;name="bullet";original="2.";match=".{0,20}">> Source Code License.
+
+ <<var;name="bullet";original="2.1.";match=".{0,20}">> The Initial Developer Grant.
+
+ The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims:
+
+ <<var;name="bullet";original="(a)";match=".{0,20}">> to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, or as part of a Larger Work; and
+
+ <<var;name="bullet";original="(b)";match=".{0,20}">> under patents now or hereafter owned or controlled by Initial Developer, to make, have made, use and sell ("Utilize") the Original Code (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Original Code (or portions thereof) and not to any greater extent that may be necessary to Utilize further Modifications or combinations.
+
+ <<var;name="bullet";original="2.2.";match=".{0,20}">> Contributor Grant.
+
+ Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims:
+
+ <<var;name="bullet";original="(a)";match=".{0,20}">> to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code or as part of a Larger Work; and
+
+ <<var;name="bullet";original="(b)";match=".{0,20}">> under patents now or hereafter owned or controlled by Contributor, to Utilize the Contributor Version (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Contributor Version (or portions thereof), and not to any greater extent that may be necessary to Utilize further Modifications or combinations.
+
+ <<var;name="bullet";original="3.";match=".{0,20}">> Distribution Obligations.
+
+ <<var;name="bullet";original="3.1.";match=".{0,20}">> Application of License.
+
+ The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5.
+
+ <<var;name="bullet";original="3.2.";match=".{0,20}">> Availability of Source Code.
+
+ Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party.
+
+ <<var;name="bullet";original="3.3.";match=".{0,20}">> Description of Modifications.
+
+ You must cause all Covered Code to which you contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code.
+
+ <<var;name="bullet";original="3.4.";match=".{0,20}">> Intellectual Property Matters
+
+ <<var;name="bullet";original="(a)";match=".{0,20}">> Third Party Claims.
+
+ If You have knowledge that a party claims an intellectual property right in particular functionality or code (or its utilization under this License), you must include a text file with the source code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If you obtain such knowledge after You make Your Modification available as described in Section 3.2, You shall promptly modify the LEGAL file in all copies You make available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained.
+
+ <<var;name="bullet";original="(b)";match=".{0,20}">> Contributor APIs.
+
+ If Your Modification is an application programming interface and You own or control patents which are reasonably necessary to implement that API, you must also include this information in the LEGAL file.
+
+ <<var;name="bullet";original="3.5.";match=".{0,20}">> Required Notices.
+
+ You must duplicate the notice in Exhibit A in each file of the Source Code, and this License in any documentation for the Source Code, where You describe recipients' rights relating to Covered Code. If You created one or more Modification(s), You may add your name as a Contributor to the notice described in Exhibit A. If it is not possible to put such notice in a particular Source Code file due to its structure, then you must include such notice in a location (such as a relevant directory file) where a user would be likely to look for such a notice. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
+
+ <<var;name="bullet";original="3.6.";match=".{0,20}">> Distribution of Executable Versions.
+
+ You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
+
+ <<var;name="bullet";original="3.7.";match=".{0,20}">> Larger Works.
+
+ You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code.
+
+ <<var;name="bullet";original="4.";match=".{0,20}">> Inability to Comply Due to Statute or Regulation.
+
+ If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
+
+ <<var;name="bullet";original="5.";match=".{0,20}">> Application of this License.
+
+ This License applies to code to which the Initial Developer has attached the notice in Exhibit A, and to related Covered Code.
+
+ <<var;name="bullet";original="6.";match=".{0,20}">> Versions of the License.
+
+ <<var;name="bullet";original="6.1.";match=".{0,20}">> New Versions.
+
+ Netscape Communications Corporation ("Netscape") may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number.
+
+ <<var;name="bullet";original="6.2.";match=".{0,20}">> Effect of New Versions.
+
+ Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netscape. No one other than Netscape has the right to modify the terms applicable to Covered Code created under this License.
+
+ <<var;name="bullet";original="6.3.";match=".{0,20}">> Derivative Works.
+
+ If you create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), you must (a) rename Your license so that the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", "NPL" or any confusingly similar phrase do not appear anywhere in your license and (b) otherwise make it clear that your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.)
+
+ <<var;name="bullet";original="7.";match=".{0,20}">> DISCLAIMER OF WARRANTY.
+
+ COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+ <<var;name="bullet";original="8.";match=".{0,20}">> TERMINATION.
+
+ This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
+
+ <<var;name="bullet";original="9.";match=".{0,20}">> LIMITATION OF LIABILITY.
+
+ UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+ <<var;name="bullet";original="10.";match=".{0,20}">> U.S. GOVERNMENT END USERS.
+
+ The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein.
+
+ <<var;name="bullet";original="11.";match=".{0,20}">> MISCELLANEOUS.
+
+ This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in, the United States of America: (a) unless otherwise agreed in writing, all disputes relating to this License (excepting any dispute relating to intellectual property rights) shall be subject to final and binding arbitration, with the losing party paying all costs of arbitration; (b) any arbitration relating to this Agreement shall be held in Santa Clara County, California, under the auspices of JAMS/EndDispute; and (c) any litigation relating to this Agreement shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License.
+
+ <<var;name="bullet";original="12.";match=".{0,20}">> RESPONSIBILITY FOR CLAIMS.
+
+ Except in cases where another Contributor has failed to comply with Section 3.4, You are responsible for damages arising, directly or indirectly, out of Your utilization of rights under this License, based on the number of copies of Covered Code you made available, the revenues you received from utilizing such rights, and other relevant factors. You agree to work with affected parties to distribute responsibility on an equitable basis.<<beginOptional>> EXHIBIT A.
+
+<<beginOptional>>"<<endOptional>>The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
+
+Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
+
+The Original Code is <<var;name="code";original="_____";match=".+">> . The Initial Developer of the Original Code is <<var;name="InitialDeveloper";original="_____";match=".+">> . Portions created by <<var;name="createdby";original="_____";match=".+">> are Copyright (C) <<var;name="copyright";original="_____";match=".+">> . All Rights Reserved. Contributor(s): <<var;name="contributor";original="_____";match=".+">> .<<beginOptional>>"<<endOptional>>
+
+<<endOptional>>
+ true
+
+
+ 0
+ 2022-05-09T00:08:11Z
+ http://www.mozilla.org/MPL/MPL-1.0.html
+ true
+ false
+ true
+ true
+
+
+
+ <p><var class="optional-license-text">"</var>The contents of this file are subject to the Mozilla Public License Version 1.0 (the
+ "License"); you may not use this file except in compliance with the License. You may obtain
+ a copy of the License at http://www.mozilla.org/MPL/</p>
+
+ <p>Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
+ ANY KIND, either express or implied. See the License for the specific language governing rights and
+ limitations under the License.</p>
+
+ <p>The Original Code is
+ <var class="replacable-license-text"> _____</var>. The Initial Developer of the Original Code is
+ <var class="replacable-license-text"> _____</var>. Portions created by
+ <var class="replacable-license-text"> _____</var> are Copyright (C)
+ <var class="replacable-license-text"> _____</var>. All Rights Reserved. Contributor(s):
+ <var class="replacable-license-text"> _____</var>.<var class="optional-license-text">"</var>
+ </p>
+
+
+ false
+
+ <div class="optional-license-text">
+ <p>MOZILLA PUBLIC LICENSE
+ <br />
+
+Version 1.0
+ </p>
+
+ </div>
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> 1.</var>
+ Definitions.
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> 1.1.</var>
+ "Contributor" means each entity that creates or contributes to the creation of
+ Modifications.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 1.2.</var>
+ "Contributor Version" means the combination of the Original Code, prior
+ Modifications used by a Contributor, and the Modifications made by that particular
+ Contributor.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 1.3.</var>
+ "Covered Code" means the Original Code or Modifications or the combination of the
+ Original Code and Modifications, in each case including portions thereof.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 1.4.</var>
+ "Electronic Distribution Mechanism" means a mechanism generally accepted in the
+ software development community for the electronic transfer of data.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 1.5.</var>
+ "Executable" means Covered Code in any form other than Source Code.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 1.6.</var>
+ "Initial Developer" means the individual or entity identified as the Initial
+ Developer in the Source Code notice required by Exhibit A.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 1.7.</var>
+ "Larger Work" means a work which combines Covered Code or portions thereof with
+ code not governed by the terms of this License.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 1.8.</var>
+ "License" means this document.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 1.9.</var>
+ "Modifications" means any addition to or deletion from the substance or structure
+ of either the Original Code or any previous Modifications. When Covered Code is released
+ as a series of files, a Modification is:
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> A.</var>
+ Any addition to or deletion from the contents of a file containing Original Code or
+ previous Modifications.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> B.</var>
+ Any new file that contains any part of the Original Code or previous Modifications.
+ </li>
+
+</ul>
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 1.10.</var>
+ "Original Code" means Source Code of computer software code which is described in
+ the Source Code notice required by Exhibit A as Original Code, and which, at the time of
+ its release under this License is not already Covered Code governed by this License.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 1.11.</var>
+ "Source Code" means the preferred form of the Covered Code for making
+ modifications to it, including all modules it contains, plus any associated interface
+ definition files, scripts used to control compilation and installation of an Executable,
+ or a list of source code differential comparisons against either the Original Code or
+ another well known, available Covered Code of the Contributor's choice. The Source
+ Code can be in a compressed or archival form, provided the appropriate decompression or
+ de-archiving software is widely available for no charge.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 1.12.</var>
+ "You" means an individual or a legal entity exercising rights under, and
+ complying with all of the terms of, this License or a future version of this License
+ issued under Section 6.1. For legal entities, "You" includes any entity which
+ controls, is controlled by, or is under common control with You. For purposes of this
+ definition, "control" means (a) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or otherwise, or (b) ownership
+ of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such
+ entity.
+ </li>
+
+</ul>
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 2.</var>
+ Source Code License.
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> 2.1.</var>
+ The Initial Developer Grant.
+ <br />
+
+ The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive
+ license, subject to third party intellectual property claims:
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> (a)</var>
+ to use, reproduce, modify, display, perform, sublicense and distribute the Original Code
+ (or portions thereof) with or without Modifications, or as part of a Larger Work;
+ and
+ </li>
+
+<li>
+ <var class="replacable-license-text"> (b)</var>
+ under patents now or hereafter owned or controlled by Initial Developer, to make, have
+ made, use and sell ("Utilize") the Original Code (or portions thereof),
+ but solely to the extent that any such patent is reasonably necessary to enable You to
+ Utilize the Original Code (or portions thereof) and not to any greater extent that may
+ be necessary to Utilize further Modifications or combinations.
+ </li>
+
+</ul>
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 2.2.</var>
+ Contributor Grant.
+ <br />
+
+ Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license,
+ subject to third party intellectual property claims:
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> (a)</var>
+ to use, reproduce, modify, display, perform, sublicense and distribute the Modifications
+ created by such Contributor (or portions thereof) either on an unmodified basis, with
+ other Modifications, as Covered Code or as part of a Larger Work; and
+ </li>
+
+<li>
+ <var class="replacable-license-text"> (b)</var>
+ under patents now or hereafter owned or controlled by Contributor, to Utilize the
+ Contributor Version (or portions thereof), but solely to the extent that any such
+ patent is reasonably necessary to enable You to Utilize the Contributor Version (or
+ portions thereof), and not to any greater extent that may be necessary to Utilize
+ further Modifications or combinations.
+ </li>
+
+</ul>
+ </li>
+
+</ul>
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 3.</var>
+ Distribution Obligations.
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> 3.1.</var>
+ Application of License.
+ <br />
+
+ The Modifications which You create or to which You contribute are governed by the terms
+ of this License, including without limitation Section 2.2. The Source Code version
+ of Covered Code may be distributed only under the terms of this License or a
+ future version of this License released under Section 6.1, and You must include a
+ copy of this License with every copy of the Source Code You distribute. You may
+ not offer or impose any terms on any Source Code version that alters or restricts
+ the applicable version of this License or the recipients' rights hereunder.
+ However, You may include an additional document offering the additional rights
+ described in Section 3.5.
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 3.2.</var>
+ Availability of Source Code.
+ <br />
+
+ Any Modification which You create or to which You contribute must be made available in
+ Source Code form under the terms of this License either on the same media as an
+ Executable version or via an accepted Electronic Distribution Mechanism to anyone
+ to whom you made an Executable version available; and if made available via
+ Electronic Distribution Mechanism, must remain available for at least twelve (12)
+ months after the date it initially became available, or at least six (6) months
+ after a subsequent version of that particular Modification has been made available
+ to such recipients. You are responsible for ensuring that the Source Code version
+ remains available even if the Electronic Distribution Mechanism is maintained by a
+ third party.
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 3.3.</var>
+ Description of Modifications.
+ <br />
+
+ You must cause all Covered Code to which you contribute to contain a file documenting
+ the changes You made to create that Covered Code and the date of any change. You
+ must include a prominent statement that the Modification is derived, directly or
+ indirectly, from Original Code provided by the Initial Developer and including the
+ name of the Initial Developer in (a) the Source Code, and (b) in any notice in an
+ Executable version or related documentation in which You describe the origin or
+ ownership of the Covered Code.
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 3.4.</var>
+ Intellectual Property Matters
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> (a)</var>
+ Third Party Claims.
+ <br />
+
+ If You have knowledge that a party claims an intellectual property right in
+ particular functionality or code (or its utilization under this License), you
+ must include a text file with the source code distribution titled
+ "LEGAL" which describes the claim and the party making the claim
+ in sufficient detail that a recipient will know whom to contact. If you obtain
+ such knowledge after You make Your Modification available as described in
+ Section 3.2, You shall promptly modify the LEGAL file in all copies You make
+ available thereafter and shall take other steps (such as notifying appropriate
+ mailing lists or newsgroups) reasonably calculated to inform those who
+ received the Covered Code that new knowledge has been obtained.
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> (b)</var>
+ Contributor APIs.
+ <br />
+
+ If Your Modification is an application programming interface and You own or control
+ patents which are reasonably necessary to implement that API, you must also
+ include this information in the LEGAL file.
+
+ </li>
+
+</ul>
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 3.5.</var>
+ Required Notices.
+ <br />
+
+ You must duplicate the notice in Exhibit A in each file of the Source Code, and this
+ License in any documentation for the Source Code, where You describe
+ recipients' rights relating to Covered Code. If You created one or more
+ Modification(s), You may add your name as a Contributor to the notice described in
+ Exhibit A. If it is not possible to put such notice in a particular Source Code
+ file due to its structure, then you must include such notice in a location (such
+ as a relevant directory file) where a user would be likely to look for such a
+ notice. You may choose to offer, and to charge a fee for, warranty, support,
+ indemnity or liability obligations to one or more recipients of Covered Code.
+ However, You may do so only on Your own behalf, and not on behalf of the Initial
+ Developer or any Contributor. You must make it absolutely clear than any such
+ warranty, support, indemnity or liability obligation is offered by You alone, and
+ You hereby agree to indemnify the Initial Developer and every Contributor for any
+ liability incurred by the Initial Developer or such Contributor as a result of
+ warranty, support, indemnity or liability terms You offer.
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 3.6.</var>
+ Distribution of Executable Versions.
+ <br />
+
+ You may distribute Covered Code in Executable form only if the requirements of Section
+ 3.1-3.5 have been met for that Covered Code, and if You include a notice stating
+ that the Source Code version of the Covered Code is available under the terms of
+ this License, including a description of how and where You have fulfilled the
+ obligations of Section 3.2. The notice must be conspicuously included in any
+ notice in an Executable version, related documentation or collateral in which You
+ describe recipients' rights relating to the Covered Code. You may distribute
+ the Executable version of Covered Code under a license of Your choice, which may
+ contain terms different from this License, provided that You are in compliance
+ with the terms of this License and that the license for the Executable version
+ does not attempt to limit or alter the recipient's rights in the Source Code
+ version from the rights set forth in this License. If You distribute the
+ Executable version under a different license You must make it absolutely clear
+ that any terms which differ from this License are offered by You alone, not by the
+ Initial Developer or any Contributor. You hereby agree to indemnify the Initial
+ Developer and every Contributor for any liability incurred by the Initial
+ Developer or such Contributor as a result of any such terms You offer.
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 3.7.</var>
+ Larger Works.
+ <br />
+
+ You may create a Larger Work by combining Covered Code with other code not governed by
+ the terms of this License and distribute the Larger Work as a single product. In
+ such a case, You must make sure the requirements of this License are fulfilled for
+ the Covered Code.
+
+ </li>
+
+</ul>
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 4.</var>
+ Inability to Comply Due to Statute or Regulation.
+ <br />
+
+ If it is impossible for You to comply with any of the terms of this License with respect to
+ some or all of the Covered Code due to statute or regulation then You must: (a) comply
+ with the terms of this License to the maximum extent possible; and (b) describe the
+ limitations and the code they affect. Such description must be included in the LEGAL
+ file described in Section 3.4 and must be included with all distributions of the
+ Source Code. Except to the extent prohibited by statute or regulation, such
+ description must be sufficiently detailed for a recipient of ordinary skill to be able
+ to understand it.
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 5.</var>
+ Application of this License.
+ <br />
+
+ This License applies to code to which the Initial Developer has attached the notice in
+ Exhibit A, and to related Covered Code.
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 6.</var>
+ Versions of the License.
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> 6.1.</var>
+ New Versions.
+ <br />
+
+ Netscape Communications Corporation ("Netscape") may publish revised and/or
+ new versions of the License from time to time. Each version will be given a
+ distinguishing version number.
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 6.2.</var>
+ Effect of New Versions.
+ <br />
+
+ Once Covered Code has been published under a particular version of the License, You may
+ always continue to use it under the terms of that version. You may also choose to
+ use such Covered Code under the terms of any subsequent version of the License
+ published by Netscape. No one other than Netscape has the right to modify the
+ terms applicable to Covered Code created under this License.
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 6.3.</var>
+ Derivative Works.
+ <br />
+
+ If you create or use a modified version of this License (which you may only do in order
+ to apply it to code which is not already Covered Code governed by this License),
+ you must (a) rename Your license so that the phrases "Mozilla",
+ "MOZILLAPL", "MOZPL", "Netscape",
+ "NPL" or any confusingly similar phrase do not appear anywhere in your
+ license and (b) otherwise make it clear that your version of the license contains
+ terms which differ from the Mozilla Public License and Netscape Public License.
+ (Filling in the name of the Initial Developer, Original Code or Contributor in the
+ notice described in Exhibit A shall not of themselves be deemed to be
+ modifications of this License.)
+
+ </li>
+
+</ul>
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 7.</var>
+ DISCLAIMER OF WARRANTY.
+ <br />
+
+ COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT
+ WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION,
+ WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A
+ PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND
+ PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE
+ IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
+ COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY
+ CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS
+ AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 8.</var>
+ TERMINATION.
+ <br />
+
+ This License and the rights granted hereunder will terminate automatically if You fail to
+ comply with terms herein and fail to cure such breach within 30 days of becoming aware
+ of the breach. All sublicenses to the Covered Code which are properly granted shall
+ survive any termination of this License. Provisions which, by their nature, must
+ remain in effect beyond the termination of this License shall survive.
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 9.</var>
+ LIMITATION OF LIABILITY.
+ <br />
+
+ UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE),
+ CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY
+ DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU
+ OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF
+ ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK
+ STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR
+ LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH
+ DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR
+ PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE
+ LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR
+ LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION
+ MAY NOT APPLY TO YOU.
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 10.</var>
+ U.S. GOVERNMENT END USERS.
+ <br />
+
+ The Covered Code is a "commercial item," as that term is defined in 48 C.F.R.
+ 2.101 (Oct. 1995), consisting of "commercial computer software" and
+ "commercial computer software documentation," as such terms are used in 48
+ C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
+ through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code
+ with only those rights set forth herein.
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 11.</var>
+ MISCELLANEOUS.
+ <br />
+
+ This License represents the complete agreement concerning subject matter hereof. If any
+ provision of this License is held to be unenforceable, such provision shall be
+ reformed only to the extent necessary to make it enforceable. This License shall be
+ governed by California law provisions (except to the extent applicable law, if any,
+ provides otherwise), excluding its conflict-of-law provisions. With respect to
+ disputes in which at least one party is a citizen of, or an entity chartered or
+ registered to do business in, the United States of America: (a) unless otherwise
+ agreed in writing, all disputes relating to this License (excepting any dispute
+ relating to intellectual property rights) shall be subject to final and binding
+ arbitration, with the losing party paying all costs of arbitration; (b) any
+ arbitration relating to this Agreement shall be held in Santa Clara County,
+ California, under the auspices of JAMS/EndDispute; and (c) any litigation relating to
+ this Agreement shall be subject to the jurisdiction of the Federal Courts of the
+ Northern District of California, with venue lying in Santa Clara County, California,
+ with the losing party responsible for costs, including without limitation, court costs
+ and reasonable attorneys fees and expenses. The application of the United Nations
+ Convention on Contracts for the International Sale of Goods is expressly excluded. Any
+ law or regulation which provides that the language of a contract shall be construed
+ against the drafter shall not apply to this License.
+
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 12.</var>
+ RESPONSIBILITY FOR CLAIMS.
+ <br />
+
+ Except in cases where another Contributor has failed to comply with Section 3.4, You are responsible for
+ damages arising, directly or indirectly, out of Your utilization of rights under this License, based
+ on the number of copies of Covered Code you made available, the revenues you received from utilizing
+ such rights, and other relevant factors. You agree to work with affected parties to distribute
+ responsibility on an equitable basis.
+ </li>
+
+</ul>
+ <div class="optional-license-text">
+ <p>EXHIBIT A.</p>
+
+ <p><var class="optional-license-text">"</var>The contents of this file are subject to the Mozilla Public License Version 1.0 (the
+ "License"); you may not use this file except in compliance with the License. You may obtain
+ a copy of the License at http://www.mozilla.org/MPL/</p>
+
+ <p>Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
+ ANY KIND, either express or implied. See the License for the specific language governing rights and
+ limitations under the License.</p>
+
+ <p>The Original Code is
+ <var class="replacable-license-text"> _____</var>. The Initial Developer of the Original Code is
+ <var class="replacable-license-text"> _____</var>. Portions created by
+ <var class="replacable-license-text"> _____</var> are Copyright (C)
+ <var class="replacable-license-text"> _____</var>. All Rights Reserved. Contributor(s):
+ <var class="replacable-license-text"> _____</var>.<var class="optional-license-text">"</var>
+ </p>
+
+ </div>
+
+ MPL-1.0
+
+
+ 1
+ 2022-05-09T00:08:12Z
+ https://opensource.org/licenses/MPL-1.0
+ true
+ false
+ true
+ true
+
+
+
+
+ false
+ Copyright Saxonica Ltd
+
+
+
+
+
+
+ Copyright 2008-2010 John Smith
+ The GNU C Library defines functions that are specified by the ISO C standard, as well as additional features specific to POSIX and other derivatives of the Unix operating system, and extensions specific to GNU systems.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Person: Suzanne Reviewer
+ Another example reviewer.
+
+ 2011-03-13T00:00:00Z
+
+
+
+
+
+
+ ./package/foo.c
+ The concluded license was taken from the package level that the file was included in.
+
+
+
+ d6a770ba38583ed4bb4525bd96e50461655d2758
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Copyright 2008-2010 John Smith
+ The Regents of the University of California
+
+
+
+ 624c1abb3664f4b35547e7c73864ad24
+
+
+ Modified by Paul Mundt lethal@linux-sh.org
+
+ IBM Corporation
+ Copyright (c) 2001 Aaron Lehmann aaroni@vitelus.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ The concluded license was taken from the package level that the file was included in.
+This information was found in the COPYING.txt file in the xyz directory.
+
+
+ Person: File Commenter
+ File level annotation
+
+ 2011-01-29T18:30:22Z
+
+
+
+
+
+
+
+
+
+ false
+ true
+ <<beginOptional>><<beginOptional>>Creative Commons<<beginOptional>> Legal Code<<endOptional>>
+
+<<endOptional>>
+
+CC0 1.0 Universal
+
+<<endOptional>><<beginOptional>> CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER.
+
+<<endOptional>>
+
+Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").
+
+Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
+
+For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
+
+ <<var;name="bullet";original="1.";match=".{0,20}">> Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:
+
+ <<var;name="bullet";original="i.";match=".{0,20}">> the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
+
+ <<var;name="bullet";original="ii.";match=".{0,20}">> moral rights retained by the original author(s) and/or performer(s);
+
+ <<var;name="bullet";original="iii.";match=".{0,20}">> publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
+
+ <<var;name="bullet";original="iv.";match=".{0,20}">> rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;
+
+ <<var;name="bullet";original="v.";match=".{0,20}">> rights protecting the extraction, dissemination, use and reuse of data in a Work;
+
+ <<var;name="bullet";original="vi.";match=".{0,20}">> database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
+
+ <<var;name="bullet";original="vii.";match=".{0,20}">> other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
+
+ <<var;name="bullet";original="2.";match=".{0,20}">> Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
+
+ <<var;name="bullet";original="3.";match=".{0,20}">> Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.
+
+ <<var;name="bullet";original="4.";match=".{0,20}">> Limitations and Disclaimers.
+
+ <<var;name="bullet";original="a.";match=".{0,20}">> No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
+
+ <<var;name="bullet";original="b.";match=".{0,20}">> Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
+
+ <<var;name="bullet";original="c.";match=".{0,20}">> Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
+
+ <<var;name="bullet";original="d.";match=".{0,20}">> Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.<<beginOptional>> <<var;name="upstreamLink";original="";match="For more information, please see <http://creativecommons.org/publicdomain/zero/1.0/>">><<endOptional>>
+
+ <div class="optional-license-text">
+ <div class="optional-license-text">
+ <p>Creative Commons<var class="optional-license-text"> Legal Code</var></p>
+
+ </div>
+ <p>CC0 1.0 Universal</p>
+
+ </div>
+ <div class="optional-license-text">
+ <p>CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS
+ DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION
+ ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT
+ OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE
+ USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER.</p>
+
+ </div>
+
+ <p>Statement of Purpose</p>
+
+ <p>The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related
+ Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner")
+ of an original work of authorship and/or a database (each, a "Work").</p>
+
+ <p>Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a
+ commons of creative, cultural and scientific works ("Commons") that the public can reliably
+ and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse
+ and redistribute as freely as possible in any form whatsoever and for any purposes, including without
+ limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a
+ free culture and the further production of creative, cultural and scientific works, or to gain
+ reputation or greater distribution for their Work in part through the use and efforts of others.</p>
+
+ <p>For these and/or other purposes and motivations, and without any expectation of additional consideration
+ or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that
+ he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to
+ the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and
+ Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.</p>
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> 1.</var>
+ Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and
+ related or neighboring rights ("Copyright and Related Rights"). Copyright and
+ Related Rights include, but are not limited to, the following:
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> i.</var>
+ the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
+ </li>
+
+<li>
+ <var class="replacable-license-text"> ii.</var>
+ moral rights retained by the original author(s) and/or performer(s);
+ </li>
+
+<li>
+ <var class="replacable-license-text"> iii.</var>
+ publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
+ </li>
+
+<li>
+ <var class="replacable-license-text"> iv.</var>
+ rights protecting against unfair competition in regards to a Work, subject to the limitations
+ in paragraph 4(a), below;
+ </li>
+
+<li>
+ <var class="replacable-license-text"> v.</var>
+ rights protecting the extraction, dissemination, use and reuse of data in a Work;
+ </li>
+
+<li>
+ <var class="replacable-license-text"> vi.</var>
+ database rights (such as those arising under Directive 96/9/EC of the European Parliament and
+ of the Council of 11 March 1996 on the legal protection of databases, and under any
+ national implementation thereof, including any amended or successor version of such
+ directive); and
+ </li>
+
+<li>
+ <var class="replacable-license-text"> vii.</var>
+ other similar, equivalent or corresponding rights throughout the world based on applicable
+ law or treaty, and any national implementations thereof.
+ </li>
+
+</ul>
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 2.</var>
+ Waiver. To the greatest extent permitted by, but not in contravention of, applicable law,
+ Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons,
+ and surrenders all of Affirmer's Copyright and Related Rights and associated claims and
+ causes of action, whether now known or unknown (including existing as well as future claims
+ and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum
+ duration provided by applicable law or treaty (including future time extensions), (iii) in any
+ current or future medium and for any number of copies, and (iv) for any purpose whatsoever,
+ including without limitation commercial, advertising or promotional purposes (the
+ "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at
+ large and to the detriment of Affirmer's heirs and successors, fully intending that such
+ Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other
+ legal or equitable action to disrupt the quiet enjoyment of the Work by the public as
+ contemplated by Affirmer's express Statement of Purpose.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 3.</var>
+ Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid
+ or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent
+ permitted taking into account Affirmer's express Statement of Purpose. In addition, to
+ the extent the Waiver is so judged Affirmer hereby grants to each affected person a
+ royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and
+ unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i)
+ in all territories worldwide, (ii) for the maximum duration provided by applicable law or
+ treaty (including future time extensions), (iii) in any current or future medium and for any
+ number of copies, and (iv) for any purpose whatsoever, including without limitation
+ commercial, advertising or promotional purposes (the "License"). The License shall
+ be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of
+ the License for any reason be judged legally invalid or ineffective under applicable law, such
+ partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and
+ in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her
+ remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and
+ causes of action with respect to the Work, in either case contrary to Affirmer's express
+ Statement of Purpose.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> 4.</var>
+ Limitations and Disclaimers.
+
+<ul style="list-style:none">
+
+<li>
+ <var class="replacable-license-text"> a.</var>
+ No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed
+ or otherwise affected by this document.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> b.</var>
+ Affirmer offers the Work as-is and makes no representations or warranties of any kind
+ concerning the Work, express, implied, statutory or otherwise, including without
+ limitation warranties of title, merchantability, fitness for a particular purpose, non
+ infringement, or the absence of latent or other defects, accuracy, or the present or
+ absence of errors, whether or not discoverable, all to the greatest extent permissible
+ under applicable law.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> c.</var>
+ Affirmer disclaims responsibility for clearing rights of other persons that may apply to the
+ Work or any use thereof, including without limitation any person's Copyright and
+ Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any
+ necessary consents, permissions or other rights required for any use of the Work.
+ </li>
+
+<li>
+ <var class="replacable-license-text"> d.</var>
+ Affirmer understands and acknowledges that Creative Commons is not a party to this document
+ and has no duty or obligation with respect to this CC0 or use of the Work.
+ </li>
+
+</ul>
+ </li>
+
+</ul>
+ <var class="optional-license-text"> <var class="replacable-license-text"> </var></var>
+
+ false
+ Creative Commons Zero v1.0 Universal
+ CC0-1.0
+
+
+ 0
+ 2022-05-08T23:56:45Z
+ https://creativecommons.org/publicdomain/zero/1.0/legalcode
+ false
+ false
+ true
+ true
+
+
+ Creative Commons Legal Code
+
+CC0 1.0 Universal
+
+ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
+ LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
+ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
+ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
+ REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
+ PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
+ THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
+ HEREUNDER.
+
+Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer
+exclusive Copyright and Related Rights (defined below) upon the creator
+and subsequent owner(s) (each and all, an "owner") of an original work of
+authorship and/or a database (each, a "Work").
+
+Certain owners wish to permanently relinquish those rights to a Work for
+the purpose of contributing to a commons of creative, cultural and
+scientific works ("Commons") that the public can reliably and without fear
+of later claims of infringement build upon, modify, incorporate in other
+works, reuse and redistribute as freely as possible in any form whatsoever
+and for any purposes, including without limitation commercial purposes.
+These owners may contribute to the Commons to promote the ideal of a free
+culture and the further production of creative, cultural and scientific
+works, or to gain reputation or greater distribution for their Work in
+part through the use and efforts of others.
+
+For these and/or other purposes and motivations, and without any
+expectation of additional consideration or compensation, the person
+associating CC0 with a Work (the "Affirmer"), to the extent that he or she
+is an owner of Copyright and Related Rights in the Work, voluntarily
+elects to apply CC0 to the Work and publicly distribute the Work under its
+terms, with knowledge of his or her Copyright and Related Rights in the
+Work and the meaning and intended legal effect of CC0 on those rights.
+
+1. Copyright and Related Rights. A Work made available under CC0 may be
+protected by copyright and related or neighboring rights ("Copyright and
+Related Rights"). Copyright and Related Rights include, but are not
+limited to, the following:
+
+ i. the right to reproduce, adapt, distribute, perform, display,
+ communicate, and translate a Work;
+ ii. moral rights retained by the original author(s) and/or performer(s);
+iii. publicity and privacy rights pertaining to a person's image or
+ likeness depicted in a Work;
+ iv. rights protecting against unfair competition in regards to a Work,
+ subject to the limitations in paragraph 4(a), below;
+ v. rights protecting the extraction, dissemination, use and reuse of data
+ in a Work;
+ vi. database rights (such as those arising under Directive 96/9/EC of the
+ European Parliament and of the Council of 11 March 1996 on the legal
+ protection of databases, and under any national implementation
+ thereof, including any amended or successor version of such
+ directive); and
+vii. other similar, equivalent or corresponding rights throughout the
+ world based on applicable law or treaty, and any national
+ implementations thereof.
+
+2. Waiver. To the greatest extent permitted by, but not in contravention
+of, applicable law, Affirmer hereby overtly, fully, permanently,
+irrevocably and unconditionally waives, abandons, and surrenders all of
+Affirmer's Copyright and Related Rights and associated claims and causes
+of action, whether now known or unknown (including existing as well as
+future claims and causes of action), in the Work (i) in all territories
+worldwide, (ii) for the maximum duration provided by applicable law or
+treaty (including future time extensions), (iii) in any current or future
+medium and for any number of copies, and (iv) for any purpose whatsoever,
+including without limitation commercial, advertising or promotional
+purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
+member of the public at large and to the detriment of Affirmer's heirs and
+successors, fully intending that such Waiver shall not be subject to
+revocation, rescission, cancellation, termination, or any other legal or
+equitable action to disrupt the quiet enjoyment of the Work by the public
+as contemplated by Affirmer's express Statement of Purpose.
+
+3. Public License Fallback. Should any part of the Waiver for any reason
+be judged legally invalid or ineffective under applicable law, then the
+Waiver shall be preserved to the maximum extent permitted taking into
+account Affirmer's express Statement of Purpose. In addition, to the
+extent the Waiver is so judged Affirmer hereby grants to each affected
+person a royalty-free, non transferable, non sublicensable, non exclusive,
+irrevocable and unconditional license to exercise Affirmer's Copyright and
+Related Rights in the Work (i) in all territories worldwide, (ii) for the
+maximum duration provided by applicable law or treaty (including future
+time extensions), (iii) in any current or future medium and for any number
+of copies, and (iv) for any purpose whatsoever, including without
+limitation commercial, advertising or promotional purposes (the
+"License"). The License shall be deemed effective as of the date CC0 was
+applied by Affirmer to the Work. Should any part of the License for any
+reason be judged legally invalid or ineffective under applicable law, such
+partial invalidity or ineffectiveness shall not invalidate the remainder
+of the License, and in such case Affirmer hereby affirms that he or she
+will not (i) exercise any of his or her remaining Copyright and Related
+Rights in the Work or (ii) assert any associated claims and causes of
+action with respect to the Work, in either case contrary to Affirmer's
+express Statement of Purpose.
+
+4. Limitations and Disclaimers.
+
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
+ surrendered, licensed or otherwise affected by this document.
+ b. Affirmer offers the Work as-is and makes no representations or
+ warranties of any kind concerning the Work, express, implied,
+ statutory or otherwise, including without limitation warranties of
+ title, merchantability, fitness for a particular purpose, non
+ infringement, or the absence of latent or other defects, accuracy, or
+ the present or absence of errors, whether or not discoverable, all to
+ the greatest extent permissible under applicable law.
+ c. Affirmer disclaims responsibility for clearing rights of other persons
+ that may apply to the Work or any use thereof, including without
+ limitation any person's Copyright and Related Rights in the Work.
+ Further, Affirmer disclaims responsibility for obtaining any necessary
+ consents, permissions or other rights required for any use of the
+ Work.
+ d. Affirmer understands and acknowledges that Creative Commons is not a
+ party to this document and has no duty or obligation with respect to
+ this CC0 or use of the Work.
+
+ https://creativecommons.org/publicdomain/zero/1.0/legalcode
+
+
+
+
+
+ http://people.freebsd.org/~phk/
+ LicenseRef-Beerware-4.2
+ The beerware license has a couple of other standard variants.
+ "THE BEER-WARE LICENSE" (Revision 42):
+phk@FreeBSD.ORG wrote this file. As long as you retain this notice you
+can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return Poul-Henning Kamp
+ Beer-Ware License (Version 42)
+
+
+
+
+
+
+
+
+ d6a770ba38583ed4bb4525bd96e50461655d2759
+
+
+
+
+
+
+ LicenseRef-4
+ /*
+ * (c) Copyright 2009 University of Bristol
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+
+
+
+
+
+
+
+ SPDX-2.3
+ This document was created using SPDX 2.0 using licenses from the web site.
+
+
+
+
+
+
+
+
+ Person: Jane Doe ()
+ Document level annotation
+
+ 2010-01-29T18:30:22Z
+
+
+
+
+ Person: Joe Reviewer
+ This is just an example. Some of the non-standard licenses look like they are actually BSD 3 clause licenses
+
+ 2010-02-10T00:00:00Z
+
+
+ SPDX-Tools-v2.0
+
+
+
+ http://commons.apache.org/proper/commons-lang/
+ NOASSERTION
+
+ NOASSERTION
+ Apache Commons Lang
+
+ false
+
+
diff --git a/tests/data/formats/SPDXSBOMExample.spdx.yml b/tests/data/formats/SPDXSBOMExample.spdx.yml
index a5664c3eb..5655dae55 100644
--- a/tests/data/formats/SPDXSBOMExample.spdx.yml
+++ b/tests/data/formats/SPDXSBOMExample.spdx.yml
@@ -16,6 +16,9 @@ documentDescribes:
packages:
- SPDXID: "SPDXRef-Package-xyz"
summary: "Awesome product created by Example Inc."
+ checksums:
+ - algorithm: SHA1
+ checksumValue: SOME-SHA1
copyrightText: "copyright 2004-2020 Example Inc. All Rights Reserved."
downloadLocation: "git+ssh://gitlab.example.com:3389/products/xyz.git@b2c358080011af6a366d2512a25a379fbe7b1f78"
filesAnalyzed: false
@@ -28,6 +31,9 @@ packages:
description: "A command line tool and library for transferring data with URL syntax, supporting \
HTTP, HTTPS, FTP, FTPS, GOPHER, TFTP, SCP, SFTP, SMB, TELNET, DICT, LDAP, LDAPS, MQTT, FILE, \
IMAP, SMTP, POP3, RTSP and RTMP. libcurl offers a myriad of powerful features."
+ checksums:
+ - algorithm: SHA1
+ checksumValue: SOME-SHA1
copyrightText: "Copyright (c) 1996 - 2020, Daniel Stenberg, , and many
contributors, see the THANKS file."
downloadLocation: "https://github.com/curl/curl/releases/download/curl-7_70_0/curl-7.70.0.tar.gz"
@@ -41,6 +47,9 @@ packages:
- SPDXID: "SPDXRef-Package-openssl"
description: "OpenSSL is a robust, commercial-grade, full-featured Open Source Toolkit for the Transport Layer Security (TLS) protocol formerly known as the Secure Sockets Layer (SSL) protocol. The protocol implementation is based on a full-strength general purpose cryptographic library, which can also be used stand-alone."
copyrightText: "copyright 2004-2020 The OpenSSL Project Authors. All Rights Reserved."
+ checksums:
+ - algorithm: SHA1
+ checksumValue: SOME-SHA1
downloadLocation: "git+ssh://github.com/openssl/openssl.git@e2e09d9fba1187f8d6aafaa34d4172f56f1ffb72"
filesAnalyzed: false
homepage: "https://www.openssl.org/"
diff --git a/tests/data/formats/SPDXTagExample.tag b/tests/data/formats/SPDXTagExample-v2.1.spdx
similarity index 98%
rename from tests/data/formats/SPDXTagExample.tag
rename to tests/data/formats/SPDXTagExample-v2.1.spdx
index 0f16500ff..ada8397fd 100644
--- a/tests/data/formats/SPDXTagExample.tag
+++ b/tests/data/formats/SPDXTagExample-v2.1.spdx
@@ -71,16 +71,20 @@ ExternalRefComment: NIST National Vulnerability Database (NVD) describes s
## File Information
FileName: src/org/spdx/parser/DOAPProject.java
SPDXID: SPDXRef-File1
-FileType: SOURCE
FileChecksum: SHA1: 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
+FileChecksum: SHA256: 2fd4e1c67a2d28fced849ee1bb76e7391b93eb120000000000000000
+FileType: SOURCE
+FileType: TEXT
LicenseConcluded: Apache-2.0
LicenseInfoInFile: Apache-2.0
FileCopyrightText: Copyright 2010, 2011 Source Auditor Inc.
FileName: Jenna-2.6.3/jena-2.6.3-sources.jar
SPDXID: SPDXRef-File2
-FileType: ARCHIVE
FileChecksum: SHA1: 3ab4e1c67a2d28fced849ee1bb76e7391b93f125
+FileChecksum: SHA256: 3ab4e1c67a2d28fced849ee1bb76e7391b93f1250000000000000000
+FileType: ARCHIVE
+FileType: OTHER
LicenseConcluded: LicenseRef-1
LicenseInfoInFile: LicenseRef-1
LicenseComments: This license is used by Jena
diff --git a/tests/data/formats/SPDXTagExample-v2.2.spdx b/tests/data/formats/SPDXTagExample-v2.2.spdx
new file mode 100644
index 000000000..1b186174e
--- /dev/null
+++ b/tests/data/formats/SPDXTagExample-v2.2.spdx
@@ -0,0 +1,330 @@
+SPDXVersion: SPDX-2.2
+DataLicense: CC0-1.0
+DocumentNamespace: http://spdx.org/spdxdocs/spdx-example-tv-2-2-444504E0-4F89-41D3-9A0C-0305E82C3301
+DocumentName: SPDX-Tools-v2.0
+SPDXID: SPDXRef-DOCUMENT
+DocumentComment: This document was created using SPDX 2.0 using licenses from the web site.
+
+## External Document References
+ExternalDocumentRef: DocumentRef-spdx-tool-1.2 http://spdx.org/spdxdocs/spdx-tools-v1.2-3F2504E0-4F89-41D3-9A0C-0305E82C3301 SHA1: d6a770ba38583ed4bb4525bd96e50461655d2759
+## Creation Information
+Creator: Tool: LicenseFind-1.0
+Creator: Organization: ExampleCodeInspect ()
+Creator: Person: Jane Doe ()
+Created: 2010-01-29T18:30:22Z
+CreatorComment: This package has been shipped in source and binary form.
+The binaries were created with gcc 4.5.1 and expect to link to
+compatible system run time libraries.
+LicenseListVersion: 3.9
+## Annotations
+Annotator: Person: Joe Reviewer
+AnnotationDate: 2010-02-10T00:00:00Z
+AnnotationComment: This is just an example. Some of the non-standard licenses look like they are actually BSD 3 clause licenses
+AnnotationType: REVIEW
+SPDXREF: SPDXRef-DOCUMENT
+Annotator: Person: Suzanne Reviewer
+AnnotationDate: 2011-03-13T00:00:00Z
+AnnotationComment: Another example reviewer.
+AnnotationType: REVIEW
+SPDXREF: SPDXRef-DOCUMENT
+Annotator: Person: Jane Doe ()
+AnnotationDate: 2010-01-29T18:30:22Z
+AnnotationComment: Document level annotation
+AnnotationType: OTHER
+SPDXREF: SPDXRef-DOCUMENT
+## Relationships
+Relationship: SPDXRef-DOCUMENT CONTAINS SPDXRef-Package
+Relationship: SPDXRef-DOCUMENT COPY_OF DocumentRef-spdx-tool-1.2:SPDXRef-ToolsElement
+Relationship: SPDXRef-DOCUMENT DESCRIBES SPDXRef-Package
+Relationship: SPDXRef-DOCUMENT DESCRIBES SPDXRef-File
+
+FileName: ./package/foo.c
+SPDXID: SPDXRef-File
+FileComment: The concluded license was taken from the package level that the file was included in.
+This information was found in the COPYING.txt file in the xyz directory.
+FileType: SOURCE
+FileChecksum: SHA1: d6a770ba38583ed4bb4525bd96e50461655d2758
+FileChecksum: MD5: 624c1abb3664f4b35547e7c73864ad24
+LicenseConcluded: (LGPL-2.0-only OR LicenseRef-2)
+LicenseInfoInFile: LicenseRef-2
+LicenseInfoInFile: GPL-2.0-only
+LicenseComments: The concluded license was taken from the package level that the file was included in.
+FileCopyrightText: Copyright 2008-2010 John Smith
+FileNotice: Copyright (c) 2001 Aaron Lehmann aaroni@vitelus.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the �Software�), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED �AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+FileContributor: The Regents of the University of California
+FileContributor: Modified by Paul Mundt lethal@linux-sh.org
+FileContributor: IBM Corporation
+## Annotations
+Annotator: Person: File Commenter
+AnnotationDate: 2011-01-29T18:30:22Z
+AnnotationComment: File level annotation
+AnnotationType: OTHER
+SPDXREF: SPDXRef-File
+## Relationships
+Relationship: SPDXRef-File GENERATED_FROM SPDXRef-fromDoap-0
+## Package Information
+PackageName: glibc
+SPDXID: SPDXRef-Package
+PackageVersion: 2.11.1
+PackageFileName: glibc-2.11.1.tar.gz
+PackageSupplier: Person: Jane Doe (jane.doe@example.com)
+PackageOriginator: Organization: ExampleCodeInspect (contact@example.com)
+PackageDownloadLocation: http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz
+PackageVerificationCode: d6a770ba38583ed4bb4525bd96e50461655d2758(excludes: ./package.spdx)
+PackageChecksum: MD5: 624c1abb3664f4b35547e7c73864ad24
+PackageChecksum: SHA1: 85ed0817af83a24ad8da68c2b5094de69833983c
+PackageChecksum: SHA256: 11b6d3ee554eedf79299905a98f9b9a04e498210b59f15094c916c91d150efcd
+PackageHomePage: http://ftp.gnu.org/gnu/glibc
+PackageSourceInfo: uses glibc-2_11-branch from git://sourceware.org/git/glibc.git.
+PackageLicenseConcluded: (LicenseRef-3 OR LGPL-2.0-only)
+## License information from files
+PackageLicenseInfoFromFiles: GPL-2.0-only
+PackageLicenseInfoFromFiles: LicenseRef-1
+PackageLicenseInfoFromFiles: LicenseRef-2
+PackageLicenseDeclared: (LicenseRef-3 AND LGPL-2.0-only)
+PackageLicenseComments: The license for this project changed with the release of version x.y. The version of the project included here post-dates the license change.
+PackageCopyrightText: Copyright 2008-2010 John Smith
+PackageSummary: GNU C library.
+PackageDescription: The GNU C Library defines functions that are specified by the ISO C standard, as well as additional features specific to POSIX and other derivatives of the Unix operating system, and extensions specific to GNU systems.
+PackageAttributionText: The GNU C Library is free software. See the file COPYING.LIB for copying conditions, and LICENSES for notices about a few contributions that require these additional notices to be distributed. License copyright years may be listed using range notation, e.g., 1996-2015, indicating that every year in the range, inclusive, is a copyrightable year that would otherwise be listed individually.
+ExternalRef: OTHER LocationRef-acmeforge acmecorp/acmenator/4.1.3-alpha
+ExternalRefComment: This is the external ref for Acme
+ExternalRef: SECURITY cpe23Type cpe:2.3:a:pivotal_software:spring_framework:4.1.0:*:*:*:*:*:*:*
+## Annotations
+Annotator: Person: Package Commenter
+AnnotationDate: 2011-01-29T18:30:22Z
+AnnotationComment: Package level annotation
+AnnotationType: OTHER
+SPDXREF: SPDXRef-Package
+## Relationships
+Relationship: SPDXRef-Package CONTAINS SPDXRef-JenaLib
+Relationship: SPDXRef-Package DYNAMIC_LINK SPDXRef-Saxon
+
+## File Information
+FileName: ./lib-source/commons-lang3-3.1-sources.jar
+SPDXID: SPDXRef-CommonsLangSrc
+FileComment: This file is used by Jena
+FileType: ARCHIVE
+FileChecksum: SHA1: c2b4e1c67a2d28fced849ee1bb76e7391b93f125
+LicenseConcluded: Apache-2.0
+LicenseInfoInFile: Apache-2.0
+FileCopyrightText: Copyright 2001-2011 The Apache Software Foundation
+FileNotice: Apache Commons Lang
+Copyright 2001-2011 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+This product includes software from the Spring Framework,
+under the Apache License 2.0 (see: StringUtils.containsWhitespace())
+FileContributor: Apache Software Foundation
+## Relationships
+Relationship: SPDXRef-CommonsLangSrc GENERATED_FROM NOASSERTION
+
+FileName: ./lib-source/jena-2.6.3-sources.jar
+SPDXID: SPDXRef-JenaLib
+FileComment: This file belongs to Jena
+FileType: ARCHIVE
+FileChecksum: SHA1: 3ab4e1c67a2d28fced849ee1bb76e7391b93f125
+LicenseConcluded: LicenseRef-1
+LicenseInfoInFile: LicenseRef-1
+LicenseComments: This license is used by Jena
+FileCopyrightText: (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
+FileContributor: Hewlett Packard Inc.
+FileContributor: Apache Software Foundation
+## Relationships
+Relationship: SPDXRef-JenaLib CONTAINS SPDXRef-Package
+
+FileName: ./src/org/spdx/parser/DOAPProject.java
+SPDXID: SPDXRef-DoapSource
+FileType: SOURCE
+FileChecksum: SHA1: 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
+LicenseConcluded: Apache-2.0
+LicenseInfoInFile: Apache-2.0
+FileCopyrightText: Copyright 2010, 2011 Source Auditor Inc.
+FileContributor: Open Logic Inc.
+FileContributor: Black Duck Software In.c
+FileContributor: Source Auditor Inc.
+FileContributor: SPDX Technical Team Members
+FileContributor: Protecode Inc.
+
+## Package Information
+PackageName: Apache Commons Lang
+SPDXID: SPDXRef-fromDoap-1
+PackageComment: This package was converted from a DOAP Project by the same name
+PackageDownloadLocation: NOASSERTION
+PackageHomePage: http://commons.apache.org/proper/commons-lang/
+PackageLicenseConcluded: NOASSERTION
+PackageLicenseDeclared: NOASSERTION
+PackageCopyrightText: NOASSERTION
+FilesAnalyzed: false
+
+## Package Information
+PackageName: Jena
+SPDXID: SPDXRef-fromDoap-0
+PackageComment: This package was converted from a DOAP Project by the same name
+PackageDownloadLocation: NOASSERTION
+PackageHomePage: http://www.openjena.org/
+PackageLicenseConcluded: NOASSERTION
+PackageLicenseDeclared: NOASSERTION
+PackageCopyrightText: NOASSERTION
+FilesAnalyzed: false
+
+## Package Information
+PackageName: Saxon
+SPDXID: SPDXRef-Saxon
+PackageVersion: 8.8
+PackageFileName: saxonB-8.8.zip
+PackageDownloadLocation: https://sourceforge.net/projects/saxon/files/Saxon-B/8.8.0.7/saxonb8-8-0-7j.zip/download
+PackageChecksum: SHA1: 85ed0817af83a24ad8da68c2b5094de69833983c
+PackageHomePage: http://saxon.sourceforge.net/
+PackageLicenseConcluded: MPL-1.0
+PackageLicenseDeclared: MPL-1.0
+PackageLicenseComments: Other versions available for a commercial license
+PackageDescription: The Saxon package is a collection of tools for processing XML documents.
+PackageCopyrightText: Copyright Saxonica Ltd
+FilesAnalyzed: false
+
+## Snippet Information
+SnippetSPDXID: SPDXRef-Snippet
+SnippetFromFileSPDXID: SPDXRef-DoapSource
+SnippetByteRange: 310:420
+SnippetLineRange: 5:23
+SnippetLicenseConcluded: GPL-2.0-only
+LicenseInfoInSnippet: GPL-2.0-only
+SnippetLicenseComments: The concluded license was taken from package xyz, from which the snippet was copied into the current file. The concluded license information was found in the COPYING.txt file in package xyz.
+SnippetCopyrightText: Copyright 2008-2010 John Smith
+SnippetComment: This snippet was identified as significant and highlighted in this Apache-2.0 file, when a commercial scanner identified it as being derived from file foo.c in package xyz which is licensed under GPL-2.0.
+SnippetName: from linux kernel
+
+
+## License Information
+LicenseID: LicenseRef-1
+ExtractedText: /*
+ * (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+LicenseID: LicenseRef-2
+ExtractedText: This package includes the GRDDL parser developed by Hewlett Packard under the following license:
+� Copyright 2007 Hewlett-Packard Development Company, LP
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+LicenseID: LicenseRef-Beerware-4.2
+ExtractedText: "THE BEER-WARE LICENSE" (Revision 42):
+phk@FreeBSD.ORG wrote this file. As long as you retain this notice you
+can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return Poul-Henning Kamp
+LicenseName: Beer-Ware License (Version 42)
+LicenseCrossReference: http://people.freebsd.org/~phk/
+LicenseComment:
+The beerware license has a couple of other standard variants.
+
+LicenseID: LicenseRef-3
+ExtractedText: The CyberNeko Software License, Version 1.0
+
+
+(C) Copyright 2002-2005, Andy Clark. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+3. The end-user documentation included with the redistribution,
+ if any, must include the following acknowledgment:
+ "This product includes software developed by Andy Clark."
+ Alternately, this acknowledgment may appear in the software itself,
+ if and wherever such third-party acknowledgments normally appear.
+
+4. The names "CyberNeko" and "NekoHTML" must not be used to endorse
+ or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ andyc@cyberneko.net.
+
+5. Products derived from this software may not be called "CyberNeko",
+ nor may "CyberNeko" appear in their name, without prior written
+ permission of the author.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+LicenseName: CyberNeko License
+LicenseCrossReference: http://people.apache.org/~andyc/neko/LICENSE, http://justasample.url.com
+LicenseComment: This is tye CyperNeko License
+
+LicenseID: LicenseRef-4
+ExtractedText: /*
+ * (c) Copyright 2009 University of Bristol
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
diff --git a/tests/data/formats/SPDXTagExample-v2.3.spdx b/tests/data/formats/SPDXTagExample-v2.3.spdx
new file mode 100644
index 000000000..b345ce06c
--- /dev/null
+++ b/tests/data/formats/SPDXTagExample-v2.3.spdx
@@ -0,0 +1,339 @@
+SPDXVersion: SPDX-2.3
+DataLicense: CC0-1.0
+DocumentNamespace: http://spdx.org/spdxdocs/spdx-example-tv-2-3-444504E0-4F89-41D3-9A0C-0305E82C3301
+DocumentName: SPDX-Tools-v2.0
+SPDXID: SPDXRef-DOCUMENT
+DocumentComment: This document was created using SPDX 2.0 using licenses from the web site.
+
+## External Document References
+ExternalDocumentRef: DocumentRef-spdx-tool-1.2 http://spdx.org/spdxdocs/spdx-tools-v1.2-3F2504E0-4F89-41D3-9A0C-0305E82C3301 SHA1: d6a770ba38583ed4bb4525bd96e50461655d2759
+## Creation Information
+Creator: Tool: LicenseFind-1.0
+Creator: Organization: ExampleCodeInspect ()
+Creator: Person: Jane Doe ()
+Created: 2010-01-29T18:30:22Z
+CreatorComment: This package has been shipped in source and binary form.
+The binaries were created with gcc 4.5.1 and expect to link to
+compatible system run time libraries.
+LicenseListVersion: 3.17
+## Annotations
+Annotator: Person: Jane Doe ()
+AnnotationDate: 2010-01-29T18:30:22Z
+AnnotationComment: Document level annotation
+AnnotationType: OTHER
+SPDXREF: SPDXRef-DOCUMENT
+Annotator: Person: Joe Reviewer
+AnnotationDate: 2010-02-10T00:00:00Z
+AnnotationComment: This is just an example. Some of the non-standard licenses look like they are actually BSD 3 clause licenses
+AnnotationType: REVIEW
+SPDXREF: SPDXRef-DOCUMENT
+Annotator: Person: Suzanne Reviewer
+AnnotationDate: 2011-03-13T00:00:00Z
+AnnotationComment: Another example reviewer.
+AnnotationType: REVIEW
+SPDXREF: SPDXRef-DOCUMENT
+## Relationships
+Relationship: SPDXRef-DOCUMENT CONTAINS SPDXRef-Package
+Relationship: SPDXRef-DOCUMENT COPY_OF DocumentRef-spdx-tool-1.2:SPDXRef-ToolsElement
+Relationship: SPDXRef-DOCUMENT DESCRIBES SPDXRef-File
+Relationship: SPDXRef-DOCUMENT DESCRIBES SPDXRef-Package
+
+FileName: ./package/foo.c
+SPDXID: SPDXRef-File
+FileComment: The concluded license was taken from the package level that the file was included in.
+This information was found in the COPYING.txt file in the xyz directory.
+FileType: SOURCE
+FileChecksum: SHA1: d6a770ba38583ed4bb4525bd96e50461655d2758
+FileChecksum: MD5: 624c1abb3664f4b35547e7c73864ad24
+LicenseConcluded: (LGPL-2.0-only OR LicenseRef-2)
+LicenseInfoInFile: GPL-2.0-only
+LicenseInfoInFile: LicenseRef-2
+LicenseComments: The concluded license was taken from the package level that the file was included in.
+FileCopyrightText: Copyright 2008-2010 John Smith
+FileNotice: Copyright (c) 2001 Aaron Lehmann aaroni@vitelus.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+FileContributor: The Regents of the University of California
+FileContributor: Modified by Paul Mundt lethal@linux-sh.org
+FileContributor: IBM Corporation
+## Annotations
+Annotator: Person: File Commenter
+AnnotationDate: 2011-01-29T18:30:22Z
+AnnotationComment: File level annotation
+AnnotationType: OTHER
+SPDXREF: SPDXRef-File
+## Relationships
+Relationship: SPDXRef-File GENERATED_FROM SPDXRef-fromDoap-0
+## Package Information
+PackageName: glibc
+SPDXID: SPDXRef-Package
+PackageVersion: 2.11.1
+PackageFileName: glibc-2.11.1.tar.gz
+PackageSupplier: Person: Jane Doe (jane.doe@example.com)
+PackageOriginator: Organization: ExampleCodeInspect (contact@example.com)
+PackageDownloadLocation: http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz
+PackageVerificationCode: d6a770ba38583ed4bb4525bd96e50461655d2758(./package.spdx)
+PackageChecksum: MD5: 624c1abb3664f4b35547e7c73864ad24
+PackageChecksum: SHA1: 85ed0817af83a24ad8da68c2b5094de69833983c
+PackageChecksum: SHA256: 11b6d3ee554eedf79299905a98f9b9a04e498210b59f15094c916c91d150efcd
+PackageChecksum: BLAKE2b-384: aaabd89c926ab525c242e6621f2f5fa73aa4afe3d9e24aed727faaadd6af38b620bdb623dd2b4788b1c8086984af8706
+PackageHomePage: http://ftp.gnu.org/gnu/glibc
+PackageSourceInfo: uses glibc-2_11-branch from git://sourceware.org/git/glibc.git.
+PrimaryPackagePurpose: SOURCE
+BuiltDate: 2011-01-29T18:30:22Z
+ReleaseDate: 2012-01-29T18:30:22Z
+ValidUntilDate: 2014-01-29T18:30:22Z
+PackageLicenseConcluded: (LGPL-2.0-only OR LicenseRef-3)
+## License information from files
+PackageLicenseInfoFromFiles: GPL-2.0-only
+PackageLicenseInfoFromFiles: LicenseRef-2
+PackageLicenseInfoFromFiles: LicenseRef-1
+PackageLicenseDeclared: (LGPL-2.0-only AND LicenseRef-3)
+PackageLicenseComments: The license for this project changed with the release of version x.y. The version of the project included here post-dates the license change.
+PackageCopyrightText: Copyright 2008-2010 John Smith
+PackageSummary: GNU C library.
+PackageDescription: The GNU C Library defines functions that are specified by the ISO C standard, as well as additional features specific to POSIX and other derivatives of the Unix operating system, and extensions specific to GNU systems.
+PackageAttributionText: The GNU C Library is free software. See the file COPYING.LIB for copying conditions, and LICENSES for notices about a few contributions that require these additional notices to be distributed. License copyright years may be listed using range notation, e.g., 1996-2015, indicating that every year in the range, inclusive, is a copyrightable year that would otherwise be listed individually.
+ExternalRef: SECURITY cpe23Type cpe:2.3:a:pivotal_software:spring_framework:4.1.0:*:*:*:*:*:*:*
+ExternalRef: OTHER LocationRef-acmeforge acmecorp/acmenator/4.1.3-alpha
+ExternalRefComment: This is the external ref for Acme
+## Annotations
+Annotator: Person: Package Commenter
+AnnotationDate: 2011-01-29T18:30:22Z
+AnnotationComment: Package level annotation
+AnnotationType: OTHER
+SPDXREF: SPDXRef-Package
+## Relationships
+Relationship: SPDXRef-Package CONTAINS SPDXRef-JenaLib
+Relationship: SPDXRef-Package DYNAMIC_LINK SPDXRef-Saxon
+
+## File Information
+FileName: ./docs/myspec.pdf
+SPDXID: SPDXRef-Specification
+FileComment: Specification Documentation
+FileType: DOCUMENTATION
+FileChecksum: SHA1: fff4e1c67a2d28fced849ee1bb76e7391b93f125
+Relationship: SPDXRef-Specification SPECIFICATION_FOR SPDXRef-fromDoap-0
+
+## File Information
+FileName: ./lib-source/commons-lang3-3.1-sources.jar
+SPDXID: SPDXRef-CommonsLangSrc
+FileComment: This file is used by Jena
+FileType: ARCHIVE
+FileChecksum: SHA1: c2b4e1c67a2d28fced849ee1bb76e7391b93f125
+LicenseConcluded: Apache-2.0
+LicenseInfoInFile: Apache-2.0
+FileCopyrightText: Copyright 2001-2011 The Apache Software Foundation
+FileNotice: Apache Commons Lang
+Copyright 2001-2011 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+This product includes software from the Spring Framework,
+under the Apache License 2.0 (see: StringUtils.containsWhitespace())
+FileContributor: Apache Software Foundation
+## Relationships
+Relationship: SPDXRef-CommonsLangSrc GENERATED_FROM NOASSERTION
+
+FileName: ./lib-source/jena-2.6.3-sources.jar
+SPDXID: SPDXRef-JenaLib
+FileComment: This file belongs to Jena
+FileType: ARCHIVE
+FileChecksum: SHA1: 3ab4e1c67a2d28fced849ee1bb76e7391b93f125
+LicenseConcluded: LicenseRef-1
+LicenseInfoInFile: LicenseRef-1
+LicenseComments: This license is used by Jena
+FileCopyrightText: (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
+FileContributor: Apache Software Foundation
+FileContributor: Hewlett Packard Inc.
+## Relationships
+Relationship: SPDXRef-JenaLib CONTAINS SPDXRef-Package
+
+FileName: ./src/org/spdx/parser/DOAPProject.java
+SPDXID: SPDXRef-DoapSource
+FileType: SOURCE
+FileChecksum: SHA1: 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
+LicenseConcluded: Apache-2.0
+LicenseInfoInFile: Apache-2.0
+FileCopyrightText: Copyright 2010, 2011 Source Auditor Inc.
+FileContributor: Protecode Inc.
+FileContributor: SPDX Technical Team Members
+FileContributor: Open Logic Inc.
+FileContributor: Source Auditor Inc.
+FileContributor: Black Duck Software In.c
+
+## Package Information
+PackageName: Apache Commons Lang
+SPDXID: SPDXRef-fromDoap-1
+PackageDownloadLocation: NOASSERTION
+PackageHomePage: http://commons.apache.org/proper/commons-lang/
+PackageLicenseConcluded: NOASSERTION
+PackageLicenseDeclared: NOASSERTION
+PackageCopyrightText: NOASSERTION
+FilesAnalyzed: false
+
+## Package Information
+PackageName: Jena
+SPDXID: SPDXRef-fromDoap-0
+PackageVersion: 3.12.0
+PackageDownloadLocation: https://search.maven.org/remotecontent?filepath=org/apache/jena/apache-jena/3.12.0/apache-jena-3.12.0.tar.gz
+PackageHomePage: http://www.openjena.org/
+ExternalRef: PACKAGE-MANAGER purl pkg:maven/org.apache.jena/apache-jena@3.12.0
+FilesAnalyzed: false
+
+## Package Information
+PackageName: Saxon
+SPDXID: SPDXRef-Saxon
+PackageVersion: 8.8
+PackageFileName: saxonB-8.8.zip
+PackageDownloadLocation: https://sourceforge.net/projects/saxon/files/Saxon-B/8.8.0.7/saxonb8-8-0-7j.zip/download
+PackageChecksum: SHA1: 85ed0817af83a24ad8da68c2b5094de69833983c
+PackageHomePage: http://saxon.sourceforge.net/
+PackageLicenseConcluded: MPL-1.0
+PackageLicenseDeclared: MPL-1.0
+PackageLicenseComments: Other versions available for a commercial license
+PackageCopyrightText: Copyright Saxonica Ltd
+PackageDescription: The Saxon package is a collection of tools for processing XML documents.
+FilesAnalyzed: false
+
+## Snippet Information
+SnippetSPDXID: SPDXRef-Snippet
+SnippetFromFileSPDXID: SPDXRef-DoapSource
+SnippetByteRange: 310:420
+SnippetLineRange: 5:23
+SnippetLicenseConcluded: GPL-2.0-only
+LicenseInfoInSnippet: GPL-2.0-only
+SnippetLicenseComments: The concluded license was taken from package xyz, from which the snippet was copied into the current file. The concluded license information was found in the COPYING.txt file in package xyz.
+SnippetCopyrightText: Copyright 2008-2010 John Smith
+SnippetComment: This snippet was identified as significant and highlighted in this Apache-2.0 file, when a commercial scanner identified it as being derived from file foo.c in package xyz which is licensed under GPL-2.0.
+SnippetName: from linux kernel
+
+
+## License Information
+LicenseID: LicenseRef-1
+ExtractedText: /*
+ * (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+LicenseID: LicenseRef-2
+ExtractedText: This package includes the GRDDL parser developed by Hewlett Packard under the following license:
+© Copyright 2007 Hewlett-Packard Development Company, LP
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+LicenseID: LicenseRef-4
+ExtractedText: /*
+ * (c) Copyright 2009 University of Bristol
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+LicenseID: LicenseRef-Beerware-4.2
+ExtractedText: "THE BEER-WARE LICENSE" (Revision 42):
+phk@FreeBSD.ORG wrote this file. As long as you retain this notice you
+can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return Poul-Henning Kamp
+LicenseName: Beer-Ware License (Version 42)
+LicenseCrossReference: http://people.freebsd.org/~phk/
+LicenseComment: The beerware license has a couple of other standard variants.
+
+LicenseID: LicenseRef-3
+ExtractedText: The CyberNeko Software License, Version 1.0
+
+
+(C) Copyright 2002-2005, Andy Clark. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+3. The end-user documentation included with the redistribution,
+ if any, must include the following acknowledgment:
+ "This product includes software developed by Andy Clark."
+ Alternately, this acknowledgment may appear in the software itself,
+ if and wherever such third-party acknowledgments normally appear.
+
+4. The names "CyberNeko" and "NekoHTML" must not be used to endorse
+ or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ andyc@cyberneko.net.
+
+5. Products derived from this software may not be called "CyberNeko",
+ nor may "CyberNeko" appear in their name, without prior written
+ permission of the author.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+LicenseName: CyberNeko License
+LicenseCrossReference: http://people.apache.org/~andyc/neko/LICENSE, http://justasample.url.com
+LicenseComment: This is tye CyperNeko License
+
diff --git a/tests/data/formats/SPDXXmlExample.xml b/tests/data/formats/SPDXXMLExample-v2.1.spdx.xml
similarity index 84%
rename from tests/data/formats/SPDXXmlExample.xml
rename to tests/data/formats/SPDXXMLExample-v2.1.spdx.xml
index 8b88f267d..b88104b07 100644
--- a/tests/data/formats/SPDXXmlExample.xml
+++ b/tests/data/formats/SPDXXMLExample-v2.1.spdx.xml
@@ -7,52 +7,62 @@
SPDXRef-Package
Organization: SPDX
- The GNU C Library is free software. See the file COPYING.LIB for copying conditions, and LICENSES for notices about a few contributions that require these additional notices to be distributed. License copyright years may be listed using range notation, e.g., 1996-2015, indicating that every year in the range, inclusive, is a copyrightable year that would otherwise be listed individually.
+ The GNU C Library is free software. See the file COPYING.LIB for copying conditions, and LICENSES for notices about a few contributions that require these additional notices to be distributed. License copyright years may be listed using range notation, e.g., 1996-2015, indicating that every year in the range, inclusive, is a copyrightable year that would otherwise be listed individually.
-
- Apache-2.0
- 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
- src/org/spdx/parser/DOAPProject.java
- Copyright 2010, 2011 Source Auditor Inc.
- Apache-2.0
-
-
- 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
- checksumAlgorithm_sha1
-
- fileType_source
- SPDXRef-File2
-
+ Apache-2.0
+ 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
+ src/org/spdx/parser/DOAPProject.java
+ Copyright 2010, 2011 Source Auditor Inc.
+ Apache-2.0
+
+
+ 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
+ checksumAlgorithm_sha1
+
+
+ 2fd4e1c67a2d28fced849ee1bb76e7391b93eb120000000000000000
+ checksumAlgorithm_sha256
+
+ fileType_source
+ fileType_text
+ SPDXRef-File2
-
- This file belongs to Jena
- LicenseRef-1
- 3ab4e1c67a2d28fced849ee1bb76e7391b93f125
- Jenna-2.6.3/jena-2.6.3-sources.jar
- (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
-
- Jena
- http://www.openjena.org/
- http://subversion.apache.org/doap.rdf
-
- LicenseRef-1
- This license is used by Jena
-
- 3ab4e1c67a2d28fced849ee1bb76e7391b93f125
- checksumAlgorithm_sha1
-
- fileType_archive
- SPDXRef-File1
-
+ This file belongs to Jena
+ LicenseRef-1
+ 3ab4e1c67a2d28fced849ee1bb76e7391b93f125
+ Jenna-2.6.3/jena-2.6.3-sources.jar
+ (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
+
+ Jena
+ http://www.openjena.org/
+ http://subversion.apache.org/doap.rdf
+
+ LicenseRef-1
+ This license is used by Jena
+
+ 3ab4e1c67a2d28fced849ee1bb76e7391b93f125
+ checksumAlgorithm_sha1
+
+
+ 3ab4e1c67a2d28fced849ee1bb76e7391b93f1250000000000000000
+ checksumAlgorithm_sha256
+
+ fileType_archive
+ fileType_other
+ SPDXRef-File1
- LicenseRef-3
- LicenseRef-1
Apache-1.0
+ LicenseRef-3
+ MPL-1.1
+ LicenseRef-2
LicenseRef-4
Apache-2.0
- LicenseRef-2
- MPL-1.1
+ LicenseRef-1
+
+ 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
+ checksumAlgorithm_sha1
+
2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
SPDX Translator
spdxtranslator-1.0.zip
@@ -67,10 +77,6 @@
(LicenseRef-1 AND MPL-1.1 AND LicenseRef-2 AND LicenseRef-3 AND Apache-2.0 AND LicenseRef-4 AND Apache-1.0)
Organization: Linux Foundation
-
- 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
- checksumAlgorithm_sha1
-
Version 0.9.2
(LicenseRef-3 AND LicenseRef-2 AND Apache-2.0 AND MPL-1.1 AND LicenseRef-1 AND LicenseRef-4)
http://www.spdx.org/tools
@@ -239,7 +245,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from linux kernel
Copyright 2008-2010 John Smith
Apache-2.0
- Apache-2.0
+ Apache-2.0
The concluded license was taken from package xyz, from which the snippet was copied into the current file. The concluded license information was found in the COPYING.txt file in package xyz.
SPDXRef-Snippet
SPDXRef-DoapSource
diff --git a/tests/data/formats/SPDXXMLExample-v2.2.spdx.xml b/tests/data/formats/SPDXXMLExample-v2.2.spdx.xml
new file mode 100644
index 000000000..7d8dfab76
--- /dev/null
+++ b/tests/data/formats/SPDXXMLExample-v2.2.spdx.xml
@@ -0,0 +1,440 @@
+
+
+ SPDXRef-DOCUMENT
+ SPDX-2.2
+
+ This package has been shipped in source and binary form.
+The binaries were created with gcc 4.5.1 and expect to link to
+compatible system run time libraries.
+ 2010-01-29T18:30:22Z
+ Tool: LicenseFind-1.0
+ Organization: ExampleCodeInspect ()
+ Person: Jane Doe ()
+ 3.9
+
+ SPDX-Tools-v2.0
+ CC0-1.0
+ This document was created using SPDX 2.0 using licenses from the web site.
+
+ DocumentRef-spdx-tool-1.2
+
+ SHA1
+ d6a770ba38583ed4bb4525bd96e50461655d2759
+
+ http://spdx.org/spdxdocs/spdx-tools-v1.2-3F2504E0-4F89-41D3-9A0C-0305E82C3301
+
+
+ "THE BEER-WARE LICENSE" (Revision 42):
+phk@FreeBSD.ORG wrote this file. As long as you retain this notice you
+can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return Poul-Henning Kamp </
+LicenseName: Beer-Ware License (Version 42)
+LicenseCrossReference: http://people.freebsd.org/~phk/
+LicenseComment:
+The beerware license has a couple of other standard variants.
+ LicenseRef-Beerware-4.2
+
+
+ /*
+ * (c) Copyright 2009 University of Bristol
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+ LicenseRef-4
+
+
+ This is tye CyperNeko License
+ The CyberNeko Software License, Version 1.0
+
+
+(C) Copyright 2002-2005, Andy Clark. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+3. The end-user documentation included with the redistribution,
+ if any, must include the following acknowledgment:
+ "This product includes software developed by Andy Clark."
+ Alternately, this acknowledgment may appear in the software itself,
+ if and wherever such third-party acknowledgments normally appear.
+
+4. The names "CyberNeko" and "NekoHTML" must not be used to endorse
+ or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ andyc@cyberneko.net.
+
+5. Products derived from this software may not be called "CyberNeko",
+ nor may "CyberNeko" appear in their name, without prior written
+ permission of the author.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ LicenseRef-3
+ CyberNeko License
+ http://people.apache.org/~andyc/neko/LICENSE
+ http://justasample.url.com
+
+
+ This package includes the GRDDL parser developed by Hewlett Packard under the following license:
+� Copyright 2007 Hewlett-Packard Development Company, LP
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ LicenseRef-2
+
+
+ /*
+ * (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+ LicenseRef-1
+
+
+ 2011-03-13T00:00:00Z
+ REVIEW
+ Person: Suzanne Reviewer
+ Another example reviewer.
+
+
+ 2010-01-29T18:30:22Z
+ OTHER
+ Person: Jane Doe ()
+ Document level annotation
+
+
+ 2010-02-10T00:00:00Z
+ REVIEW
+ Person: Joe Reviewer
+ This is just an example. Some of the non-standard licenses look like they are actually BSD 3 clause licenses
+
+ http://spdx.org/spdxdocs/spdx-example-xml-2-2-444504E0-4F89-41D3-9A0C-0305E82C3301
+ SPDXRef-File
+ SPDXRef-Package
+
+ SPDXRef-Package
+
+ 2011-01-29T18:30:22Z
+ OTHER
+ Person: Package Commenter
+ Package level annotation
+
+ The GNU C Library is free software. See the file COPYING.LIB for copying conditions, and LICENSES for notices about a few contributions that require these additional notices to be distributed. License copyright years may be listed using range notation, e.g., 1996-2015, indicating that every year in the range, inclusive, is a copyrightable year that would otherwise be listed individually.
+
+ SHA256
+ 11b6d3ee554eedf79299905a98f9b9a04e498210b59f15094c916c91d150efcd
+
+
+ SHA1
+ 85ed0817af83a24ad8da68c2b5094de69833983c
+
+
+ MD5
+ 624c1abb3664f4b35547e7c73864ad24
+
+ Copyright 2008-2010 John Smith
+ The GNU C Library defines functions that are specified by the ISO C standard, as well as additional features specific to POSIX and other derivatives of the Unix operating system, and extensions specific to GNU systems.
+ http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz
+
+ SECURITY
+ cpe:2.3:a:pivotal_software:spring_framework:4.1.0:*:*:*:*:*:*:*
+ http://spdx.org/rdf/references/cpe23Type
+
+
+ This is the external ref for Acme
+ OTHER
+ acmecorp/acmenator/4.1.3-alpha
+ http://spdx.org/spdxdocs/spdx-example-444504E0-4F89-41D3-9A0C-0305E82C3301#LocationRef-acmeforge
+
+ true
+ SPDXRef-JenaLib
+ SPDXRef-DoapSource
+ SPDXRef-CommonsLangSrc
+ http://ftp.gnu.org/gnu/glibc
+ The license for this project changed with the release of version x.y. The version of the project included here post-dates the license change.
+ (LGPL-2.0-only OR LicenseRef-3)
+ (LGPL-2.0-only AND LicenseRef-3)
+ GPL-2.0-only
+ LicenseRef-2
+ LicenseRef-1
+ glibc
+ Organization: ExampleCodeInspect (contact@example.com)
+ glibc-2.11.1.tar.gz
+
+ ./package.spdx
+ d6a770ba38583ed4bb4525bd96e50461655d2758
+
+ uses glibc-2_11-branch from git://sourceware.org/git/glibc.git.
+ GNU C library.
+ Person: Jane Doe (jane.doe@example.com)
+ 2.11.1
+
+
+ SPDXRef-fromDoap-1
+ This package was converted from a DOAP Project by the same name
+ NOASSERTION
+ NOASSERTION
+ false
+ http://commons.apache.org/proper/commons-lang/
+ NOASSERTION
+ NOASSERTION
+ Apache Commons Lang
+
+
+ SPDXRef-fromDoap-0
+ This package was converted from a DOAP Project by the same name
+ NOASSERTION
+ NOASSERTION
+ false
+ http://www.openjena.org/
+ NOASSERTION
+ NOASSERTION
+ Jena
+
+
+ SPDXRef-Saxon
+
+ SHA1
+ 85ed0817af83a24ad8da68c2b5094de69833983c
+
+ Copyright Saxonica Ltd
+ The Saxon package is a collection of tools for processing XML documents.
+ https://sourceforge.net/projects/saxon/files/Saxon-B/8.8.0.7/saxonb8-8-0-7j.zip/download
+ false
+ http://saxon.sourceforge.net/
+ Other versions available for a commercial license
+ MPL-1.0
+ MPL-1.0
+ Saxon
+ saxonB-8.8.zip
+ 8.8
+
+
+ SPDXRef-DoapSource
+
+ SHA1
+ 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
+
+ Copyright 2010, 2011 Source Auditor Inc.
+ Protecode Inc.
+ SPDX Technical Team Members
+ Open Logic Inc.
+ Source Auditor Inc.
+ Black Duck Software In.c
+ ./src/org/spdx/parser/DOAPProject.java
+ SOURCE
+ Apache-2.0
+ Apache-2.0
+
+
+ SPDXRef-CommonsLangSrc
+
+ SHA1
+ c2b4e1c67a2d28fced849ee1bb76e7391b93f125
+
+ This file is used by Jena
+ Copyright 2001-2011 The Apache Software Foundation
+ Apache Software Foundation
+ ./lib-source/commons-lang3-3.1-sources.jar
+ ARCHIVE
+ Apache-2.0
+ Apache-2.0
+ Apache Commons Lang
+Copyright 2001-2011 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+This product includes software from the Spring Framework,
+under the Apache License 2.0 (see: StringUtils.containsWhitespace())
+
+
+ SPDXRef-JenaLib
+
+ SHA1
+ 3ab4e1c67a2d28fced849ee1bb76e7391b93f125
+
+ This file belongs to Jena
+ (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
+ Apache Software Foundation
+ Hewlett Packard Inc.
+ ./lib-source/jena-2.6.3-sources.jar
+ ARCHIVE
+ This license is used by Jena
+ LicenseRef-1
+ LicenseRef-1
+
+
+ SPDXRef-File
+
+ 2011-01-29T18:30:22Z
+ OTHER
+ Person: File Commenter
+ File level annotation
+
+
+ SHA1
+ d6a770ba38583ed4bb4525bd96e50461655d2758
+
+
+ MD5
+ 624c1abb3664f4b35547e7c73864ad24
+
+ The concluded license was taken from the package level that the file was included in.
+This information was found in the COPYING.txt file in the xyz directory.
+ Copyright 2008-2010 John Smith
+ The Regents of the University of California
+ Modified by Paul Mundt lethal@linux-sh.org
+ IBM Corporation
+ ./package/foo.c
+ SOURCE
+ The concluded license was taken from the package level that the file was included in.
+ (LGPL-2.0-only OR LicenseRef-2)
+ GPL-2.0-only
+ LicenseRef-2
+ Copyright (c) 2001 Aaron Lehmann aaroni@vitelus.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the �Software�), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED �AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+ SPDXRef-Snippet
+ This snippet was identified as significant and highlighted in this Apache-2.0 file, when a commercial scanner identified it as being derived from file foo.c in package xyz which is licensed under GPL-2.0.
+ Copyright 2008-2010 John Smith
+ The concluded license was taken from package xyz, from which the snippet was copied into the current file. The concluded license information was found in the COPYING.txt file in package xyz.
+ GPL-2.0-only
+ GPL-2.0-only
+ from linux kernel
+
+
+ 420
+ SPDXRef-DoapSource
+
+
+ 310
+ SPDXRef-DoapSource
+
+
+
+
+ 23
+ SPDXRef-DoapSource
+
+
+ 5
+ SPDXRef-DoapSource
+
+
+ SPDXRef-DoapSource
+
+
+ SPDXRef-DOCUMENT
+ SPDXRef-File
+ DESCRIBES
+
+
+ SPDXRef-DOCUMENT
+ SPDXRef-Package
+ DESCRIBES
+
+
+ SPDXRef-DOCUMENT
+ DocumentRef-spdx-tool-1.2:SPDXRef-ToolsElement
+ COPY_OF
+
+
+ SPDXRef-DOCUMENT
+ SPDXRef-Package
+ CONTAINS
+
+
+ SPDXRef-Package
+ SPDXRef-Saxon
+ DYNAMIC_LINK
+
+
+ SPDXRef-Package
+ SPDXRef-JenaLib
+ CONTAINS
+
+
+ SPDXRef-CommonsLangSrc
+ NOASSERTION
+ GENERATED_FROM
+
+
+ SPDXRef-JenaLib
+ SPDXRef-Package
+ CONTAINS
+
+
+ SPDXRef-File
+ SPDXRef-fromDoap-0
+ GENERATED_FROM
+
+
diff --git a/tests/data/formats/SPDXXMLExample-v2.3.spdx.xml b/tests/data/formats/SPDXXMLExample-v2.3.spdx.xml
new file mode 100644
index 000000000..17098e9d2
--- /dev/null
+++ b/tests/data/formats/SPDXXMLExample-v2.3.spdx.xml
@@ -0,0 +1,460 @@
+
+
+ SPDXRef-DOCUMENT
+ SPDX-2.3
+
+ This package has been shipped in source and binary form.
+The binaries were created with gcc 4.5.1 and expect to link to
+compatible system run time libraries.
+ 2010-01-29T18:30:22Z
+ Tool: LicenseFind-1.0
+ Organization: ExampleCodeInspect ()
+ Person: Jane Doe ()
+ 3.17
+
+ SPDX-Tools-v2.0
+ CC0-1.0
+ This document was created using SPDX 2.0 using licenses from the web site.
+
+ DocumentRef-spdx-tool-1.2
+
+ SHA1
+ d6a770ba38583ed4bb4525bd96e50461655d2759
+
+ http://spdx.org/spdxdocs/spdx-tools-v1.2-3F2504E0-4F89-41D3-9A0C-0305E82C3301
+
+
+ LicenseRef-1
+ /*
+ * (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+ LicenseRef-2
+ This package includes the GRDDL parser developed by Hewlett Packard under the following license:
+© Copyright 2007 Hewlett-Packard Development Company, LP
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ LicenseRef-4
+ /*
+ * (c) Copyright 2009 University of Bristol
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+ LicenseRef-Beerware-4.2
+ The beerware license has a couple of other standard variants.
+ "THE BEER-WARE LICENSE" (Revision 42):
+phk@FreeBSD.ORG wrote this file. As long as you retain this notice you
+can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return Poul-Henning Kamp
+ Beer-Ware License (Version 42)
+ http://people.freebsd.org/~phk/
+
+
+ LicenseRef-3
+ This is tye CyperNeko License
+ The CyberNeko Software License, Version 1.0
+
+
+(C) Copyright 2002-2005, Andy Clark. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+3. The end-user documentation included with the redistribution,
+ if any, must include the following acknowledgment:
+ "This product includes software developed by Andy Clark."
+ Alternately, this acknowledgment may appear in the software itself,
+ if and wherever such third-party acknowledgments normally appear.
+
+4. The names "CyberNeko" and "NekoHTML" must not be used to endorse
+ or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ andyc@cyberneko.net.
+
+5. Products derived from this software may not be called "CyberNeko",
+ nor may "CyberNeko" appear in their name, without prior written
+ permission of the author.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR OTHER CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ CyberNeko License
+ http://people.apache.org/~andyc/neko/LICENSE
+ http://justasample.url.com
+
+
+ 2010-01-29T18:30:22Z
+ OTHER
+ Person: Jane Doe ()
+ Document level annotation
+
+
+ 2010-02-10T00:00:00Z
+ REVIEW
+ Person: Joe Reviewer
+ This is just an example. Some of the non-standard licenses look like they are actually BSD 3 clause licenses
+
+
+ 2011-03-13T00:00:00Z
+ REVIEW
+ Person: Suzanne Reviewer
+ Another example reviewer.
+
+ SPDXRef-File
+ SPDXRef-File
+ SPDXRef-Package
+ http://spdx.org/spdxdocs/spdx-example-xml-2-3-444504E0-4F89-41D3-9A0C-0305E82C3301
+
+ SPDXRef-Package
+
+ 2011-01-29T18:30:22Z
+ OTHER
+ Person: Package Commenter
+ Package level annotation
+
+ The GNU C Library is free software. See the file COPYING.LIB for copying conditions, and LICENSES for notices about a few contributions that require these additional notices to be distributed. License copyright years may be listed using range notation, e.g., 1996-2015, indicating that every year in the range, inclusive, is a copyrightable year that would otherwise be listed individually.
+ 2011-01-29T18:30:22Z
+
+ MD5
+ 624c1abb3664f4b35547e7c73864ad24
+
+
+ SHA1
+ 85ed0817af83a24ad8da68c2b5094de69833983c
+
+
+ SHA256
+ 11b6d3ee554eedf79299905a98f9b9a04e498210b59f15094c916c91d150efcd
+
+
+ BLAKE2b-384
+ aaabd89c926ab525c242e6621f2f5fa73aa4afe3d9e24aed727faaadd6af38b620bdb623dd2b4788b1c8086984af8706
+
+ Copyright 2008-2010 John Smith
+ The GNU C Library defines functions that are specified by the ISO C standard, as well as additional features specific to POSIX and other derivatives of the Unix operating system, and extensions specific to GNU systems.
+ http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz
+
+ SECURITY
+ cpe:2.3:a:pivotal_software:spring_framework:4.1.0:*:*:*:*:*:*:*
+ cpe23Type
+
+
+ This is the external ref for Acme
+ OTHER
+ acmecorp/acmenator/4.1.3-alpha
+ http://spdx.org/spdxdocs/spdx-example-444504E0-4F89-41D3-9A0C-0305E82C3301#LocationRef-acmeforge
+
+ true
+ http://ftp.gnu.org/gnu/glibc
+ The license for this project changed with the release of version x.y. The version of the project included here post-dates the license change.
+ (LGPL-2.0-only OR LicenseRef-3)
+ (LGPL-2.0-only AND LicenseRef-3)
+ GPL-2.0-only
+ LicenseRef-2
+ LicenseRef-1
+ glibc
+ Organization: ExampleCodeInspect (contact@example.com)
+ glibc-2.11.1.tar.gz
+
+ ./package.spdx
+ d6a770ba38583ed4bb4525bd96e50461655d2758
+
+ SOURCE
+ SPDXRef-Specification
+ SPDXRef-Specification
+ SPDXRef-CommonsLangSrc
+ SPDXRef-Specification
+ SPDXRef-CommonsLangSrc
+ SPDXRef-JenaLib
+ SPDXRef-Specification
+ SPDXRef-CommonsLangSrc
+ SPDXRef-JenaLib
+ SPDXRef-DoapSource
+ SPDXRef-Specification
+ SPDXRef-CommonsLangSrc
+ SPDXRef-JenaLib
+ SPDXRef-DoapSource
+ 2012-01-29T18:30:22Z
+ uses glibc-2_11-branch from git://sourceware.org/git/glibc.git.
+ GNU C library.
+ Person: Jane Doe (jane.doe@example.com)
+ 2014-01-29T18:30:22Z
+ 2.11.1
+
+
+ SPDXRef-fromDoap-1
+ NOASSERTION
+ NOASSERTION
+ false
+ http://commons.apache.org/proper/commons-lang/
+ NOASSERTION
+ NOASSERTION
+ Apache Commons Lang
+
+
+ SPDXRef-fromDoap-0
+ https://search.maven.org/remotecontent?filepath=org/apache/jena/apache-jena/3.12.0/apache-jena-3.12.0.tar.gz
+
+ PACKAGE-MANAGER
+ pkg:maven/org.apache.jena/apache-jena@3.12.0
+ http://spdx.org/spdxdocs/spdx-example-444504E0-4F89-41D3-9A0C-0305E82C3301#purl
+
+ false
+ http://www.openjena.org/
+ Jena
+ 3.12.0
+
+
+ SPDXRef-Saxon
+
+ SHA1
+ 85ed0817af83a24ad8da68c2b5094de69833983c
+
+ Copyright Saxonica Ltd
+ The Saxon package is a collection of tools for processing XML documents.
+ https://sourceforge.net/projects/saxon/files/Saxon-B/8.8.0.7/saxonb8-8-0-7j.zip/download
+ false
+ http://saxon.sourceforge.net/
+ Other versions available for a commercial license
+ MPL-1.0
+ MPL-1.0
+ Saxon
+ saxonB-8.8.zip
+ 8.8
+
+
+ SPDXRef-DoapSource
+
+ SHA1
+ 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
+
+ Copyright 2010, 2011 Source Auditor Inc.
+ Protecode Inc.
+ SPDX Technical Team Members
+ Open Logic Inc.
+ Source Auditor Inc.
+ Black Duck Software In.c
+ ./src/org/spdx/parser/DOAPProject.java
+ SOURCE
+ Apache-2.0
+ Apache-2.0
+
+
+ SPDXRef-CommonsLangSrc
+
+ SHA1
+ c2b4e1c67a2d28fced849ee1bb76e7391b93f125
+
+ This file is used by Jena
+ Copyright 2001-2011 The Apache Software Foundation
+ Apache Software Foundation
+ ./lib-source/commons-lang3-3.1-sources.jar
+ ARCHIVE
+ Apache-2.0
+ Apache-2.0
+ Apache Commons Lang
+Copyright 2001-2011 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+This product includes software from the Spring Framework,
+under the Apache License 2.0 (see: StringUtils.containsWhitespace())
+
+
+ SPDXRef-JenaLib
+
+ SHA1
+ 3ab4e1c67a2d28fced849ee1bb76e7391b93f125
+
+ This file belongs to Jena
+ (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
+ Apache Software Foundation
+ Hewlett Packard Inc.
+ ./lib-source/jena-2.6.3-sources.jar
+ ARCHIVE
+ This license is used by Jena
+ LicenseRef-1
+ LicenseRef-1
+
+
+ SPDXRef-Specification
+
+ SHA1
+ fff4e1c67a2d28fced849ee1bb76e7391b93f125
+
+ Specification Documentation
+ ./docs/myspec.pdf
+ DOCUMENTATION
+
+
+ SPDXRef-File
+
+ 2011-01-29T18:30:22Z
+ OTHER
+ Person: File Commenter
+ File level annotation
+
+
+ SHA1
+ d6a770ba38583ed4bb4525bd96e50461655d2758
+
+
+ MD5
+ 624c1abb3664f4b35547e7c73864ad24
+
+ The concluded license was taken from the package level that the file was included in.
+This information was found in the COPYING.txt file in the xyz directory.
+ Copyright 2008-2010 John Smith
+ The Regents of the University of California
+ Modified by Paul Mundt lethal@linux-sh.org
+ IBM Corporation
+ ./package/foo.c
+ SOURCE
+ The concluded license was taken from the package level that the file was included in.
+ (LGPL-2.0-only OR LicenseRef-2)
+ GPL-2.0-only
+ LicenseRef-2
+ Copyright (c) 2001 Aaron Lehmann aaroni@vitelus.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+ SPDXRef-Snippet
+ This snippet was identified as significant and highlighted in this Apache-2.0 file, when a commercial scanner identified it as being derived from file foo.c in package xyz which is licensed under GPL-2.0.
+ Copyright 2008-2010 John Smith
+ The concluded license was taken from package xyz, from which the snippet was copied into the current file. The concluded license information was found in the COPYING.txt file in package xyz.
+ GPL-2.0-only
+ GPL-2.0-only
+ from linux kernel
+
+
+ 420
+ SPDXRef-DoapSource
+
+
+ 310
+ SPDXRef-DoapSource
+
+
+
+
+ 23
+ SPDXRef-DoapSource
+
+
+ 5
+ SPDXRef-DoapSource
+
+
+ SPDXRef-DoapSource
+
+
+ SPDXRef-DOCUMENT
+ CONTAINS
+ SPDXRef-Package
+
+
+ SPDXRef-DOCUMENT
+ COPY_OF
+ DocumentRef-spdx-tool-1.2:SPDXRef-ToolsElement
+
+
+ SPDXRef-Package
+ DYNAMIC_LINK
+ SPDXRef-Saxon
+
+
+ SPDXRef-CommonsLangSrc
+ GENERATED_FROM
+ NOASSERTION
+
+
+ SPDXRef-JenaLib
+ CONTAINS
+ SPDXRef-Package
+
+
+ SPDXRef-Specification
+ SPECIFICATION_FOR
+ SPDXRef-fromDoap-0
+
+
+ SPDXRef-File
+ GENERATED_FROM
+ SPDXRef-fromDoap-0
+
+
diff --git a/tests/data/formats/SPDXYamlExample.yaml b/tests/data/formats/SPDXYAMLExample-v2.1.spdx.yaml
similarity index 95%
rename from tests/data/formats/SPDXYamlExample.yaml
rename to tests/data/formats/SPDXYAMLExample-v2.1.spdx.yaml
index e8a42c8de..9d1251082 100644
--- a/tests/data/formats/SPDXYamlExample.yaml
+++ b/tests/data/formats/SPDXYAMLExample-v2.1.spdx.yaml
@@ -21,7 +21,7 @@ Document:
- Package:
SPDXID: SPDXRef-Package
checksums:
- - algorithm: checksumAlgorithm_sha1
+ - algorithm: SHA1
checksumValue: 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
copyrightText: ' Copyright 2010, 2011 Source Auditor Inc.'
description: This utility translates and SPDX RDF XML document to a spreadsheet,
@@ -37,8 +37,10 @@ Document:
files:
- File:
checksums:
- - algorithm: checksumAlgorithm_sha1
- checksumValue: 3ab4e1c67a2d28fced849ee1bb76e7391b93f125
+ - algorithm: SHA1
+ checksumValue: 3ab4e1c67a2d28fced849ee1bb76e7391b93f125
+ - algorithm: SHA256
+ checksumValue: 3ab4e1c67a2d28fced849ee1bb76e7391b93f1250000000000000000
comment: This file belongs to Jena
copyrightText: (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
2008, 2009 Hewlett-Packard Development Company, LP
@@ -47,7 +49,8 @@ Document:
homePage: "http://www.openjena.org/"
projectUri: "http://subversion.apache.org/doap.rdf"
fileTypes:
- - fileType_archive
+ - ARCHIVE
+ - OTHER
SPDXID: SPDXRef-File1
licenseComments: This license is used by Jena
licenseConcluded: LicenseRef-1
@@ -57,11 +60,14 @@ Document:
sha1: 3ab4e1c67a2d28fced849ee1bb76e7391b93f125
- File:
checksums:
- - algorithm: checksumAlgorithm_sha1
- checksumValue: 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
+ - algorithm: SHA1
+ checksumValue: 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
+ - algorithm: SHA256
+ checksumValue: 2fd4e1c67a2d28fced849ee1bb76e7391b93eb120000000000000000
copyrightText: Copyright 2010, 2011 Source Auditor Inc.
fileTypes:
- - fileType_source
+ - SOURCE
+ - TEXT
SPDXID: SPDXRef-File2
licenseConcluded: Apache-2.0
licenseInfoFromFiles:
@@ -97,7 +103,7 @@ Document:
versionInfo: Version 0.9.2
externalDocumentRefs:
- checksum:
- algorithm: checksumAlgorithm_sha1
+ algorithm: SHA1
checksumValue: d6a770ba38583ed4bb4525bd96e50461655d2759
externalDocumentId: DocumentRef-spdx-tool-2.1
spdxDocument: https://spdx.org/spdxdocs/spdx-tools-v2.1-3F2504E0-4F89-41D3-9A0C-0305E82C3301
@@ -231,7 +237,7 @@ Document:
the snippet was copied into the current file. The concluded license information
was found in the COPYING.txt file in package xyz.
licenseConcluded: Apache-2.0
- licenseInfoFromSnippet:
+ licenseInfoInSnippet:
- Apache-2.0
name: from linux kernel
spdxVersion: SPDX-2.1
diff --git a/tests/data/formats/SPDXYAMLExample-v2.2.spdx.yaml b/tests/data/formats/SPDXYAMLExample-v2.2.spdx.yaml
new file mode 100644
index 000000000..99d56a928
--- /dev/null
+++ b/tests/data/formats/SPDXYAMLExample-v2.2.spdx.yaml
@@ -0,0 +1,385 @@
+---
+SPDXID: "SPDXRef-DOCUMENT"
+spdxVersion: "SPDX-2.2"
+creationInfo:
+ comment: "This package has been shipped in source and binary form.\nThe binaries\
+ \ were created with gcc 4.5.1 and expect to link to\ncompatible system run time\
+ \ libraries."
+ created: "2010-01-29T18:30:22Z"
+ creators:
+ - "Tool: LicenseFind-1.0"
+ - "Organization: ExampleCodeInspect ()"
+ - "Person: Jane Doe ()"
+ licenseListVersion: "3.9"
+name: "SPDX-Tools-v2.0"
+dataLicense: "CC0-1.0"
+comment: "This document was created using SPDX 2.0 using licenses from the web site."
+externalDocumentRefs:
+- externalDocumentId: "DocumentRef-spdx-tool-1.2"
+ checksum:
+ algorithm: "SHA1"
+ checksumValue: "d6a770ba38583ed4bb4525bd96e50461655d2759"
+ spdxDocument: "http://spdx.org/spdxdocs/spdx-tools-v1.2-3F2504E0-4F89-41D3-9A0C-0305E82C3301"
+hasExtractedLicensingInfos:
+- extractedText: "\"THE BEER-WARE LICENSE\" (Revision 42):\nphk@FreeBSD.ORG wrote\
+ \ this file. As long as you retain this notice you\ncan do whatever you want with\
+ \ this stuff. If we meet some day, and you think this stuff is worth it, you can\
+ \ buy me a beer in return Poul-Henning Kamp \nLicenseName: Beer-Ware License\
+ \ (Version 42)\nLicenseCrossReference: http://people.freebsd.org/~phk/\nLicenseComment:\
+ \ \nThe beerware license has a couple of other standard variants."
+ licenseId: "LicenseRef-Beerware-4.2"
+- extractedText: "/*\n * (c) Copyright 2009 University of Bristol\n * All rights reserved.\n\
+ \ *\n * Redistribution and use in source and binary forms, with or without\n *\
+ \ modification, are permitted provided that the following conditions\n * are met:\n\
+ \ * 1. Redistributions of source code must retain the above copyright\n * notice,\
+ \ this list of conditions and the following disclaimer.\n * 2. Redistributions\
+ \ in binary form must reproduce the above copyright\n * notice, this list of\
+ \ conditions and the following disclaimer in the\n * documentation and/or other\
+ \ materials provided with the distribution.\n * 3. The name of the author may\
+ \ not be used to endorse or promote products\n * derived from this software\
+ \ without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED\
+ \ BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING,\
+ \ BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS\
+ \ FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE\
+ \ LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\
+ \ DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\
+ \ OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\
+ \ CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\
+ \ OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE\
+ \ USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\
+ */"
+ licenseId: "LicenseRef-4"
+- comment: "This is tye CyperNeko License"
+ extractedText: "The CyberNeko Software License, Version 1.0\n\n \n(C) Copyright\
+ \ 2002-2005, Andy Clark. All rights reserved.\n \nRedistribution and use in source\
+ \ and binary forms, with or without\nmodification, are permitted provided that\
+ \ the following conditions\nare met:\n\n1. Redistributions of source code must\
+ \ retain the above copyright\n notice, this list of conditions and the following\
+ \ disclaimer. \n\n2. Redistributions in binary form must reproduce the above copyright\n\
+ \ notice, this list of conditions and the following disclaimer in\n the documentation\
+ \ and/or other materials provided with the\n distribution.\n\n3. The end-user\
+ \ documentation included with the redistribution,\n if any, must include the\
+ \ following acknowledgment: \n \"This product includes software developed\
+ \ by Andy Clark.\"\n Alternately, this acknowledgment may appear in the software\
+ \ itself,\n if and wherever such third-party acknowledgments normally appear.\n\
+ \n4. The names \"CyberNeko\" and \"NekoHTML\" must not be used to endorse\n \
+ \ or promote products derived from this software without prior \n written permission.\
+ \ For written permission, please contact \n andyc@cyberneko.net.\n\n5. Products\
+ \ derived from this software may not be called \"CyberNeko\",\n nor may \"CyberNeko\"\
+ \ appear in their name, without prior written\n permission of the author.\n\n\
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED\nWARRANTIES,\
+ \ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\nOF MERCHANTABILITY AND\
+ \ FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE AUTHOR\
+ \ OR OTHER CONTRIBUTORS\nBE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\
+ \ EXEMPLARY, \nOR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT\
+ \ \nOF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR \nBUSINESS\
+ \ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \nWHETHER IN CONTRACT,\
+ \ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE \nOR OTHERWISE) ARISING IN ANY\
+ \ WAY OUT OF THE USE OF THIS SOFTWARE, \nEVEN IF ADVISED OF THE POSSIBILITY OF\
+ \ SUCH DAMAGE."
+ licenseId: "LicenseRef-3"
+ name: "CyberNeko License"
+ seeAlsos:
+ - "http://people.apache.org/~andyc/neko/LICENSE"
+ - "http://justasample.url.com"
+- extractedText: "This package includes the GRDDL parser developed by Hewlett Packard\
+ \ under the following license:\n� Copyright 2007 Hewlett-Packard Development Company,\
+ \ LP\n\nRedistribution and use in source and binary forms, with or without modification,\
+ \ are permitted provided that the following conditions are met: \n\nRedistributions\
+ \ of source code must retain the above copyright notice, this list of conditions\
+ \ and the following disclaimer. \nRedistributions in binary form must reproduce\
+ \ the above copyright notice, this list of conditions and the following disclaimer\
+ \ in the documentation and/or other materials provided with the distribution.\
+ \ \nThe name of the author may not be used to endorse or promote products derived\
+ \ from this software without specific prior written permission. \nTHIS SOFTWARE\
+ \ IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,\
+ \ BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\
+ \ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE\
+ \ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\
+ \ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\
+ \ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\
+ \ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\
+ \ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\
+ \ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ licenseId: "LicenseRef-2"
+- extractedText: "/*\n * (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,\
+ \ 2008, 2009 Hewlett-Packard Development Company, LP\n * All rights reserved.\n\
+ \ *\n * Redistribution and use in source and binary forms, with or without\n *\
+ \ modification, are permitted provided that the following conditions\n * are met:\n\
+ \ * 1. Redistributions of source code must retain the above copyright\n * notice,\
+ \ this list of conditions and the following disclaimer.\n * 2. Redistributions\
+ \ in binary form must reproduce the above copyright\n * notice, this list of\
+ \ conditions and the following disclaimer in the\n * documentation and/or other\
+ \ materials provided with the distribution.\n * 3. The name of the author may\
+ \ not be used to endorse or promote products\n * derived from this software\
+ \ without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED\
+ \ BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING,\
+ \ BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS\
+ \ FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE\
+ \ LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\
+ \ DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\
+ \ OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\
+ \ CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\
+ \ OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE\
+ \ USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\
+ */"
+ licenseId: "LicenseRef-1"
+annotations:
+- annotationDate: "2011-03-13T00:00:00Z"
+ annotationType: "REVIEW"
+ annotator: "Person: Suzanne Reviewer"
+ comment: "Another example reviewer."
+- annotationDate: "2010-02-10T00:00:00Z"
+ annotationType: "REVIEW"
+ annotator: "Person: Joe Reviewer"
+ comment: "This is just an example. Some of the non-standard licenses look like\
+ \ they are actually BSD 3 clause licenses"
+- annotationDate: "2010-01-29T18:30:22Z"
+ annotationType: "OTHER"
+ annotator: "Person: Jane Doe ()"
+ comment: "Document level annotation"
+documentNamespace: "http://spdx.org/spdxdocs/spdx-example-yaml-2-2-444504E0-4F89-41D3-9A0C-0305E82C3301"
+documentDescribes:
+- "SPDXRef-Package"
+- "SPDXRef-File"
+packages:
+- SPDXID: "SPDXRef-Package"
+ annotations:
+ - annotationDate: "2011-01-29T18:30:22Z"
+ annotationType: "OTHER"
+ annotator: "Person: Package Commenter"
+ comment: "Package level annotation"
+ attributionTexts:
+ - "The GNU C Library is free software. See the file COPYING.LIB for copying conditions,\
+ \ and LICENSES for notices about a few contributions that require these additional\
+ \ notices to be distributed. License copyright years may be listed using range\
+ \ notation, e.g., 1996-2015, indicating that every year in the range, inclusive,\
+ \ is a copyrightable year that would otherwise be listed individually."
+ checksums:
+ - algorithm: "MD5"
+ checksumValue: "624c1abb3664f4b35547e7c73864ad24"
+ - algorithm: "SHA256"
+ checksumValue: "11b6d3ee554eedf79299905a98f9b9a04e498210b59f15094c916c91d150efcd"
+ - algorithm: "SHA1"
+ checksumValue: "85ed0817af83a24ad8da68c2b5094de69833983c"
+ copyrightText: "Copyright 2008-2010 John Smith"
+ description: "The GNU C Library defines functions that are specified by the ISO\
+ \ C standard, as well as additional features specific to POSIX and other derivatives\
+ \ of the Unix operating system, and extensions specific to GNU systems."
+ downloadLocation: "http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz"
+ externalRefs:
+ - comment: "This is the external ref for Acme"
+ referenceCategory: "OTHER"
+ referenceLocator: "acmecorp/acmenator/4.1.3-alpha"
+ referenceType: "http://spdx.org/spdxdocs/spdx-example-444504E0-4F89-41D3-9A0C-0305E82C3301#LocationRef-acmeforge"
+ - referenceCategory: "SECURITY"
+ referenceLocator: "cpe:2.3:a:pivotal_software:spring_framework:4.1.0:*:*:*:*:*:*:*"
+ referenceType: "http://spdx.org/rdf/references/cpe23Type"
+ filesAnalyzed: true
+ hasFiles:
+ - "SPDXRef-JenaLib"
+ - "SPDXRef-DoapSource"
+ - "SPDXRef-CommonsLangSrc"
+ homepage: "http://ftp.gnu.org/gnu/glibc"
+ licenseComments: "The license for this project changed with the release of version\
+ \ x.y. The version of the project included here post-dates the license change."
+ licenseConcluded: "(LGPL-2.0-only OR LicenseRef-3)"
+ licenseDeclared: "(LGPL-2.0-only AND LicenseRef-3)"
+ licenseInfoFromFiles:
+ - "GPL-2.0-only"
+ - "LicenseRef-2"
+ - "LicenseRef-1"
+ name: "glibc"
+ originator: "Organization: ExampleCodeInspect (contact@example.com)"
+ packageFileName: "glibc-2.11.1.tar.gz"
+ packageVerificationCode:
+ packageVerificationCodeExcludedFiles:
+ - "./package.spdx"
+ packageVerificationCodeValue: "d6a770ba38583ed4bb4525bd96e50461655d2758"
+ sourceInfo: "uses glibc-2_11-branch from git://sourceware.org/git/glibc.git."
+ summary: "GNU C library."
+ supplier: "Person: Jane Doe (jane.doe@example.com)"
+ versionInfo: "2.11.1"
+- SPDXID: "SPDXRef-fromDoap-1"
+ comment: "This package was converted from a DOAP Project by the same name"
+ copyrightText: "NOASSERTION"
+ downloadLocation: "NOASSERTION"
+ filesAnalyzed: false
+ homepage: "http://commons.apache.org/proper/commons-lang/"
+ licenseConcluded: "NOASSERTION"
+ licenseDeclared: "NOASSERTION"
+ name: "Apache Commons Lang"
+- SPDXID: "SPDXRef-fromDoap-0"
+ comment: "This package was converted from a DOAP Project by the same name"
+ copyrightText: "NOASSERTION"
+ downloadLocation: "NOASSERTION"
+ filesAnalyzed: false
+ homepage: "http://www.openjena.org/"
+ licenseConcluded: "NOASSERTION"
+ licenseDeclared: "NOASSERTION"
+ name: "Jena"
+- SPDXID: "SPDXRef-Saxon"
+ checksums:
+ - algorithm: "SHA1"
+ checksumValue: "85ed0817af83a24ad8da68c2b5094de69833983c"
+ copyrightText: "Copyright Saxonica Ltd"
+ description: "The Saxon package is a collection of tools for processing XML documents."
+ downloadLocation: "https://sourceforge.net/projects/saxon/files/Saxon-B/8.8.0.7/saxonb8-8-0-7j.zip/download"
+ filesAnalyzed: false
+ homepage: "http://saxon.sourceforge.net/"
+ licenseComments: "Other versions available for a commercial license"
+ licenseConcluded: "MPL-1.0"
+ licenseDeclared: "MPL-1.0"
+ name: "Saxon"
+ packageFileName: "saxonB-8.8.zip"
+ versionInfo: "8.8"
+files:
+- SPDXID: "SPDXRef-DoapSource"
+ checksums:
+ - algorithm: "SHA1"
+ checksumValue: "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12"
+ copyrightText: "Copyright 2010, 2011 Source Auditor Inc."
+ fileContributors:
+ - "Protecode Inc."
+ - "SPDX Technical Team Members"
+ - "Open Logic Inc."
+ - "Source Auditor Inc."
+ - "Black Duck Software In.c"
+ fileName: "./src/org/spdx/parser/DOAPProject.java"
+ fileTypes:
+ - "SOURCE"
+ licenseConcluded: "Apache-2.0"
+ licenseInfoInFiles:
+ - "Apache-2.0"
+- SPDXID: "SPDXRef-CommonsLangSrc"
+ checksums:
+ - algorithm: "SHA1"
+ checksumValue: "c2b4e1c67a2d28fced849ee1bb76e7391b93f125"
+ comment: "This file is used by Jena"
+ copyrightText: "Copyright 2001-2011 The Apache Software Foundation"
+ fileContributors:
+ - "Apache Software Foundation"
+ fileName: "./lib-source/commons-lang3-3.1-sources.jar"
+ fileTypes:
+ - "ARCHIVE"
+ licenseConcluded: "Apache-2.0"
+ licenseInfoInFiles:
+ - "Apache-2.0"
+ noticeText: "Apache Commons Lang\nCopyright 2001-2011 The Apache Software Foundation\n\
+ \nThis product includes software developed by\nThe Apache Software Foundation\
+ \ (http://www.apache.org/).\n\nThis product includes software from the Spring\
+ \ Framework,\nunder the Apache License 2.0 (see: StringUtils.containsWhitespace())"
+- SPDXID: "SPDXRef-JenaLib"
+ checksums:
+ - algorithm: "SHA1"
+ checksumValue: "3ab4e1c67a2d28fced849ee1bb76e7391b93f125"
+ comment: "This file belongs to Jena"
+ copyrightText: "(c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,\
+ \ 2009 Hewlett-Packard Development Company, LP"
+ fileContributors:
+ - "Apache Software Foundation"
+ - "Hewlett Packard Inc."
+ fileName: "./lib-source/jena-2.6.3-sources.jar"
+ fileTypes:
+ - "ARCHIVE"
+ licenseComments: "This license is used by Jena"
+ licenseConcluded: "LicenseRef-1"
+ licenseInfoInFiles:
+ - "LicenseRef-1"
+- SPDXID: "SPDXRef-File"
+ annotations:
+ - annotationDate: "2011-01-29T18:30:22Z"
+ annotationType: "OTHER"
+ annotator: "Person: File Commenter"
+ comment: "File level annotation"
+ checksums:
+ - algorithm: "MD5"
+ checksumValue: "624c1abb3664f4b35547e7c73864ad24"
+ - algorithm: "SHA1"
+ checksumValue: "d6a770ba38583ed4bb4525bd96e50461655d2758"
+ comment: "The concluded license was taken from the package level that the file was\
+ \ included in.\nThis information was found in the COPYING.txt file in the xyz\
+ \ directory."
+ copyrightText: "Copyright 2008-2010 John Smith"
+ fileContributors:
+ - "The Regents of the University of California"
+ - "Modified by Paul Mundt lethal@linux-sh.org"
+ - "IBM Corporation"
+ fileName: "./package/foo.c"
+ fileTypes:
+ - "SOURCE"
+ licenseComments: "The concluded license was taken from the package level that the\
+ \ file was included in."
+ licenseConcluded: "(LGPL-2.0-only OR LicenseRef-2)"
+ licenseInfoInFiles:
+ - "GPL-2.0-only"
+ - "LicenseRef-2"
+ noticeText: "Copyright (c) 2001 Aaron Lehmann aaroni@vitelus.com\n\nPermission is\
+ \ hereby granted, free of charge, to any person obtaining a copy of this software\
+ \ and associated documentation files (the �Software�), to deal in the Software\
+ \ without restriction, including without limitation the rights to use, copy, modify,\
+ \ merge, publish, distribute, sublicense, and/or sell copies of the Software,\
+ \ and to permit persons to whom the Software is furnished to do so, subject to\
+ \ the following conditions: \nThe above copyright notice and this permission notice\
+ \ shall be included in all copies or substantial portions of the Software.\n\n\
+ THE SOFTWARE IS PROVIDED �AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\
+ \ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR\
+ \ A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\
+ \ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\
+ \ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\
+ \ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
+snippets:
+- SPDXID: "SPDXRef-Snippet"
+ comment: "This snippet was identified as significant and highlighted in this Apache-2.0\
+ \ file, when a commercial scanner identified it as being derived from file foo.c\
+ \ in package xyz which is licensed under GPL-2.0."
+ copyrightText: "Copyright 2008-2010 John Smith"
+ licenseComments: "The concluded license was taken from package xyz, from which the\
+ \ snippet was copied into the current file. The concluded license information\
+ \ was found in the COPYING.txt file in package xyz."
+ licenseConcluded: "GPL-2.0-only"
+ licenseInfoInSnippets:
+ - "GPL-2.0-only"
+ name: "from linux kernel"
+ ranges:
+ - endPointer:
+ offset: 420
+ reference: "SPDXRef-DoapSource"
+ startPointer:
+ offset: 310
+ reference: "SPDXRef-DoapSource"
+ - endPointer:
+ lineNumber: 23
+ reference: "SPDXRef-DoapSource"
+ startPointer:
+ lineNumber: 5
+ reference: "SPDXRef-DoapSource"
+ snippetFromFile: "SPDXRef-DoapSource"
+relationships:
+- spdxElementId: "SPDXRef-DOCUMENT"
+ relatedSpdxElement: "DocumentRef-spdx-tool-1.2:SPDXRef-ToolsElement"
+ relationshipType: "COPY_OF"
+- spdxElementId: "SPDXRef-DOCUMENT"
+ relatedSpdxElement: "SPDXRef-Package"
+ relationshipType: "DESCRIBES"
+- spdxElementId: "SPDXRef-DOCUMENT"
+ relatedSpdxElement: "SPDXRef-Package"
+ relationshipType: "CONTAINS"
+- spdxElementId: "SPDXRef-DOCUMENT"
+ relatedSpdxElement: "SPDXRef-File"
+ relationshipType: "DESCRIBES"
+- spdxElementId: "SPDXRef-Package"
+ relatedSpdxElement: "SPDXRef-Saxon"
+ relationshipType: "DYNAMIC_LINK"
+- spdxElementId: "SPDXRef-Package"
+ relatedSpdxElement: "SPDXRef-JenaLib"
+ relationshipType: "CONTAINS"
+- spdxElementId: "SPDXRef-CommonsLangSrc"
+ relatedSpdxElement: "NOASSERTION"
+ relationshipType: "GENERATED_FROM"
+- spdxElementId: "SPDXRef-JenaLib"
+ relatedSpdxElement: "SPDXRef-Package"
+ relationshipType: "CONTAINS"
+- spdxElementId: "SPDXRef-File"
+ relatedSpdxElement: "SPDXRef-fromDoap-0"
+ relationshipType: "GENERATED_FROM"
diff --git a/tests/data/formats/SPDXYAMLExample-v2.3.spdx.yaml b/tests/data/formats/SPDXYAMLExample-v2.3.spdx.yaml
new file mode 100644
index 000000000..567970f24
--- /dev/null
+++ b/tests/data/formats/SPDXYAMLExample-v2.3.spdx.yaml
@@ -0,0 +1,407 @@
+---
+SPDXID: "SPDXRef-DOCUMENT"
+spdxVersion: "SPDX-2.3"
+creationInfo:
+ comment: "This package has been shipped in source and binary form.\nThe binaries\
+ \ were created with gcc 4.5.1 and expect to link to\ncompatible system run time\
+ \ libraries."
+ created: "2010-01-29T18:30:22Z"
+ creators:
+ - "Tool: LicenseFind-1.0"
+ - "Organization: ExampleCodeInspect ()"
+ - "Person: Jane Doe ()"
+ licenseListVersion: "3.17"
+name: "SPDX-Tools-v2.0"
+dataLicense: "CC0-1.0"
+comment: "This document was created using SPDX 2.0 using licenses from the web site."
+externalDocumentRefs:
+- externalDocumentId: "DocumentRef-spdx-tool-1.2"
+ checksum:
+ algorithm: "SHA1"
+ checksumValue: "d6a770ba38583ed4bb4525bd96e50461655d2759"
+ spdxDocument: "http://spdx.org/spdxdocs/spdx-tools-v1.2-3F2504E0-4F89-41D3-9A0C-0305E82C3301"
+hasExtractedLicensingInfos:
+- licenseId: "LicenseRef-1"
+ extractedText: "/*\n * (c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,\
+ \ 2008, 2009 Hewlett-Packard Development Company, LP\n * All rights reserved.\n\
+ \ *\n * Redistribution and use in source and binary forms, with or without\n *\
+ \ modification, are permitted provided that the following conditions\n * are met:\n\
+ \ * 1. Redistributions of source code must retain the above copyright\n * notice,\
+ \ this list of conditions and the following disclaimer.\n * 2. Redistributions\
+ \ in binary form must reproduce the above copyright\n * notice, this list of\
+ \ conditions and the following disclaimer in the\n * documentation and/or other\
+ \ materials provided with the distribution.\n * 3. The name of the author may\
+ \ not be used to endorse or promote products\n * derived from this software\
+ \ without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED\
+ \ BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING,\
+ \ BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS\
+ \ FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE\
+ \ LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\
+ \ DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\
+ \ OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\
+ \ CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\
+ \ OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE\
+ \ USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\
+ */"
+- licenseId: "LicenseRef-2"
+ extractedText: "This package includes the GRDDL parser developed by Hewlett Packard\
+ \ under the following license:\n© Copyright 2007 Hewlett-Packard Development Company,\
+ \ LP\n\nRedistribution and use in source and binary forms, with or without modification,\
+ \ are permitted provided that the following conditions are met: \n\nRedistributions\
+ \ of source code must retain the above copyright notice, this list of conditions\
+ \ and the following disclaimer. \nRedistributions in binary form must reproduce\
+ \ the above copyright notice, this list of conditions and the following disclaimer\
+ \ in the documentation and/or other materials provided with the distribution.\
+ \ \nThe name of the author may not be used to endorse or promote products derived\
+ \ from this software without specific prior written permission. \nTHIS SOFTWARE\
+ \ IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,\
+ \ BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\
+ \ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE\
+ \ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\
+ \ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\
+ \ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\
+ \ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\
+ \ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\
+ \ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+- licenseId: "LicenseRef-4"
+ extractedText: "/*\n * (c) Copyright 2009 University of Bristol\n * All rights reserved.\n\
+ \ *\n * Redistribution and use in source and binary forms, with or without\n *\
+ \ modification, are permitted provided that the following conditions\n * are met:\n\
+ \ * 1. Redistributions of source code must retain the above copyright\n * notice,\
+ \ this list of conditions and the following disclaimer.\n * 2. Redistributions\
+ \ in binary form must reproduce the above copyright\n * notice, this list of\
+ \ conditions and the following disclaimer in the\n * documentation and/or other\
+ \ materials provided with the distribution.\n * 3. The name of the author may\
+ \ not be used to endorse or promote products\n * derived from this software\
+ \ without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED\
+ \ BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING,\
+ \ BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS\
+ \ FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE\
+ \ LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\
+ \ DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\
+ \ OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\
+ \ CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\
+ \ OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE\
+ \ USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\
+ */"
+- licenseId: "LicenseRef-Beerware-4.2"
+ comment: "The beerware license has a couple of other standard variants."
+ extractedText: "\"THE BEER-WARE LICENSE\" (Revision 42):\nphk@FreeBSD.ORG wrote\
+ \ this file. As long as you retain this notice you\ncan do whatever you want with\
+ \ this stuff. If we meet some day, and you think this stuff is worth it, you can\
+ \ buy me a beer in return Poul-Henning Kamp"
+ name: "Beer-Ware License (Version 42)"
+ seeAlsos:
+ - "http://people.freebsd.org/~phk/"
+- licenseId: "LicenseRef-3"
+ comment: "This is tye CyperNeko License"
+ extractedText: "The CyberNeko Software License, Version 1.0\n\n \n(C) Copyright\
+ \ 2002-2005, Andy Clark. All rights reserved.\n \nRedistribution and use in source\
+ \ and binary forms, with or without\nmodification, are permitted provided that\
+ \ the following conditions\nare met:\n\n1. Redistributions of source code must\
+ \ retain the above copyright\n notice, this list of conditions and the following\
+ \ disclaimer. \n\n2. Redistributions in binary form must reproduce the above copyright\n\
+ \ notice, this list of conditions and the following disclaimer in\n the documentation\
+ \ and/or other materials provided with the\n distribution.\n\n3. The end-user\
+ \ documentation included with the redistribution,\n if any, must include the\
+ \ following acknowledgment: \n \"This product includes software developed\
+ \ by Andy Clark.\"\n Alternately, this acknowledgment may appear in the software\
+ \ itself,\n if and wherever such third-party acknowledgments normally appear.\n\
+ \n4. The names \"CyberNeko\" and \"NekoHTML\" must not be used to endorse\n \
+ \ or promote products derived from this software without prior \n written permission.\
+ \ For written permission, please contact \n andyc@cyberneko.net.\n\n5. Products\
+ \ derived from this software may not be called \"CyberNeko\",\n nor may \"CyberNeko\"\
+ \ appear in their name, without prior written\n permission of the author.\n\n\
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED\nWARRANTIES,\
+ \ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\nOF MERCHANTABILITY AND\
+ \ FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE AUTHOR\
+ \ OR OTHER CONTRIBUTORS\nBE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\
+ \ EXEMPLARY, \nOR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT\
+ \ \nOF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR \nBUSINESS\
+ \ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \nWHETHER IN CONTRACT,\
+ \ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE \nOR OTHERWISE) ARISING IN ANY\
+ \ WAY OUT OF THE USE OF THIS SOFTWARE, \nEVEN IF ADVISED OF THE POSSIBILITY OF\
+ \ SUCH DAMAGE."
+ name: "CyberNeko License"
+ seeAlsos:
+ - "http://people.apache.org/~andyc/neko/LICENSE"
+ - "http://justasample.url.com"
+annotations:
+- annotationDate: "2010-01-29T18:30:22Z"
+ annotationType: "OTHER"
+ annotator: "Person: Jane Doe ()"
+ comment: "Document level annotation"
+- annotationDate: "2010-02-10T00:00:00Z"
+ annotationType: "REVIEW"
+ annotator: "Person: Joe Reviewer"
+ comment: "This is just an example. Some of the non-standard licenses look like\
+ \ they are actually BSD 3 clause licenses"
+- annotationDate: "2011-03-13T00:00:00Z"
+ annotationType: "REVIEW"
+ annotator: "Person: Suzanne Reviewer"
+ comment: "Another example reviewer."
+documentDescribes:
+- "SPDXRef-File"
+- "SPDXRef-File"
+- "SPDXRef-Package"
+documentNamespace: "http://spdx.org/spdxdocs/spdx-example-yaml-2-3-444504E0-4F89-41D3-9A0C-0305E82C3301"
+packages:
+- SPDXID: "SPDXRef-Package"
+ annotations:
+ - annotationDate: "2011-01-29T18:30:22Z"
+ annotationType: "OTHER"
+ annotator: "Person: Package Commenter"
+ comment: "Package level annotation"
+ attributionTexts:
+ - "The GNU C Library is free software. See the file COPYING.LIB for copying conditions,\
+ \ and LICENSES for notices about a few contributions that require these additional\
+ \ notices to be distributed. License copyright years may be listed using range\
+ \ notation, e.g., 1996-2015, indicating that every year in the range, inclusive,\
+ \ is a copyrightable year that would otherwise be listed individually."
+ builtDate: "2011-01-29T18:30:22Z"
+ checksums:
+ - algorithm: "MD5"
+ checksumValue: "624c1abb3664f4b35547e7c73864ad24"
+ - algorithm: "SHA1"
+ checksumValue: "85ed0817af83a24ad8da68c2b5094de69833983c"
+ - algorithm: "SHA256"
+ checksumValue: "11b6d3ee554eedf79299905a98f9b9a04e498210b59f15094c916c91d150efcd"
+ - algorithm: "BLAKE2b-384"
+ checksumValue: "aaabd89c926ab525c242e6621f2f5fa73aa4afe3d9e24aed727faaadd6af38b620bdb623dd2b4788b1c8086984af8706"
+ copyrightText: "Copyright 2008-2010 John Smith"
+ description: "The GNU C Library defines functions that are specified by the ISO\
+ \ C standard, as well as additional features specific to POSIX and other derivatives\
+ \ of the Unix operating system, and extensions specific to GNU systems."
+ downloadLocation: "http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz"
+ externalRefs:
+ - referenceCategory: "SECURITY"
+ referenceLocator: "cpe:2.3:a:pivotal_software:spring_framework:4.1.0:*:*:*:*:*:*:*"
+ referenceType: "cpe23Type"
+ - comment: "This is the external ref for Acme"
+ referenceCategory: "OTHER"
+ referenceLocator: "acmecorp/acmenator/4.1.3-alpha"
+ referenceType: "http://spdx.org/spdxdocs/spdx-example-444504E0-4F89-41D3-9A0C-0305E82C3301#LocationRef-acmeforge"
+ filesAnalyzed: true
+ homepage: "http://ftp.gnu.org/gnu/glibc"
+ licenseComments: "The license for this project changed with the release of version\
+ \ x.y. The version of the project included here post-dates the license change."
+ licenseConcluded: "(LGPL-2.0-only OR LicenseRef-3)"
+ licenseDeclared: "(LGPL-2.0-only AND LicenseRef-3)"
+ licenseInfoFromFiles:
+ - "GPL-2.0-only"
+ - "LicenseRef-2"
+ - "LicenseRef-1"
+ name: "glibc"
+ originator: "Organization: ExampleCodeInspect (contact@example.com)"
+ packageFileName: "glibc-2.11.1.tar.gz"
+ packageVerificationCode:
+ packageVerificationCodeExcludedFiles:
+ - "./package.spdx"
+ packageVerificationCodeValue: "d6a770ba38583ed4bb4525bd96e50461655d2758"
+ primaryPackagePurpose: "SOURCE"
+ hasFiles:
+ - "SPDXRef-Specification"
+ - "SPDXRef-Specification"
+ - "SPDXRef-CommonsLangSrc"
+ - "SPDXRef-Specification"
+ - "SPDXRef-CommonsLangSrc"
+ - "SPDXRef-JenaLib"
+ - "SPDXRef-Specification"
+ - "SPDXRef-CommonsLangSrc"
+ - "SPDXRef-JenaLib"
+ - "SPDXRef-DoapSource"
+ - "SPDXRef-Specification"
+ - "SPDXRef-CommonsLangSrc"
+ - "SPDXRef-JenaLib"
+ - "SPDXRef-DoapSource"
+ releaseDate: "2012-01-29T18:30:22Z"
+ sourceInfo: "uses glibc-2_11-branch from git://sourceware.org/git/glibc.git."
+ summary: "GNU C library."
+ supplier: "Person: Jane Doe (jane.doe@example.com)"
+ validUntilDate: "2014-01-29T18:30:22Z"
+ versionInfo: "2.11.1"
+- SPDXID: "SPDXRef-fromDoap-1"
+ copyrightText: "NOASSERTION"
+ downloadLocation: "NOASSERTION"
+ filesAnalyzed: false
+ homepage: "http://commons.apache.org/proper/commons-lang/"
+ licenseConcluded: "NOASSERTION"
+ licenseDeclared: "NOASSERTION"
+ name: "Apache Commons Lang"
+- SPDXID: "SPDXRef-fromDoap-0"
+ downloadLocation: "https://search.maven.org/remotecontent?filepath=org/apache/jena/apache-jena/3.12.0/apache-jena-3.12.0.tar.gz"
+ externalRefs:
+ - referenceCategory: "PACKAGE-MANAGER"
+ referenceLocator: "pkg:maven/org.apache.jena/apache-jena@3.12.0"
+ referenceType: "http://spdx.org/spdxdocs/spdx-example-444504E0-4F89-41D3-9A0C-0305E82C3301#purl"
+ filesAnalyzed: false
+ homepage: "http://www.openjena.org/"
+ name: "Jena"
+ versionInfo: "3.12.0"
+- SPDXID: "SPDXRef-Saxon"
+ checksums:
+ - algorithm: "SHA1"
+ checksumValue: "85ed0817af83a24ad8da68c2b5094de69833983c"
+ copyrightText: "Copyright Saxonica Ltd"
+ description: "The Saxon package is a collection of tools for processing XML documents."
+ downloadLocation: "https://sourceforge.net/projects/saxon/files/Saxon-B/8.8.0.7/saxonb8-8-0-7j.zip/download"
+ filesAnalyzed: false
+ homepage: "http://saxon.sourceforge.net/"
+ licenseComments: "Other versions available for a commercial license"
+ licenseConcluded: "MPL-1.0"
+ licenseDeclared: "MPL-1.0"
+ name: "Saxon"
+ packageFileName: "saxonB-8.8.zip"
+ versionInfo: "8.8"
+files:
+- SPDXID: "SPDXRef-DoapSource"
+ checksums:
+ - algorithm: "SHA1"
+ checksumValue: "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12"
+ copyrightText: "Copyright 2010, 2011 Source Auditor Inc."
+ fileContributors:
+ - "Protecode Inc."
+ - "SPDX Technical Team Members"
+ - "Open Logic Inc."
+ - "Source Auditor Inc."
+ - "Black Duck Software In.c"
+ fileName: "./src/org/spdx/parser/DOAPProject.java"
+ fileTypes:
+ - "SOURCE"
+ licenseConcluded: "Apache-2.0"
+ licenseInfoInFiles:
+ - "Apache-2.0"
+- SPDXID: "SPDXRef-CommonsLangSrc"
+ checksums:
+ - algorithm: "SHA1"
+ checksumValue: "c2b4e1c67a2d28fced849ee1bb76e7391b93f125"
+ comment: "This file is used by Jena"
+ copyrightText: "Copyright 2001-2011 The Apache Software Foundation"
+ fileContributors:
+ - "Apache Software Foundation"
+ fileName: "./lib-source/commons-lang3-3.1-sources.jar"
+ fileTypes:
+ - "ARCHIVE"
+ licenseConcluded: "Apache-2.0"
+ licenseInfoInFiles:
+ - "Apache-2.0"
+ noticeText: "Apache Commons Lang\nCopyright 2001-2011 The Apache Software Foundation\n\
+ \nThis product includes software developed by\nThe Apache Software Foundation\
+ \ (http://www.apache.org/).\n\nThis product includes software from the Spring\
+ \ Framework,\nunder the Apache License 2.0 (see: StringUtils.containsWhitespace())"
+- SPDXID: "SPDXRef-JenaLib"
+ checksums:
+ - algorithm: "SHA1"
+ checksumValue: "3ab4e1c67a2d28fced849ee1bb76e7391b93f125"
+ comment: "This file belongs to Jena"
+ copyrightText: "(c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,\
+ \ 2009 Hewlett-Packard Development Company, LP"
+ fileContributors:
+ - "Apache Software Foundation"
+ - "Hewlett Packard Inc."
+ fileName: "./lib-source/jena-2.6.3-sources.jar"
+ fileTypes:
+ - "ARCHIVE"
+ licenseComments: "This license is used by Jena"
+ licenseConcluded: "LicenseRef-1"
+ licenseInfoInFiles:
+ - "LicenseRef-1"
+- SPDXID: "SPDXRef-Specification"
+ checksums:
+ - algorithm: "SHA1"
+ checksumValue: "fff4e1c67a2d28fced849ee1bb76e7391b93f125"
+ comment: "Specification Documentation"
+ fileName: "./docs/myspec.pdf"
+ fileTypes:
+ - "DOCUMENTATION"
+- SPDXID: "SPDXRef-File"
+ annotations:
+ - annotationDate: "2011-01-29T18:30:22Z"
+ annotationType: "OTHER"
+ annotator: "Person: File Commenter"
+ comment: "File level annotation"
+ checksums:
+ - algorithm: "SHA1"
+ checksumValue: "d6a770ba38583ed4bb4525bd96e50461655d2758"
+ - algorithm: "MD5"
+ checksumValue: "624c1abb3664f4b35547e7c73864ad24"
+ comment: "The concluded license was taken from the package level that the file was\
+ \ included in.\nThis information was found in the COPYING.txt file in the xyz\
+ \ directory."
+ copyrightText: "Copyright 2008-2010 John Smith"
+ fileContributors:
+ - "The Regents of the University of California"
+ - "Modified by Paul Mundt lethal@linux-sh.org"
+ - "IBM Corporation"
+ fileName: "./package/foo.c"
+ fileTypes:
+ - "SOURCE"
+ licenseComments: "The concluded license was taken from the package level that the\
+ \ file was included in."
+ licenseConcluded: "(LGPL-2.0-only OR LicenseRef-2)"
+ licenseInfoInFiles:
+ - "GPL-2.0-only"
+ - "LicenseRef-2"
+ noticeText: "Copyright (c) 2001 Aaron Lehmann aaroni@vitelus.com\n\nPermission is\
+ \ hereby granted, free of charge, to any person obtaining a copy of this software\
+ \ and associated documentation files (the \"Software\"), to deal in the Software\
+ \ without restriction, including without limitation the rights to use, copy, modify,\
+ \ merge, publish, distribute, sublicense, and/or sell copies of the Software,\
+ \ and to permit persons to whom the Software is furnished to do so, subject to\
+ \ the following conditions: \nThe above copyright notice and this permission notice\
+ \ shall be included in all copies or substantial portions of the Software.\n\n\
+ THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\
+ \ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR\
+ \ A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\
+ \ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\
+ \ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\
+ \ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
+snippets:
+- SPDXID: "SPDXRef-Snippet"
+ comment: "This snippet was identified as significant and highlighted in this Apache-2.0\
+ \ file, when a commercial scanner identified it as being derived from file foo.c\
+ \ in package xyz which is licensed under GPL-2.0."
+ copyrightText: "Copyright 2008-2010 John Smith"
+ licenseComments: "The concluded license was taken from package xyz, from which the\
+ \ snippet was copied into the current file. The concluded license information\
+ \ was found in the COPYING.txt file in package xyz."
+ licenseConcluded: "GPL-2.0-only"
+ licenseInfoInSnippets:
+ - "GPL-2.0-only"
+ name: "from linux kernel"
+ ranges:
+ - endPointer:
+ offset: 420
+ reference: "SPDXRef-DoapSource"
+ startPointer:
+ offset: 310
+ reference: "SPDXRef-DoapSource"
+ - endPointer:
+ lineNumber: 23
+ reference: "SPDXRef-DoapSource"
+ startPointer:
+ lineNumber: 5
+ reference: "SPDXRef-DoapSource"
+ snippetFromFile: "SPDXRef-DoapSource"
+relationships:
+- spdxElementId: "SPDXRef-DOCUMENT"
+ relationshipType: "CONTAINS"
+ relatedSpdxElement: "SPDXRef-Package"
+- spdxElementId: "SPDXRef-DOCUMENT"
+ relationshipType: "COPY_OF"
+ relatedSpdxElement: "DocumentRef-spdx-tool-1.2:SPDXRef-ToolsElement"
+- spdxElementId: "SPDXRef-Package"
+ relationshipType: "DYNAMIC_LINK"
+ relatedSpdxElement: "SPDXRef-Saxon"
+- spdxElementId: "SPDXRef-CommonsLangSrc"
+ relationshipType: "GENERATED_FROM"
+ relatedSpdxElement: "NOASSERTION"
+- spdxElementId: "SPDXRef-JenaLib"
+ relationshipType: "CONTAINS"
+ relatedSpdxElement: "SPDXRef-Package"
+- spdxElementId: "SPDXRef-Specification"
+ relationshipType: "SPECIFICATION_FOR"
+ relatedSpdxElement: "SPDXRef-fromDoap-0"
+- spdxElementId: "SPDXRef-File"
+ relationshipType: "GENERATED_FROM"
+ relatedSpdxElement: "SPDXRef-fromDoap-0"
diff --git a/tests/test_builder.py b/tests/test_builder.py
index 9a43deb56..da2a6b52c 100644
--- a/tests/test_builder.py
+++ b/tests/test_builder.py
@@ -609,7 +609,7 @@ def test_correct_pkg_ext_ref_category(self):
category = "SECURITY"
self.builder.create_package(self.document, "pkg")
self.builder.set_pkg_ext_ref_category(self.document, category)
- assert self.document.package.pkg_ext_refs[-1].category == category
+ assert self.document.package.external_references[-1].category == category
@testing_utils.raises(builders.SPDXValueError)
def test_incorrect_pkg_ext_ref_category(self):
@@ -622,7 +622,7 @@ def test_correct_pkg_ext_ref_type(self):
self.builder.create_package(self.document, "pkg")
self.builder.set_pkg_ext_ref_type(self.document, pkg_ext_ref_type)
assert (
- self.document.package.pkg_ext_refs[-1].pkg_ext_ref_type == pkg_ext_ref_type
+ self.document.package.external_references[-1].pkg_ext_ref_type == pkg_ext_ref_type
)
@testing_utils.raises(builders.SPDXValueError)
@@ -635,7 +635,7 @@ def test_correct_pkg_ext_ref_locator(self):
locator = "cpe:2.3:a:pivotal_software:spring_framework:4.1.0:*:*:*"
self.builder.create_package(self.document, "pkg")
self.builder.set_pkg_ext_ref_locator(self.document, locator)
- assert self.document.package.pkg_ext_refs[-1].locator == locator
+ assert self.document.package.external_references[-1].locator == locator
@testing_utils.raises(builders.OrderError)
def test_pkg_ext_ref_without_pkg(self):
@@ -648,7 +648,7 @@ def test_correct_pkg_ext_comment(self):
self.builder.create_package(self.document, "pkg")
self.builder.set_pkg_ext_ref_category(self.document, "SECURITY")
self.builder.add_pkg_ext_ref_comment(self.document, comment_text)
- assert self.document.package.pkg_ext_refs[-1].comment == comment_str
+ assert self.document.package.external_references[-1].comment == comment_str
@testing_utils.raises(builders.OrderError)
def test_pkg_ext_comment_without_pkg_ext_ref(self):
diff --git a/tests/test_conversion.py b/tests/test_conversion.py
index b39e5d472..b0a9c65ef 100644
--- a/tests/test_conversion.py
+++ b/tests/test_conversion.py
@@ -12,6 +12,7 @@
import codecs
import os
+import json
import tempfile
from unittest import TestCase
@@ -31,6 +32,15 @@
import spdx.writers.xml as xmlwriter
from tests import utils_test
+from tests.utils_test import TestParserUtils
+
+
+test_version = 'v2.3'
+test_json_file = 'formats/SPDXJSONExample-{}.spdx.json'.format(test_version)
+test_rdf_file = 'formats/SPDXRdfExample-{}.spdx.rdf'.format(test_version)
+test_tv_file = 'formats/SPDXTagExample-{}.spdx'.format(test_version)
+test_yaml_file = 'formats/SPDXYAMLExample-{}.spdx.yaml'.format(test_version)
+test_xml_file = 'formats/SPDXXMLExample-{}.spdx.xml'.format(test_version)
def get_temp_file(extension=''):
@@ -47,6 +57,16 @@ def get_temp_file(extension=''):
return os.path.join(temp_dir, file_name)
+def compare_spdx_documents(good, test):
+ good_dict = TestParserUtils.to_dict(good)
+ test_dict = TestParserUtils.to_dict(test)
+ # assert good_dict == test_dict
+ # I find it easier to compare this when presented as json
+ good_string = json.dumps(good_dict, indent=2, sort_keys=True)
+ test_string = json.dumps(test_dict, indent=2, sort_keys=True)
+ assert good_string == test_string
+
+
class TestConversions(TestCase):
maxDiff = None
@@ -112,151 +132,176 @@ def write_xml_file(self, document, file_name):
xmlwriter.write_document(document, out)
def test_tagvalue_rdf(self):
- doc = self.parse_tagvalue_file(utils_test.get_test_loc('formats/SPDXTagExample.tag'))
+ doc = self.parse_tagvalue_file(utils_test.get_test_loc(test_tv_file))
filename = get_temp_file('.rdf')
self.write_rdf_file(doc, filename)
- self.parse_rdf_file(filename)
+ new_doc = self.parse_rdf_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_json_rdf(self):
- doc = self.parse_json_file(utils_test.get_test_loc('formats/SPDXJsonExample.json'))
+ doc = self.parse_json_file(utils_test.get_test_loc(test_json_file))
filename = get_temp_file('.rdf')
self.write_rdf_file(doc, filename)
- self.parse_rdf_file(filename)
+ new_doc = self.parse_rdf_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_yaml_rdf(self):
- doc = self.parse_yaml_file(utils_test.get_test_loc('formats/SPDXYamlExample.yaml'))
+ doc = self.parse_yaml_file(utils_test.get_test_loc(test_yaml_file))
filename = get_temp_file('.rdf')
self.write_rdf_file(doc, filename)
- self.parse_rdf_file(filename)
+ new_doc = self.parse_rdf_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_xml_rdf(self):
- doc = self.parse_xml_file(utils_test.get_test_loc('formats/SPDXXmlExample.xml'))
+ doc = self.parse_xml_file(utils_test.get_test_loc(test_xml_file))
filename = get_temp_file('.rdf')
self.write_rdf_file(doc, filename)
- self.parse_rdf_file(filename)
+ new_doc = self.parse_rdf_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_rdf_rdf(self):
- doc = self.parse_rdf_file(utils_test.get_test_loc('formats/SPDXRdfExample.rdf'))
+ doc = self.parse_rdf_file(utils_test.get_test_loc(test_rdf_file))
filename = get_temp_file('.rdf')
self.write_rdf_file(doc, filename)
- self.parse_rdf_file(filename)
+ new_doc = self.parse_rdf_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_tagvalue_tagvalue(self):
- doc = self.parse_tagvalue_file(utils_test.get_test_loc('formats/SPDXTagExample.tag'))
+ doc = self.parse_tagvalue_file(utils_test.get_test_loc(test_tv_file))
filename = get_temp_file('.tag')
self.write_tagvalue_file(doc, filename)
- self.parse_tagvalue_file(filename)
+ new_doc = self.parse_tagvalue_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_rdf_tagvalue(self):
- doc = self.parse_rdf_file(utils_test.get_test_loc('formats/SPDXRdfExample.rdf'))
+ doc = self.parse_rdf_file(utils_test.get_test_loc(test_rdf_file))
filename = get_temp_file('.tag')
self.write_tagvalue_file(doc, filename)
- self.parse_tagvalue_file(filename)
+ new_doc = self.parse_tagvalue_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_json_tagvalue(self):
- doc = self.parse_json_file(utils_test.get_test_loc('formats/SPDXJsonExample.json'))
+ doc = self.parse_json_file(utils_test.get_test_loc(test_json_file))
filename = get_temp_file('.tag')
self.write_tagvalue_file(doc, filename)
- self.parse_tagvalue_file(filename)
+ new_doc = self.parse_tagvalue_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_yaml_tagvalue(self):
- doc = self.parse_yaml_file(utils_test.get_test_loc('formats/SPDXYamlExample.yaml'))
+ doc = self.parse_yaml_file(utils_test.get_test_loc(test_yaml_file))
filename = get_temp_file('.tag')
self.write_tagvalue_file(doc, filename)
- self.parse_tagvalue_file(filename)
+ new_doc = self.parse_tagvalue_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_xml_tagvalue(self):
- doc = self.parse_xml_file(utils_test.get_test_loc('formats/SPDXXmlExample.xml'))
+ doc = self.parse_xml_file(utils_test.get_test_loc(test_xml_file))
filename = get_temp_file('.tag')
self.write_tagvalue_file(doc, filename)
- self.parse_tagvalue_file(filename)
+ new_doc = self.parse_tagvalue_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_tagvalue_json(self):
- doc = self.parse_tagvalue_file(utils_test.get_test_loc('formats/SPDXTagExample.tag'))
+ doc = self.parse_tagvalue_file(utils_test.get_test_loc(test_tv_file))
filename = get_temp_file('.json')
self.write_json_file(doc, filename)
- self.parse_json_file(filename)
+ new_doc = self.parse_json_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_rdf_json(self):
- doc = self.parse_rdf_file(utils_test.get_test_loc('formats/SPDXRdfExample.rdf'))
+ doc = self.parse_rdf_file(utils_test.get_test_loc(test_rdf_file))
filename = get_temp_file('.json')
self.write_json_file(doc, filename)
- self.parse_json_file(filename)
+ new_doc = self.parse_json_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_yaml_json(self):
- doc = self.parse_yaml_file(utils_test.get_test_loc('formats/SPDXYamlExample.yaml'))
+ doc = self.parse_yaml_file(utils_test.get_test_loc(test_yaml_file))
filename = get_temp_file('.json')
self.write_json_file(doc, filename)
- self.parse_json_file(filename)
+ new_doc = self.parse_json_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_xml_json(self):
- doc = self.parse_xml_file(utils_test.get_test_loc('formats/SPDXXmlExample.xml'))
+ doc = self.parse_xml_file(utils_test.get_test_loc(test_xml_file))
filename = get_temp_file('.json')
self.write_json_file(doc, filename)
- self.parse_json_file(filename)
+ new_doc = self.parse_json_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_json_json(self):
- doc = self.parse_json_file(utils_test.get_test_loc('formats/SPDXJsonExample.json'))
+ doc = self.parse_json_file(utils_test.get_test_loc(test_json_file))
filename = get_temp_file('.json')
self.write_json_file(doc, filename)
- self.parse_json_file(filename)
+ new_doc = self.parse_json_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_tagvalue_yaml(self):
- doc = self.parse_tagvalue_file(utils_test.get_test_loc('formats/SPDXTagExample.tag'))
+ doc = self.parse_tagvalue_file(utils_test.get_test_loc(test_tv_file))
filename = get_temp_file('.yaml')
self.write_yaml_file(doc, filename)
- self.parse_yaml_file(filename)
+ new_doc = self.parse_yaml_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_rdf_yaml(self):
- doc = self.parse_rdf_file(utils_test.get_test_loc('formats/SPDXRdfExample.rdf'))
+ doc = self.parse_rdf_file(utils_test.get_test_loc(test_rdf_file))
filename = get_temp_file('.yaml')
self.write_yaml_file(doc, filename)
- self.parse_yaml_file(filename)
+ new_doc = self.parse_yaml_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_json_yaml(self):
- doc = self.parse_json_file(utils_test.get_test_loc('formats/SPDXJsonExample.json'))
+ doc = self.parse_json_file(utils_test.get_test_loc(test_json_file))
filename = get_temp_file('.yaml')
self.write_yaml_file(doc, filename)
- self.parse_yaml_file(filename)
+ new_doc = self.parse_yaml_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_xml_yaml(self):
- doc = self.parse_xml_file(utils_test.get_test_loc('formats/SPDXXmlExample.xml'))
+ doc = self.parse_xml_file(utils_test.get_test_loc(test_xml_file))
filename = get_temp_file('.yaml')
self.write_yaml_file(doc, filename)
- self.parse_yaml_file(filename)
+ new_doc = self.parse_yaml_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_yaml_yaml(self):
- doc = self.parse_yaml_file(utils_test.get_test_loc('formats/SPDXYamlExample.yaml'))
+ doc = self.parse_yaml_file(utils_test.get_test_loc(test_yaml_file))
filename = get_temp_file('.yaml')
self.write_yaml_file(doc, filename)
- self.parse_yaml_file(filename)
+ new_doc = self.parse_yaml_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_tagvalue_xml(self):
- doc = self.parse_tagvalue_file(utils_test.get_test_loc('formats/SPDXTagExample.tag'))
+ doc = self.parse_tagvalue_file(utils_test.get_test_loc(test_tv_file))
filename = get_temp_file('.xml')
self.write_xml_file(doc, filename)
- self.parse_xml_file(filename)
+ new_doc = self.parse_xml_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_rdf_xml(self):
- doc = self.parse_rdf_file(utils_test.get_test_loc('formats/SPDXRdfExample.rdf'))
+ doc = self.parse_rdf_file(utils_test.get_test_loc(test_rdf_file))
filename = get_temp_file('.xml')
self.write_xml_file(doc, filename)
- self.parse_xml_file(filename)
+ new_doc = self.parse_xml_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_json_xml(self):
- doc = self.parse_json_file(utils_test.get_test_loc('formats/SPDXJsonExample.json'))
+ doc = self.parse_json_file(utils_test.get_test_loc(test_json_file))
filename = get_temp_file('.xml')
self.write_xml_file(doc, filename)
- self.parse_xml_file(filename)
+ new_doc = self.parse_xml_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_yaml_xml(self):
- doc = self.parse_yaml_file(utils_test.get_test_loc('formats/SPDXYamlExample.yaml'))
+ doc = self.parse_yaml_file(utils_test.get_test_loc(test_yaml_file))
filename = get_temp_file('.xml')
self.write_xml_file(doc, filename)
- self.parse_xml_file(filename)
+ new_doc = self.parse_xml_file(filename)
+ compare_spdx_documents(doc, new_doc)
def test_xml_xml(self):
- doc = self.parse_xml_file(utils_test.get_test_loc('formats/SPDXXmlExample.xml'))
+ doc = self.parse_xml_file(utils_test.get_test_loc(test_xml_file))
filename = get_temp_file('.xml')
self.write_xml_file(doc, filename)
- self.parse_xml_file(filename)
+ new_doc = self.parse_xml_file(filename)
+ compare_spdx_documents(doc, new_doc)
diff --git a/tests/test_document.py b/tests/test_document.py
index 53adad6cd..1d1ce0d5e 100644
--- a/tests/test_document.py
+++ b/tests/test_document.py
@@ -19,7 +19,7 @@
from spdx.creationinfo import Tool
from spdx.document import Document, ExternalDocumentRef
from spdx.document import License
-from spdx.file import File
+from spdx.file import File, FileType
from spdx.package import Package
from spdx.parsers.loggers import ErrorMessages
from spdx.utils import NoAssert
@@ -74,10 +74,10 @@ def test_creation(self):
def test_document_validate_failures_returns_informative_messages(self):
doc = Document(Version(2, 1), License.from_identifier('CC0-1.0'),
- 'Sample_Document-V2.1', spdx_id='SPDXRef-DOCUMENT',
+ 'Sample_Document-V2.3', spdx_id='SPDXRef-DOCUMENT',
namespace='https://spdx.org/spdxdocs/spdx-example-444504E0-4F89-41D3-9A0C-0305E82C3301')
pack = doc.package = Package('some/path', NoAssert())
- pack.check_sum = 'SOME-SHA1'
+ pack.check_sum = Algorithm('SHA256', 'SOME-SHA256')
file1 = File('./some/path/tofile')
file1.name = './some/path/tofile'
file1.spdx_id = 'SPDXRef-File'
@@ -88,18 +88,16 @@ def test_document_validate_failures_returns_informative_messages(self):
messages = ErrorMessages()
messages = doc.validate(messages)
expected = [
- 'Sample_Document-V2.1: Creation info missing created date.',
- 'Sample_Document-V2.1: No creators defined, must have at least one.',
- 'Sample_Document-V2.1: some/path: Package checksum must be instance of '
- 'spdx.checksum.Algorithm',
- 'Sample_Document-V2.1: some/path: Package concluded license must be instance '
+ 'Sample_Document-V2.3: Creation info missing created date.',
+ 'Sample_Document-V2.3: No creators defined, must have at least one.',
+ 'Sample_Document-V2.3: some/path: At least one package checksum algorithm must be SHA1',
+ 'Sample_Document-V2.3: some/path: Package concluded license must be instance '
'of spdx.utils.SPDXNone or spdx.utils.NoAssert or spdx.document.License',
- 'Sample_Document-V2.1: some/path: Package cr_text can not be None.',
- 'Sample_Document-V2.1: some/path: Package declared license must be instance '
+ 'Sample_Document-V2.3: some/path: Package declared license must be instance '
'of spdx.utils.SPDXNone or spdx.utils.NoAssert or spdx.document.License',
- 'Sample_Document-V2.1: some/path: Package download_location can not be None.',
- 'Sample_Document-V2.1: some/path: Package must have at least one file.',
- 'Sample_Document-V2.1: some/path: Package verif_code can not be None.'
+ 'Sample_Document-V2.3: some/path: Package download_location can not be None.',
+ 'Sample_Document-V2.3: some/path: Package must have at least one has_file.',
+ 'Sample_Document-V2.3: some/path: Package verif_code can not be None.'
]
assert sorted(expected) == sorted(messages)
@@ -112,7 +110,8 @@ def test_document_is_valid_when_using_or_later_licenses(self):
package = doc.package = Package(name='some/path', download_location=NoAssert())
package.spdx_id = 'SPDXRef-Package'
- package.cr_text = 'Some copyrught'
+ package.cr_text = 'Some copyright'
+ package.set_checksum(Algorithm('SHA1', 'SOME-SHA1'))
package.verif_code = 'SOME code'
package.license_declared = NoAssert()
package.conc_lics = NoAssert()
@@ -120,7 +119,8 @@ def test_document_is_valid_when_using_or_later_licenses(self):
file1 = File('./some/path/tofile')
file1.name = './some/path/tofile'
file1.spdx_id = 'SPDXRef-File'
- file1.chk_sum = Algorithm('SHA1', 'SOME-SHA1')
+ file1.set_checksum(Algorithm('SHA1', 'SOME-SHA1'))
+ file1.file_types = [FileType.OTHER]
file1.conc_lics = NoAssert()
file1.copyright = NoAssert()
@@ -128,7 +128,8 @@ def test_document_is_valid_when_using_or_later_licenses(self):
file1.add_lics(lic1)
package.add_lics_from_file(lic1)
- package.add_file(file1)
+ package.has_files.append(file1.spdx_id)
+ doc.add_file(file1)
messages = ErrorMessages()
messages = doc.validate(messages)
assert not messages
@@ -142,7 +143,7 @@ def test_document_multiple_packages(self):
package1 = Package(name='some/path1', download_location=NoAssert())
package1.spdx_id = 'SPDXRef-Package1'
- package1.cr_text = 'Some copyrught'
+ package1.cr_text = 'Some copyright'
package1.files_verified = False
package1.license_declared = NoAssert()
package1.conc_lics = NoAssert()
@@ -150,7 +151,7 @@ def test_document_multiple_packages(self):
package2 = Package(name='some/path2', download_location=NoAssert())
package2.spdx_id = 'SPDXRef-Package2'
- package2.cr_text = 'Some copyrught'
+ package2.cr_text = 'Some copyright'
package2.files_verified = False
package2.license_declared = NoAssert()
package2.conc_lics = NoAssert()
@@ -171,18 +172,21 @@ def _get_lgpl_doc(self, or_later=False):
package = doc.package = Package(name='some/path', download_location=NoAssert())
package.spdx_id = 'SPDXRef-Package'
- package.cr_text = 'Some copyrught'
+ package.cr_text = 'Some copyright'
package.verif_code = 'SOME code'
- package.check_sum = Algorithm('SHA1', 'SOME-SHA1')
+ package.set_checksum(Algorithm('SHA1', 'SOME-SHA1'))
+ package.set_checksum(Algorithm('SHA256', 'SOME-SHA256'))
package.license_declared = NoAssert()
package.conc_lics = NoAssert()
file1 = File('./some/path/tofile')
file1.name = './some/path/tofile'
file1.spdx_id = 'SPDXRef-File'
- file1.chk_sum = Algorithm('SHA1', 'SOME-SHA1')
+ file1.set_checksum(Algorithm('SHA1', 'SOME-SHA1'))
+ file1.set_checksum(Algorithm('SHA256', 'SOME-SHA256'))
file1.conc_lics = NoAssert()
file1.copyright = NoAssert()
+ file1.file_types = [FileType.OTHER, FileType.SOURCE]
lic1 = License.from_identifier('LGPL-2.1-only')
if or_later:
@@ -190,8 +194,10 @@ def _get_lgpl_doc(self, or_later=False):
file1.add_lics(lic1)
+ package.has_files = [file1.spdx_id]
+
package.add_lics_from_file(lic1)
- package.add_file(file1)
+ doc.add_file(file1)
return doc
def test_write_document_rdf_with_validate(self):
@@ -314,6 +320,16 @@ def test_write_document_json_with_or_later_with_validate(self):
test_data_dir=utils_test.test_data_dir)
utils_test.check_json_scan(expected_file, result_file, regen=False)
+ if False:
+ from jsonschema import validate
+ import json
+
+ schema_file = utils_test.get_test_loc(
+ 'spdx-schema.json',
+ test_data_dir=utils_test.test_data_dir)
+
+ validate(json.load(open(result_file)), json.load(open(schema_file)))
+
finally:
if temp_dir and os.path.exists(temp_dir):
shutil.rmtree(temp_dir)
diff --git a/tests/test_jsonyamlxml_parser.py b/tests/test_jsonyamlxml_parser.py
index 4198b8eff..624c8b9ab 100644
--- a/tests/test_jsonyamlxml_parser.py
+++ b/tests/test_jsonyamlxml_parser.py
@@ -23,50 +23,45 @@
from tests.utils_test import TestParserUtils
-class TestParser(TestCase):
- maxDiff = None
+def check_document(document, expected_loc, regen=False):
+ result = TestParserUtils.to_dict(document)
+ result.pop('documentNamespace') # we do not compare this since it is supposed to be different for every doc.
- def check_document(self, document, expected_loc, regen=False):
- result = TestParserUtils.to_dict(document)
+ if regen:
+ with open(expected_loc, 'w') as o:
+ o.write(json.dumps(result, indent=2))
- if regen:
- with open(expected_loc, 'w') as o:
- o.write(json.dumps(result, indent=2))
+ with io.open(expected_loc, encoding='utf-8') as ex:
+ expected = json.load(ex, object_pairs_hook=OrderedDict)
+ expected.pop('documentNamespace') # not comparing namespace, it should be different.
+ expected_json = json.dumps(expected, sort_keys=True, indent=2)
+ result_json = json.dumps(result, sort_keys=True, indent=2)
+ assert result_json == expected_json
- with io.open(expected_loc, encoding='utf-8') as ex:
- expected = json.load(ex, object_pairs_hook=OrderedDict)
- assert result == expected
+class TestParser(TestCase):
+ maxDiff = None
def test_json_parser(self):
parser = jsonparser.Parser(Builder(), StandardLogger())
- test_file = utils_test.get_test_loc('formats/SPDXJsonExample.json')
+ test_file = utils_test.get_test_loc('formats/SPDXJSONExample-V2.3.spdx.json')
with io.open(test_file, encoding='utf-8') as f:
document, _ = parser.parse(f)
expected_loc = utils_test.get_test_loc('doc_parse/expected.json')
- self.check_document(document, expected_loc)
+ check_document(document, expected_loc)
def test_yaml_parser(self):
parser = yamlparser.Parser(Builder(), StandardLogger())
- test_file = utils_test.get_test_loc('formats/SPDXYamlExample.yaml')
+ test_file = utils_test.get_test_loc('formats/SPDXYAMLExample-v2.3.spdx.yaml')
with io.open(test_file, encoding='utf-8') as f:
document, _ = parser.parse(f)
expected_loc = utils_test.get_test_loc('doc_parse/expected.json')
- self.check_document(document, expected_loc)
+ check_document(document, expected_loc)
def test_xml_parser(self):
parser = xmlparser.Parser(Builder(), StandardLogger())
- test_file = utils_test.get_test_loc('formats/SPDXXmlExample.xml')
+ test_file = utils_test.get_test_loc('formats/SPDXXMLExample-v2.3.spdx.xml')
with io.open(test_file, encoding='utf-8') as f:
document, _ = parser.parse(f)
expected_loc = utils_test.get_test_loc('doc_parse/expected.json')
- self.check_document(document, expected_loc)
-
- def test_sbomyaml_parser(self):
- parser = yamlparser.Parser(Builder(), StandardLogger())
- test_file = utils_test.get_test_loc('formats/SPDXSBOMExample.spdx.yml')
- with io.open(test_file, encoding='utf-8') as f:
- document, errors = parser.parse(f)
- assert not errors
- expected_loc = utils_test.get_test_loc('doc_parse/SBOMexpected.json')
- self.check_document(document, expected_loc)
+ check_document(document, expected_loc)
diff --git a/tests/test_package.py b/tests/test_package.py
index c9076969e..91035c89f 100644
--- a/tests/test_package.py
+++ b/tests/test_package.py
@@ -13,21 +13,25 @@
from unittest import TestCase
from spdx.checksum import Algorithm
+from spdx.document import Document
from spdx.package import Package
class TestPackage(TestCase):
def test_calc_verif_code(self):
+ document = Document()
package = Package()
- package.calc_verif_code()
+ # this test needs some love. add files to document, add them as hasFiles to the pkg.
+ package.calc_verif_code(document)
def test_package_with_non_sha1_check_sum(self):
+ document = Document()
package = Package()
package.check_sum = Algorithm("SHA256", '')
-
# Make sure that validation still works despite the checksum not being SHA1
messages = []
+ # this test needs some love. add files to document, add them as hasFiles to the pkg.
messages = package.validate_checksum(messages)
diff --git a/tests/test_parse_anything.py b/tests/test_parse_anything.py
index 7692e5744..b4acd1c4b 100644
--- a/tests/test_parse_anything.py
+++ b/tests/test_parse_anything.py
@@ -18,6 +18,13 @@
dirname = os.path.join(os.path.dirname(__file__), "data", "formats")
test_files = [os.path.join(dirname, fn) for fn in os.listdir(dirname)]
+# narrow to only the v2.3 files.
+version = 'v2.3'
+version_files = []
+for test_file in test_files:
+ if version in test_file:
+ version_files.append(test_file)
+test_files = version_files
@pytest.mark.parametrize("test_file", test_files)
def test_parse_anything(test_file):
@@ -26,5 +33,10 @@ def test_parse_anything(test_file):
assert not error
# test a few fields, the core of the tests are per parser
- assert doc.name in ('Sample_Document-V2.1', 'xyz-0.1.0')
- assert doc.comment in (None, 'This is a sample spreadsheet', 'Sample Comment')
\ No newline at end of file
+ assert doc.name in ('SPDX-Tools-v2.0',
+ 'Sample_Document-V2.1', # OLD TODO remove?
+ 'xyz-0.1.0',) # OLD TODO remove?
+ assert doc.comment in (None,
+ 'This document was created using SPDX 2.0 using licenses from the web site.',
+ 'This is a sample spreadsheet', # OLD TODO remove?
+ 'Sample Comment',) # old TODO remove?
\ No newline at end of file
diff --git a/tests/test_rdf_parser.py b/tests/test_rdf_parser.py
index 8f52f58b7..3bd1672ff 100644
--- a/tests/test_rdf_parser.py
+++ b/tests/test_rdf_parser.py
@@ -27,7 +27,7 @@ class TestParser(unittest.TestCase):
def test_rdf_parser(self, regen=False):
parser = rdf.Parser(RDFBuilder(), StandardLogger())
- test_file = utils_test.get_test_loc('formats/SPDXRdfExample.rdf', test_data_dir=utils_test.test_data_dir)
+ test_file = utils_test.get_test_loc('formats/SPDXRdfExample-v2.1.spdx.rdf', test_data_dir=utils_test.test_data_dir)
with io.open(test_file, 'rb') as f:
document, _ = parser.parse(f)
expected_loc = utils_test.get_test_loc('doc_parse/spdx-expected.json', test_data_dir=utils_test.test_data_dir)
@@ -44,4 +44,6 @@ def check_document(self, document, expected_loc, regen=False):
with io.open(expected_loc, 'r', encoding='utf-8') as ex:
expected = json.load(ex)
- assert result == expected
+ expected_json = json.dumps(expected, sort_keys=True, indent=2)
+ result_json = json.dumps(result, sort_keys=True, indent=2)
+ assert result_json == expected_json
diff --git a/tests/test_tag_value_parser.py b/tests/test_tag_value_parser.py
index 54dde115e..8e595eb97 100644
--- a/tests/test_tag_value_parser.py
+++ b/tests/test_tag_value_parser.py
@@ -314,7 +314,12 @@ def test_file(self):
spdx_file = document.package.files[0]
assert spdx_file.name == 'testfile.java'
assert spdx_file.spdx_id == 'SPDXRef-File'
- assert spdx_file.type == spdx.file.FileType.SOURCE
+ found_source_file_type = False
+ for file_type in spdx_file.file_types:
+ if file_type == spdx.file.FileType.SOURCE:
+ found_source_file_type = True
+ break
+ assert found_source_file_type
assert len(spdx_file.artifact_of_project_name) == 1
assert len(spdx_file.artifact_of_project_home) == 1
assert len(spdx_file.artifact_of_project_uri) == 1
diff --git a/tests/test_write_anything.py b/tests/test_write_anything.py
index 9dceaffcb..cad2277e2 100644
--- a/tests/test_write_anything.py
+++ b/tests/test_write_anything.py
@@ -8,36 +8,53 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
+import json
import os
import pytest
from spdx.parsers import parse_anything
+from spdx.utils import UnKnown
from spdx.writers import write_anything
from tests import utils_test
+
dirname = os.path.join(os.path.dirname(__file__), "data", "formats")
test_files = [os.path.join(dirname, fn) for fn in os.listdir(dirname)]
+# narrow this list to the current version only.
+version = 'v2.3'
+version_files = []
+for test_file in test_files:
+ if version in test_file:
+ version_files.append(test_file)
+test_files = version_files
+
UNSTABLE_CONVERSIONS = {
- "SPDXTagExample.tag-rdf",
- "SPDXTagExample.tag-yaml",
- "SPDXTagExample.tag-xml",
- "SPDXTagExample.tag-json",
+ "SPDXTagExample-v2.3.spdx-rdf",
+ "SPDXTagExample-v2.3.spdx-yaml",
+ "SPDXTagExample-v2.3.spdx-xml",
+ "SPDXTagExample-v2.3.spdx-json",
"SPDXSimpleTag.tag-rdf",
- "SPDXXmlExample.xml-rdf",
- "SPDXXmlExample.xml-tag",
- "SPDXJsonExample.json-rdf",
- "SPDXJsonExample.json-tag",
- "SPDXYamlExample.yaml-rdf",
- "SPDXYamlExample.yaml-tag",
- "SPDXRdfExample.rdf-rdf",
- "SPDXRdfExample.rdf-yaml",
- "SPDXRdfExample.rdf-xml",
- "SPDXRdfExample.rdf-json",
- "SPDXRdfExample.rdf-tag"
+ "SPDXXMLExample-v2.3.spdx.xml-rdf",
+ "SPDXXMLExample-v2.3.spdx.xml-tag",
+ "SPDXJSONExample-V2.3.spdx.json-rdf",
+ "SPDXJSONExample-V2.3.spdx.json-tag",
+ "SPDXYAMLExample-v2.3.spdx.yaml-rdf",
+ "SPDXYAMLExample-v2.3.spdx.yaml-tag",
+ "SPDXRdfExample-v2.3.spdx.rdf-rdf",
+ "SPDXRdfExample-v2.3.spdx.rdf-yaml",
+ "SPDXRdfExample-v2.3.spdx.rdf-xml",
+ "SPDXRdfExample-v2.3.spdx.rdf-json",
+ "SPDXRdfExample-v2.3.spdx.rdf-tag",
}
+
+def handle_unserializable(obj):
+ if isinstance(obj, UnKnown):
+ return obj.to_value()
+ return obj
+
+
@pytest.mark.parametrize("out_format", ['rdf', 'yaml', 'xml', 'json', 'tag'])
@pytest.mark.parametrize("in_file", test_files, ids=lambda x: os.path.basename(x))
def test_write_anything(in_file, out_format, tmpdir):
@@ -48,20 +65,34 @@ def test_write_anything(in_file, out_format, tmpdir):
doc, error = parse_anything.parse_file(in_file)
assert not error
- result = utils_test.TestParserUtils.to_dict(doc)
+ expected_dict = utils_test.TestParserUtils.to_dict(doc)
out_fn = os.path.join(tmpdir, "test." + out_format)
write_anything.write_file(doc, out_fn)
doc2, error2 = parse_anything.parse_file(out_fn)
- result2 = utils_test.TestParserUtils.to_dict(doc2)
assert not error2
-
+
+ written_file_dict = utils_test.TestParserUtils.to_dict(doc2)
+
+ try:
+ expected_json = json.dumps(expected_dict, sort_keys=True, indent=2, default=handle_unserializable)
+ except TypeError:
+ expected_json = None
+ try:
+ written_file_json = json.dumps(written_file_dict, sort_keys=True, indent=2, default=handle_unserializable)
+ except TypeError:
+ written_file_json = None
+
+ assert written_file_json is not None
+
test = in_basename + "-" + out_format
if test not in UNSTABLE_CONVERSIONS:
- assert result==result2
+ if written_file_json != expected_json:
+ print('uhoh')
+ assert expected_json == written_file_json
else:
# if this test fails, this means we are more stable \o/
# in that case, please remove the test from UNSTABLE_CONVERSIONS list
- assert result2 != result, test
+ assert expected_json != written_file_json, test
diff --git a/tests/utils_test.py b/tests/utils_test.py
index 92840f108..27fc9c5ec 100644
--- a/tests/utils_test.py
+++ b/tests/utils_test.py
@@ -1,4 +1,3 @@
-
# Copyright (c) the SPDX tools authors
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -24,7 +23,9 @@
import spdx
from spdx import utils
-
+from spdx.parsers import xmlparser
+from spdx.parsers.jsonyamlxmlbuilders import Builder
+from spdx.parsers.loggers import StandardLogger
test_data_dir = os.path.join(os.path.dirname(__file__), 'data')
@@ -106,7 +107,10 @@ def sort_nested(data):
new_data = {}
for k, v in data.items():
if isinstance(v, list):
- v = sorted(v)
+ if isinstance(v[0], dict):
+ v = sorted(v, key=lambda x: json.dumps(x, sort_keys=True))
+ else:
+ v = sorted(v)
if isinstance(v, dict):
v = sort_nested(v)
new_data[k] = v
@@ -135,7 +139,10 @@ def check_rdf_scan(expected_file, result_file, regen=False):
else:
with io.open(expected_file, 'r', encoding='utf-8') as i:
expected = sort_nested(json.load(i))
- assert expected == result
+
+ expected_json = json.dumps(expected, sort_keys=True, indent=2)
+ result_json = json.dumps(result, sort_keys=True, indent=2)
+ assert result_json == expected_json
def load_and_clean_tv(location):
@@ -147,7 +154,7 @@ def load_and_clean_tv(location):
with io.open(location, encoding='utf-8') as l:
content = l.read()
content = [l for l in content.splitlines(False)
- if l and l.strip() and not l.startswith(('Creator: ', 'Created: ',))]
+ if l and l.strip() and not l.startswith(('Creator: ', 'Created: ',))]
return '\n'.join(content)
@@ -176,7 +183,7 @@ def load_and_clean_json(location):
data = json.loads(content)
if 'creationInfo' in data['Document']:
- del(data['Document']['creationInfo'])
+ del (data['Document']['creationInfo'])
return sort_nested(data)
@@ -206,7 +213,7 @@ def load_and_clean_yaml(location):
data = yaml.safe_load(content)
if 'creationInfo' in data['Document']:
- del(data['Document']['creationInfo'])
+ del (data['Document']['creationInfo'])
return sort_nested(data)
@@ -231,14 +238,19 @@ def load_and_clean_xml(location):
for comparison. The file content is cleaned from variable parts such as
dates, generated UUIDs and versions
"""
- with io.open(location, encoding='utf-8') as l:
- content = l.read()
- data = xmltodict.parse(content, encoding='utf-8')
- if 'creationInfo' in data['SpdxDocument']['Document']:
- del(data['SpdxDocument']['Document']['creationInfo'])
+ parser = xmlparser.Parser(Builder(), StandardLogger())
+ with io.open(location, encoding='utf-8') as f:
+ document, _ = parser.parse(f)
- return sort_nested(data)
+ data = {'SpdxDocument': {'Document': TestParserUtils.to_dict(document)}}
+
+ if 'created' in data['SpdxDocument']['Document']:
+ del (data['SpdxDocument']['Document']['created'])
+ if 'creators' in data['SpdxDocument']['Document']:
+ del (data['SpdxDocument']['Document']['creators'])
+
+ return data
def check_xml_scan(expected_file, result_file, regen=False):
@@ -252,7 +264,9 @@ def check_xml_scan(expected_file, result_file, regen=False):
o.write(result)
expected = load_and_clean_xml(expected_file)
- assert expected == result
+ expected_json = json.dumps(expected, sort_keys=True, indent=2)
+ result_json = json.dumps(result, sort_keys=True, indent=2)
+ assert result_json == expected_json
class TestParserUtils(object):
@@ -261,6 +275,17 @@ class TestParserUtils(object):
to be compared to expected data from a JSON file.
"""
+ @classmethod
+ def annotation_to_dict(cls, annotation):
+ annotation_dict = OrderedDict()
+ if annotation.spdx_id is not None:
+ annotation_dict['spdx_id'] = annotation.spdx_id
+ annotation_dict['annotation_date'] = annotation.annotation_date
+ annotation_dict['comment'] = annotation.comment
+ annotation_dict['annotation_type'] = annotation.annotation_type
+ annotation_dict['annotator'] = annotation.annotator
+ return annotation_dict
+
@classmethod
def license_to_dict(cls, license):
"""
@@ -269,7 +294,7 @@ def license_to_dict(cls, license):
"""
CONJ_SEP = re.compile(' AND | and ')
DISJ_SEP = re.compile(' OR | or ')
- if license is None:
+ if license is None or isinstance(license, spdx.utils.SPDXNone):
return None
license_dict = OrderedDict()
@@ -341,6 +366,11 @@ def package_to_dict(cls, package):
lics_from_files = []
if package.are_files_analyzed:
lics_from_files = sorted(package.licenses_from_files, key=lambda lic: lic.identifier)
+ chk_sums = []
+ algos = sorted(package.checksums.keys())
+ for algo in algos:
+ chk_sums.append(OrderedDict([('identifier', algo), ('value', package.checksums[algo])]))
+
return OrderedDict([
('id', package.spdx_id),
('name', package.name),
@@ -357,13 +387,18 @@ def package_to_dict(cls, package):
('licenseDeclared', cls.license_to_dict(package.license_declared)),
('copyrightText', package.cr_text),
('licenseComment', package.license_comment),
- ('checksum', cls.checksum_to_dict(package.check_sum)),
- ('files', cls.files_to_list(sorted(package.files))),
+ ('checksums', chk_sums),
+ ('hasFiles', sorted(package.has_files)),
('licenseInfoFromFiles', [cls.license_to_dict(lic) for lic in lics_from_files]),
+ ('annotations', [cls.annotation_to_dict(annotation) for annotation in package.annotations]),
+ ('primaryPurpose', package.primary_purpose),
+ ('builtDate', package.built_date),
+ ('releaseDate', package.release_date),
+ ('validUntilDate', package.valid_until_date),
('verificationCode', OrderedDict([
('value', package.verif_code),
('excludedFilesNames', sorted(package.verif_exc_files))])
- )
+ ),
])
@classmethod
@@ -375,23 +410,26 @@ def files_to_list(cls, files):
for file in files:
lics_from_files = sorted(file.licenses_in_file, key=lambda lic: lic.identifier)
- contributors = sorted(file.contributors, key=lambda c: c.name)
+ contributors = sorted(file.contributors)
+ chk_sums = []
+ algos = sorted(file.checksums.keys())
+ for algo in algos:
+ chk_sums.append(OrderedDict([('identifier', algo), ('value', file.checksums[algo])]))
+
file_dict = OrderedDict([
('id', file.spdx_id),
('name', file.name),
- ('type', file.type),
+ ('fileTypes', file.file_types),
('comment', file.comment),
('licenseConcluded', cls.license_to_dict(file.conc_lics)),
('copyrightText', file.copyright),
('licenseComment', file.license_comment),
('notice', file.notice),
- ('checksum', cls.checksum_to_dict(file.chk_sum)),
+ ('checksums', chk_sums),
('licenseInfoFromFiles', [cls.license_to_dict(lic) for lic in lics_from_files]),
- ('contributors', [cls.entity_to_dict(contributor) for contributor in contributors]),
+ ('contributors', contributors),
('dependencies', sorted(file.dependencies)),
- ('artifactOfProjectName', file.artifact_of_project_name),
- ('artifactOfProjectHome', file.artifact_of_project_home),
- ('artifactOfProjectURI', file.artifact_of_project_uri),
+ ('annotations', [cls.annotation_to_dict(annotation) for annotation in file.annotations])
])
files_list.append(file_dict)
@@ -427,7 +465,7 @@ def extracted_licenses_to_list(cls, extracted_licenses):
('identifier', extracted_license.identifier),
('text', extracted_license.text),
('comment', extracted_license.comment),
- ('cross_refs', sorted(extracted_license.cross_ref)),
+ ('seeAlsos', sorted(extracted_license.cross_ref)),
])
if extracted_license_dict not in extracted_licenses_list:
extracted_licenses_list.append(extracted_license_dict)
@@ -443,11 +481,11 @@ def annotations_to_list(cls, annotations):
for annotation in annotations:
annotation_dict = OrderedDict([
- ('id', annotation.spdx_id),
+ ('spdxid', annotation.spdx_id),
('comment', annotation.comment),
('type', annotation.annotation_type),
- ('annotator', cls.entity_to_dict(annotation.annotator)),
- ('date', utils.datetime_iso_format(annotation.annotation_date)),
+ ('annotator', annotation.annotator),
+ ('date', annotation.annotation_date),
])
annotations_list.append(annotation_dict)
@@ -465,11 +503,27 @@ def reviews_to_list(cls, reviews):
('comment', review.comment),
('reviewer', cls.entity_to_dict(review.reviewer)),
('date', utils.datetime_iso_format(review.review_date))
- ])
+ ])
reviews_list.append(review_dict)
return reviews_list
+ @classmethod
+ def range_to_dict(cls, ranje):
+ start_pointer_dict = OrderedDict()
+ start_pointer = ranje.get('startPointer')
+ for k in sorted(start_pointer.keys()):
+ start_pointer_dict[k] = start_pointer[k]
+ end_pointer_dict = OrderedDict()
+ end_pointer = ranje.get('endPointer')
+ for k in sorted(end_pointer.keys()):
+ end_pointer_dict[k] = end_pointer[k]
+ range_dict = OrderedDict([
+ ('startPointer', start_pointer_dict),
+ ('endPointer', end_pointer_dict),
+ ])
+ return range_dict
+
@classmethod
def snippets_to_list(cls, snippets):
"""
@@ -487,7 +541,8 @@ def snippets_to_list(cls, snippets):
('licenseComments', snippet.license_comment),
('fileId', snippet.snip_from_file_spdxid),
('licenseConcluded', cls.license_to_dict(snippet.conc_lics)),
- ('licenseInfoFromSnippet', [cls.license_to_dict(lic) for lic in lics_from_snippet]),
+ ('licenseInfoInSnippet', [cls.license_to_dict(lic) for lic in lics_from_snippet]),
+ ('ranges', [cls.range_to_dict(ranje) for ranje in snippet.ranges]),
])
snippets_list.append(snippet_dict)
@@ -508,9 +563,10 @@ def to_dict(cls, doc):
('dataLicense', cls.license_to_dict(doc.data_license)),
('licenseListVersion', cls.version_to_dict(doc.creation_info.license_list_version)),
('creators', [cls.entity_to_dict(creator) for creator in creators]),
- ('created', utils.datetime_iso_format(doc.creation_info.created)),
+ ('created', utils.datetime_iso_format(doc.creation_info.created or 'None')),
('creatorComment', doc.creation_info.comment),
('packages', [cls.package_to_dict(p) for p in doc.packages]),
+ ('files', cls.files_to_list(doc.files)),
('externalDocumentRefs', cls.ext_document_references_to_list(sorted(doc.ext_document_references))),
('extractedLicenses', cls.extracted_licenses_to_list(sorted(doc.extracted_licenses))),
('annotations', cls.annotations_to_list(sorted(doc.annotations))),