diff --git a/dependency-check-supress.xml b/dependency-check-supress.xml
index d483366..442d77a 100644
--- a/dependency-check-supress.xml
+++ b/dependency-check-supress.xml
@@ -1,34 +1,4 @@
-
-
- ^pkg:maven/com\.google\.guava/guava@.*$
- CVE-2020-8908
-
-
-
- ^pkg:maven/org\.apache\.poi/poi@.*$
- CVE-2022-26336
-
-
-
- ^pkg:maven/org\.apache\.poi/poi\-ooxml@.*$
- CVE-2022-26336
-
-
-
- ^pkg:maven/org\.apache\.poi/poi\-ooxml\-schemas@.*$
- CVE-2022-26336
-
+
\ No newline at end of file
diff --git a/examples/org/spdx/examples/ExistingSpdxDocument.java b/examples/org/spdx/examples/ExistingSpdxDocumentV2Compat.java
similarity index 78%
rename from examples/org/spdx/examples/ExistingSpdxDocument.java
rename to examples/org/spdx/examples/ExistingSpdxDocumentV2Compat.java
index 46e3ed1..2d0b245 100644
--- a/examples/org/spdx/examples/ExistingSpdxDocument.java
+++ b/examples/org/spdx/examples/ExistingSpdxDocumentV2Compat.java
@@ -10,23 +10,23 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.Collection;
-import java.util.Optional;
+import java.util.List;
+import java.util.stream.Collectors;
import org.spdx.jacksonstore.MultiFormatStore;
import org.spdx.jacksonstore.MultiFormatStore.Format;
-import org.spdx.library.InvalidSPDXAnalysisException;
+import org.spdx.core.InvalidSPDXAnalysisException;
import org.spdx.library.ModelCopyManager;
-import org.spdx.library.SpdxConstants;
-import org.spdx.library.model.ModelObject;
-import org.spdx.library.model.SpdxDocument;
-import org.spdx.library.model.SpdxElement;
-import org.spdx.library.model.SpdxModelFactory;
+import org.spdx.library.SpdxModelFactory;
+import org.spdx.library.model.v2.SpdxConstantsCompatV2;
+import org.spdx.library.model.v2.SpdxDocument;
+import org.spdx.library.model.v2.SpdxElement;
import org.spdx.storage.ISerializableModelStore;
import org.spdx.storage.simple.InMemSpdxStore;
/**
- * This example demonstrate opening an existing SPDX document and accessing it. The format
- * for this example is assumed to be JSON (e.g. the output of the SimpleSpdxDocument example).
+ * This example demonstrate opening an existing SPDX spec version 2.X document and accessing it. The format
+ * for this example is assumed to be JSON (e.g. the output of the SimpleSpdxDocumentV2Compat example).
* Different format can be used by using the associated store rather than the spdx-jackson store
* (e.g. spdx-spreadsheet-store, spdx-tagvalue-store, or the spdx-rdf-store).
*
@@ -35,7 +35,7 @@
* @author Gary O'Neall
*
*/
-public class ExistingSpdxDocument {
+public class ExistingSpdxDocumentV2Compat {
/**
* @param args args[0] is the file path containing the SPDX document
@@ -74,10 +74,10 @@ public static void main(String[] args) {
* license information over to the document model store
*/
ModelCopyManager copyManager = new ModelCopyManager();
- String documentUri = null;
// Let's deseralize the document
try (InputStream stream = new FileInputStream(inputFile)) {
- documentUri = modelStore.deSerialize(stream, false);
+ modelStore.deSerialize(stream, false);
+
} catch (FileNotFoundException e1) {
System.out.println("Input file does not exist: "+args[0]);
System.exit(1);
@@ -90,22 +90,20 @@ public static void main(String[] args) {
}
// Now that the document is deserialized, we can access it using the SpdxModelFactory
try {
- // To access the existing document, simply create the SPDX document passing in the
- // model store and document URI as parameters
- SpdxDocument document = new SpdxDocument(modelStore, documentUri, copyManager, false);
+ // To find all the SPDX documents in the model store, use the getObjects method from the
+ // SpdxModelFactory passing in the SpdxDocument type
+ // When using the factory method, we have to type cast the result
+ @SuppressWarnings("unchecked")
+ List allDocs = (List) SpdxModelFactory.getSpdxObjects(modelStore, copyManager,
+ SpdxConstantsCompatV2.CLASS_SPDX_DOCUMENT, null, null)
+ .collect(Collectors.toList());
+ SpdxDocument document = allDocs.get(0);
+ String documentUri = document.getDocumentUri();
+ // If you know the document URI, you can simply create an SPDX document using the followint constructor
+ SpdxDocument document2 = new SpdxDocument(modelStore, documentUri, copyManager, false);
// Note that all class objects in the Spdx Java Library follow the same pattern -
// to access any existing object in the store, simply create the object passing in
// the document URI, model store and the ID for the object
-
- // Another (more cumbersome) approach is to use the model factory
- Optional optionalDocument2 = SpdxModelFactory.getModelObject(modelStore, documentUri, SpdxConstants.SPDX_DOCUMENT_ID, copyManager);
- if (!optionalDocument2.isPresent()) {
- System.out.println("The SPDX document is not present in the model");
- // Note - this should never happen
- System.exit(1);
- }
- // When using the factory method, we have to type cast the result
- SpdxDocument document2 = (SpdxDocument)optionalDocument2.get();
// Since the 2 documents are just references to the same object, they will always be equivalent
if (!document.equivalent(document2)) {
System.out.println("Oops - these 2 documents should be the same");
diff --git a/examples/org/spdx/examples/SimpleSpdxDocument.java b/examples/org/spdx/examples/SimpleSpdxDocumentV2Compat.java
similarity index 87%
rename from examples/org/spdx/examples/SimpleSpdxDocument.java
rename to examples/org/spdx/examples/SimpleSpdxDocumentV2Compat.java
index ab08d17..07be22c 100644
--- a/examples/org/spdx/examples/SimpleSpdxDocument.java
+++ b/examples/org/spdx/examples/SimpleSpdxDocumentV2Compat.java
@@ -15,22 +15,21 @@
import org.spdx.jacksonstore.MultiFormatStore;
import org.spdx.jacksonstore.MultiFormatStore.Format;
-import org.spdx.library.InvalidSPDXAnalysisException;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.LicenseInfoFactory;
import org.spdx.library.ModelCopyManager;
-import org.spdx.library.SpdxConstants;
-import org.spdx.library.model.Relationship;
-import org.spdx.library.model.SpdxDocument;
-import org.spdx.library.model.SpdxModelFactory;
-import org.spdx.library.model.SpdxPackage;
-import org.spdx.library.model.enumerations.RelationshipType;
-import org.spdx.library.model.license.AnyLicenseInfo;
-import org.spdx.library.model.license.LicenseInfoFactory;
+import org.spdx.library.model.v2.Relationship;
+import org.spdx.library.model.v2.SpdxConstantsCompatV2;
+import org.spdx.library.model.v2.SpdxDocument;
+import org.spdx.library.model.v2.SpdxPackage;
+import org.spdx.library.model.v2.enumerations.RelationshipType;
+import org.spdx.library.model.v2.license.AnyLicenseInfo;
import org.spdx.storage.IModelStore.IdType;
import org.spdx.storage.ISerializableModelStore;
import org.spdx.storage.simple.InMemSpdxStore;
/**
- * This example demonstrate programmatically creating an SPDX document, adding document, files
+ * This example demonstrate programmatically creating an SPDX spec version 2.X document, adding document, files
* and saving the document in a JSON file format
*
* This example depends on the Spdx-Java-Library and the spdx-java-jackson store libraries
@@ -38,7 +37,7 @@
* @author Gary O'Neall
*
*/
-public class SimpleSpdxDocument {
+public class SimpleSpdxDocumentV2Compat {
/**
* @param args args[0] is the file path to store the resultant JSON file
@@ -83,9 +82,9 @@ public static void main(String[] args) {
ModelCopyManager copyManager = new ModelCopyManager();
try {
// Time to create the document
- SpdxDocument document = SpdxModelFactory.createSpdxDocument(modelStore, documentUri, copyManager);
+ SpdxDocument document = new SpdxDocument(modelStore, documentUri, copyManager, false);
// Let's add a few required fields to the document
- SimpleDateFormat dateFormat = new SimpleDateFormat(SpdxConstants.SPDX_DATE_FORMAT);
+ SimpleDateFormat dateFormat = new SimpleDateFormat(SpdxConstantsCompatV2.SPDX_DATE_FORMAT);
String creationDate = dateFormat.format(new Date());
document.setCreationInfo(document.createCreationInfo(
Arrays.asList(new String[] {"Tool: Simple SPDX Document Example"}),
@@ -96,7 +95,7 @@ public static void main(String[] args) {
* above. These helper functions will use the same Document URI, Model Store and Model Copy Manager
* as the document element.
*/
- AnyLicenseInfo dataLicense = LicenseInfoFactory.parseSPDXLicenseString("CC0-1.0");
+ AnyLicenseInfo dataLicense = LicenseInfoFactory.parseSPDXLicenseStringCompatV2("CC0-1.0");
/*
* Note that by passing in the modelStore and documentUri, the parsed license information is stored
* in the same model store we are using for the document
@@ -106,9 +105,9 @@ public static void main(String[] args) {
document.setSpecVersion("SPDX-2.2");
// Now that we have the basic document information filled in, let's create a package
- AnyLicenseInfo pkgConcludedLicense = LicenseInfoFactory.parseSPDXLicenseString("Apache-2.0 AND MIT");
- AnyLicenseInfo pkgDeclaredLicense = LicenseInfoFactory.parseSPDXLicenseString("Apache-2.0");
- String pkgId = modelStore.getNextId(IdType.SpdxId, documentUri);
+ AnyLicenseInfo pkgConcludedLicense = LicenseInfoFactory.parseSPDXLicenseStringCompatV2("Apache-2.0 AND MIT");
+ AnyLicenseInfo pkgDeclaredLicense = LicenseInfoFactory.parseSPDXLicenseStringCompatV2("Apache-2.0");
+ String pkgId = modelStore.getNextId(IdType.SpdxId);
// The ID's used for SPDX elements must be unique. Calling the model store getNextId function is a
// convenient and safe method to make sure you have a correctly formatted and unique ID
SpdxPackage pkg = document.createPackage(pkgId, "Example Package Name", pkgConcludedLicense,
@@ -128,7 +127,7 @@ public static void main(String[] args) {
// This step will add a relationship between document and pkg as "DESCRIBES".
document.getDocumentDescribes().add(pkg);
// Let's create another package
- pkgId = modelStore.getNextId(IdType.SpdxId, documentUri);
+ pkgId = modelStore.getNextId(IdType.SpdxId);
SpdxPackage childPkg = document.createPackage(pkgId, "Child Example Package Name", pkgConcludedLicense,
"Copyright example.org", pkgDeclaredLicense)
.setFilesAnalyzed(false) // Default is true and we don't want to add all the required fields
@@ -150,7 +149,7 @@ public static void main(String[] args) {
}
// Last step is to serialize
try (OutputStream outputStream = new FileOutputStream(outFile)) {
- modelStore.serialize(documentUri, outputStream);
+ modelStore.serialize(outputStream);
}
System.out.println("Example document written to "+args[0]);
System.exit(0);
diff --git a/pom.xml b/pom.xml
index 83c35af..4bd5f44 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
org.spdx
tools-java
- 1.1.9-SNAPSHOT
+ 2.0.0-SNAPSHOT
jar
tools-java
@@ -55,7 +55,7 @@
https://sonarcloud.io
spdx
tools-java
- 8.0.1
+ 8.4.3
11
-Xdoclint:none
@@ -101,6 +101,16 @@
+
+ commons-io
+ commons-io
+ 2.16.1
+
+
+ org.apache.commons
+ commons-compress
+ 1.27.1
+
junit
junit
@@ -110,17 +120,17 @@
org.spdx
java-spdx-library
- 1.1.10
+ 2.0.0-Alpha
org.spdx
spdx-rdf-store
- 1.1.9
+ 2.0.0-Alpha
org.spdx
spdx-jackson-store
- 1.1.9
+ 2.0.0-Alpha
org.apache.ws.xmlschema
@@ -130,24 +140,29 @@
org.spdx
spdx-spreadsheet-store
- 1.1.7
+ 2.0.0-Alpha
org.spdx
spdx-tagvalue-store
- 1.1.7
+ 2.0.0-Alpha
- com.github.java-json-tools
+ com.networknt
json-schema-validator
- 2.2.14
+ 1.5.1
org.slf4j
slf4j-simple
- 2.0.7
+ 2.0.13
true
+
+ org.spdx
+ spdx-v3jsonld-store
+ 0.1.0-Alpha
+
@@ -299,7 +314,7 @@
org.spdx
spdx-maven-plugin
- 0.7.2
+ 0.7.3
build-spdx
diff --git a/resources/spdx-schema-v3.0.0.json b/resources/spdx-schema-v3.0.0.json
new file mode 100644
index 0000000..bbc8794
--- /dev/null
+++ b/resources/spdx-schema-v3.0.0.json
@@ -0,0 +1,5892 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$comment": "This file was automatically generated by shacl2code. DO NOT MANUALLY MODIFY IT",
+ "type": "object",
+
+ "properties": {
+ "@context": {
+ "const": "https://spdx.org/rdf/3.0.0/spdx-context.jsonld"
+ }
+ },
+ "required": ["@context"],
+
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@graph": {
+ "description": "Top level container for JSON-LD objects",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "$ref": "#/$defs/AnyClass",
+ "unevaluatedProperties": false
+ }
+ }
+ },
+ "required": ["@graph"]
+ },
+ { "$ref": "#/$defs/AnyClass" }
+ ],
+ "unevaluatedProperties": false,
+
+ "$defs": {
+ "ai_EnergyConsumption": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "ai_EnergyConsumption" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ai_EnergyConsumption_props" }
+ ]
+ },
+ "ai_EnergyConsumption_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ai_EnergyConsumption" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ai_EnergyConsumption_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "ai_finetuningEnergyConsumption": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_EnergyConsumption_ai_finetuningEnergyConsumption"
+ }
+ }
+ ]
+ },
+ "ai_inferenceEnergyConsumption": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_EnergyConsumption_ai_inferenceEnergyConsumption"
+ }
+ }
+ ]
+ },
+ "ai_trainingEnergyConsumption": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_EnergyConsumption_ai_trainingEnergyConsumption"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "prop_ai_EnergyConsumption_ai_finetuningEnergyConsumption": {
+ "$ref": "#/$defs/ai_EnergyConsumptionDescription_derived"
+ },
+ "prop_ai_EnergyConsumption_ai_inferenceEnergyConsumption": {
+ "$ref": "#/$defs/ai_EnergyConsumptionDescription_derived"
+ },
+ "prop_ai_EnergyConsumption_ai_trainingEnergyConsumption": {
+ "$ref": "#/$defs/ai_EnergyConsumptionDescription_derived"
+ },
+ "ai_EnergyConsumptionDescription": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "ai_EnergyConsumptionDescription" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ai_EnergyConsumptionDescription_props" }
+ ]
+ },
+ "ai_EnergyConsumptionDescription_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ai_EnergyConsumptionDescription" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ai_EnergyConsumptionDescription_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "ai_energyQuantity": {
+ "$ref": "#/$defs/prop_ai_EnergyConsumptionDescription_ai_energyQuantity"
+ },
+ "ai_energyUnit": {
+ "$ref": "#/$defs/prop_ai_EnergyConsumptionDescription_ai_energyUnit"
+ }
+ },
+ "required": [
+ "ai_energyQuantity",
+ "ai_energyUnit"
+ ]
+ }
+ ]
+ },
+ "prop_ai_EnergyConsumptionDescription_ai_energyQuantity": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string",
+ "pattern": "^-?[0-9]+(\\.[0-9]*)?$"
+ }
+ ]
+ },
+ "prop_ai_EnergyConsumptionDescription_ai_energyUnit": {
+ "enum": [
+ "kilowattHour",
+ "megajoule",
+ "other"
+ ]
+ },
+ "ai_EnergyUnitType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "ai_EnergyUnitType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ai_EnergyUnitType_props" }
+ ]
+ },
+ "ai_EnergyUnitType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ai_EnergyUnitType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ai_EnergyUnitType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "ai_SafetyRiskAssessmentType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "ai_SafetyRiskAssessmentType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ai_SafetyRiskAssessmentType_props" }
+ ]
+ },
+ "ai_SafetyRiskAssessmentType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ai_SafetyRiskAssessmentType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ai_SafetyRiskAssessmentType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "AnnotationType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "AnnotationType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/AnnotationType_props" }
+ ]
+ },
+ "AnnotationType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/AnnotationType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "AnnotationType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "CreationInfo": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "CreationInfo" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/CreationInfo_props" }
+ ]
+ },
+ "CreationInfo_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/CreationInfo" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "CreationInfo_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "comment": {
+ "$ref": "#/$defs/prop_CreationInfo_comment"
+ },
+ "created": {
+ "$ref": "#/$defs/prop_CreationInfo_created"
+ },
+ "createdBy": {
+ "oneOf": [
+ {
+ "type": "array",
+ "minItems": 1,
+ "items": {
+ "$ref": "#/$defs/prop_CreationInfo_createdBy"
+ }
+ }
+ ]
+ },
+ "createdUsing": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_CreationInfo_createdUsing"
+ }
+ }
+ ]
+ },
+ "specVersion": {
+ "$ref": "#/$defs/prop_CreationInfo_specVersion"
+ }
+ },
+ "required": [
+ "created",
+ "createdBy",
+ "specVersion"
+ ]
+ }
+ ]
+ },
+ "prop_CreationInfo_comment": {
+ "type": "string"
+ },
+ "prop_CreationInfo_created": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_CreationInfo_createdBy": {
+ "$ref": "#/$defs/Agent_derived"
+ },
+ "prop_CreationInfo_createdUsing": {
+ "$ref": "#/$defs/Tool_derived"
+ },
+ "prop_CreationInfo_specVersion": {
+ "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
+ "type": "string"
+ },
+ "DictionaryEntry": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "DictionaryEntry" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/DictionaryEntry_props" }
+ ]
+ },
+ "DictionaryEntry_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/DictionaryEntry" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "DictionaryEntry_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "key": {
+ "$ref": "#/$defs/prop_DictionaryEntry_key"
+ },
+ "value": {
+ "$ref": "#/$defs/prop_DictionaryEntry_value"
+ }
+ },
+ "required": [
+ "key"
+ ]
+ }
+ ]
+ },
+ "prop_DictionaryEntry_key": {
+ "type": "string"
+ },
+ "prop_DictionaryEntry_value": {
+ "type": "string"
+ },
+ "Element": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "Element" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/Element_props" }
+ ]
+ },
+ "Element_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ai_AIPackage" },
+ { "$ref": "#/$defs/build_Build" },
+ { "$ref": "#/$defs/Agent" },
+ { "$ref": "#/$defs/Annotation" },
+ { "$ref": "#/$defs/Artifact" },
+ { "$ref": "#/$defs/Bom" },
+ { "$ref": "#/$defs/Bundle" },
+ { "$ref": "#/$defs/ElementCollection" },
+ { "$ref": "#/$defs/LifecycleScopedRelationship" },
+ { "$ref": "#/$defs/Organization" },
+ { "$ref": "#/$defs/Person" },
+ { "$ref": "#/$defs/Relationship" },
+ { "$ref": "#/$defs/SoftwareAgent" },
+ { "$ref": "#/$defs/SpdxDocument" },
+ { "$ref": "#/$defs/Tool" },
+ { "$ref": "#/$defs/dataset_DatasetPackage" },
+ { "$ref": "#/$defs/expandedlicensing_ConjunctiveLicenseSet" },
+ { "$ref": "#/$defs/expandedlicensing_CustomLicense" },
+ { "$ref": "#/$defs/expandedlicensing_CustomLicenseAddition" },
+ { "$ref": "#/$defs/expandedlicensing_DisjunctiveLicenseSet" },
+ { "$ref": "#/$defs/expandedlicensing_ExtendableLicense" },
+ { "$ref": "#/$defs/expandedlicensing_IndividualLicensingInfo" },
+ { "$ref": "#/$defs/expandedlicensing_License" },
+ { "$ref": "#/$defs/expandedlicensing_LicenseAddition" },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicense" },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicenseException" },
+ { "$ref": "#/$defs/expandedlicensing_OrLaterOperator" },
+ { "$ref": "#/$defs/expandedlicensing_WithAdditionOperator" },
+ { "$ref": "#/$defs/security_CvssV2VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_CvssV3VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_CvssV4VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_EpssVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_ExploitCatalogVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_SsvcVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexFixedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexNotAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexUnderInvestigationVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_Vulnerability" },
+ { "$ref": "#/$defs/simplelicensing_AnyLicenseInfo" },
+ { "$ref": "#/$defs/simplelicensing_LicenseExpression" },
+ { "$ref": "#/$defs/simplelicensing_SimpleLicensingText" },
+ { "$ref": "#/$defs/software_File" },
+ { "$ref": "#/$defs/software_Package" },
+ { "$ref": "#/$defs/software_Sbom" },
+ { "$ref": "#/$defs/software_Snippet" },
+ { "$ref": "#/$defs/software_SoftwareArtifact" },
+ { "$ref": "#/$defs/Element" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Element_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "comment": {
+ "$ref": "#/$defs/prop_Element_comment"
+ },
+ "creationInfo": {
+ "$ref": "#/$defs/prop_Element_creationInfo"
+ },
+ "description": {
+ "$ref": "#/$defs/prop_Element_description"
+ },
+ "extension": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_Element_extension"
+ }
+ }
+ ]
+ },
+ "externalIdentifier": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_Element_externalIdentifier"
+ }
+ }
+ ]
+ },
+ "externalRef": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_Element_externalRef"
+ }
+ }
+ ]
+ },
+ "name": {
+ "$ref": "#/$defs/prop_Element_name"
+ },
+ "summary": {
+ "$ref": "#/$defs/prop_Element_summary"
+ },
+ "verifiedUsing": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_Element_verifiedUsing"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "creationInfo"
+ ]
+ }
+ ]
+ },
+ "prop_Element_comment": {
+ "type": "string"
+ },
+ "prop_Element_creationInfo": {
+ "$ref": "#/$defs/CreationInfo_derived"
+ },
+ "prop_Element_description": {
+ "type": "string"
+ },
+ "prop_Element_extension": {
+ "$ref": "#/$defs/extension_Extension_derived"
+ },
+ "prop_Element_externalIdentifier": {
+ "$ref": "#/$defs/ExternalIdentifier_derived"
+ },
+ "prop_Element_externalRef": {
+ "$ref": "#/$defs/ExternalRef_derived"
+ },
+ "prop_Element_name": {
+ "type": "string"
+ },
+ "prop_Element_summary": {
+ "type": "string"
+ },
+ "prop_Element_verifiedUsing": {
+ "$ref": "#/$defs/IntegrityMethod_derived"
+ },
+ "ElementCollection": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "ElementCollection" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ElementCollection_props" }
+ ]
+ },
+ "ElementCollection_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/Bom" },
+ { "$ref": "#/$defs/Bundle" },
+ { "$ref": "#/$defs/SpdxDocument" },
+ { "$ref": "#/$defs/software_Sbom" },
+ { "$ref": "#/$defs/ElementCollection" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ElementCollection_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ "element": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ElementCollection_element"
+ }
+ }
+ ]
+ },
+ "profileConformance": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ElementCollection_profileConformance"
+ }
+ }
+ ]
+ },
+ "rootElement": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ElementCollection_rootElement"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "prop_ElementCollection_element": {
+ "$ref": "#/$defs/Element_derived"
+ },
+ "prop_ElementCollection_profileConformance": {
+ "enum": [
+ "core",
+ "software",
+ "simpleLicensing",
+ "expandedLicensing",
+ "security",
+ "build",
+ "ai",
+ "dataset",
+ "extension",
+ "lite"
+ ]
+ },
+ "prop_ElementCollection_rootElement": {
+ "$ref": "#/$defs/Element_derived"
+ },
+ "ExternalIdentifier": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "ExternalIdentifier" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ExternalIdentifier_props" }
+ ]
+ },
+ "ExternalIdentifier_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ExternalIdentifier" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ExternalIdentifier_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "comment": {
+ "$ref": "#/$defs/prop_ExternalIdentifier_comment"
+ },
+ "externalIdentifierType": {
+ "$ref": "#/$defs/prop_ExternalIdentifier_externalIdentifierType"
+ },
+ "identifier": {
+ "$ref": "#/$defs/prop_ExternalIdentifier_identifier"
+ },
+ "identifierLocator": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ExternalIdentifier_identifierLocator"
+ }
+ }
+ ]
+ },
+ "issuingAuthority": {
+ "$ref": "#/$defs/prop_ExternalIdentifier_issuingAuthority"
+ }
+ },
+ "required": [
+ "externalIdentifierType",
+ "identifier"
+ ]
+ }
+ ]
+ },
+ "prop_ExternalIdentifier_comment": {
+ "type": "string"
+ },
+ "prop_ExternalIdentifier_externalIdentifierType": {
+ "enum": [
+ "cpe22",
+ "cpe23",
+ "cve",
+ "email",
+ "gitoid",
+ "other",
+ "packageUrl",
+ "securityOther",
+ "swhid",
+ "swid",
+ "urlScheme"
+ ]
+ },
+ "prop_ExternalIdentifier_identifier": {
+ "type": "string"
+ },
+ "prop_ExternalIdentifier_identifierLocator": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_ExternalIdentifier_issuingAuthority": {
+ "type": "string"
+ },
+ "ExternalIdentifierType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "ExternalIdentifierType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ExternalIdentifierType_props" }
+ ]
+ },
+ "ExternalIdentifierType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ExternalIdentifierType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ExternalIdentifierType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "ExternalMap": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "ExternalMap" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ExternalMap_props" }
+ ]
+ },
+ "ExternalMap_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ExternalMap" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ExternalMap_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "definingArtifact": {
+ "$ref": "#/$defs/prop_ExternalMap_definingArtifact"
+ },
+ "externalSpdxId": {
+ "$ref": "#/$defs/prop_ExternalMap_externalSpdxId"
+ },
+ "locationHint": {
+ "$ref": "#/$defs/prop_ExternalMap_locationHint"
+ },
+ "verifiedUsing": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ExternalMap_verifiedUsing"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "externalSpdxId"
+ ]
+ }
+ ]
+ },
+ "prop_ExternalMap_definingArtifact": {
+ "$ref": "#/$defs/Artifact_derived"
+ },
+ "prop_ExternalMap_externalSpdxId": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_ExternalMap_locationHint": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_ExternalMap_verifiedUsing": {
+ "$ref": "#/$defs/IntegrityMethod_derived"
+ },
+ "ExternalRef": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "ExternalRef" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ExternalRef_props" }
+ ]
+ },
+ "ExternalRef_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ExternalRef" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ExternalRef_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "comment": {
+ "$ref": "#/$defs/prop_ExternalRef_comment"
+ },
+ "contentType": {
+ "$ref": "#/$defs/prop_ExternalRef_contentType"
+ },
+ "externalRefType": {
+ "$ref": "#/$defs/prop_ExternalRef_externalRefType"
+ },
+ "locator": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ExternalRef_locator"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "prop_ExternalRef_comment": {
+ "type": "string"
+ },
+ "prop_ExternalRef_contentType": {
+ "pattern": "^[^\\/]+\\/[^\\/]+$",
+ "type": "string"
+ },
+ "prop_ExternalRef_externalRefType": {
+ "enum": [
+ "altDownloadLocation",
+ "altWebPage",
+ "binaryArtifact",
+ "bower",
+ "buildMeta",
+ "buildSystem",
+ "chat",
+ "certificationReport",
+ "componentAnalysisReport",
+ "cwe",
+ "documentation",
+ "dynamicAnalysisReport",
+ "eolNotice",
+ "exportControlAssessment",
+ "funding",
+ "issueTracker",
+ "mailingList",
+ "mavenCentral",
+ "metrics",
+ "npm",
+ "nuget",
+ "license",
+ "other",
+ "privacyAssessment",
+ "productMetadata",
+ "purchaseOrder",
+ "qualityAssessmentReport",
+ "releaseNotes",
+ "releaseHistory",
+ "riskAssessment",
+ "runtimeAnalysisReport",
+ "secureSoftwareAttestation",
+ "securityAdvisory",
+ "securityAdversaryModel",
+ "securityFix",
+ "securityOther",
+ "securityPenTestReport",
+ "securityPolicy",
+ "securityThreatModel",
+ "socialMedia",
+ "sourceArtifact",
+ "staticAnalysisReport",
+ "support",
+ "vcs",
+ "vulnerabilityDisclosureReport",
+ "vulnerabilityExploitabilityAssessment"
+ ]
+ },
+ "prop_ExternalRef_locator": {
+ "type": "string"
+ },
+ "ExternalRefType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "ExternalRefType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ExternalRefType_props" }
+ ]
+ },
+ "ExternalRefType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ExternalRefType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ExternalRefType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "HashAlgorithm": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "HashAlgorithm" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/HashAlgorithm_props" }
+ ]
+ },
+ "HashAlgorithm_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/HashAlgorithm" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "HashAlgorithm_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "IntegrityMethod": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "IntegrityMethod" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/IntegrityMethod_props" }
+ ]
+ },
+ "IntegrityMethod_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/Hash" },
+ { "$ref": "#/$defs/PackageVerificationCode" },
+ { "$ref": "#/$defs/software_ContentIdentifier" },
+ { "$ref": "#/$defs/IntegrityMethod" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "IntegrityMethod_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "comment": {
+ "$ref": "#/$defs/prop_IntegrityMethod_comment"
+ }
+ }
+ }
+ ]
+ },
+ "prop_IntegrityMethod_comment": {
+ "type": "string"
+ },
+ "LifecycleScopeType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "LifecycleScopeType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/LifecycleScopeType_props" }
+ ]
+ },
+ "LifecycleScopeType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/LifecycleScopeType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "LifecycleScopeType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "NamespaceMap": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "NamespaceMap" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/NamespaceMap_props" }
+ ]
+ },
+ "NamespaceMap_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/NamespaceMap" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "NamespaceMap_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "namespace": {
+ "$ref": "#/$defs/prop_NamespaceMap_namespace"
+ },
+ "prefix": {
+ "$ref": "#/$defs/prop_NamespaceMap_prefix"
+ }
+ },
+ "required": [
+ "namespace",
+ "prefix"
+ ]
+ }
+ ]
+ },
+ "prop_NamespaceMap_namespace": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_NamespaceMap_prefix": {
+ "type": "string"
+ },
+ "PackageVerificationCode": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "PackageVerificationCode" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/PackageVerificationCode_props" }
+ ]
+ },
+ "PackageVerificationCode_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/PackageVerificationCode" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "PackageVerificationCode_props": {
+ "allOf": [
+ { "$ref": "#/$defs/IntegrityMethod_props" },
+ {
+ "type": "object",
+ "properties": {
+ "algorithm": {
+ "$ref": "#/$defs/prop_PackageVerificationCode_algorithm"
+ },
+ "hashValue": {
+ "$ref": "#/$defs/prop_PackageVerificationCode_hashValue"
+ },
+ "packageVerificationCodeExcludedFile": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_PackageVerificationCode_packageVerificationCodeExcludedFile"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "algorithm",
+ "hashValue"
+ ]
+ }
+ ]
+ },
+ "prop_PackageVerificationCode_algorithm": {
+ "enum": [
+ "blake2b256",
+ "blake2b384",
+ "blake2b512",
+ "blake3",
+ "crystalsKyber",
+ "crystalsDilithium",
+ "falcon",
+ "md2",
+ "md4",
+ "md5",
+ "md6",
+ "other",
+ "sha1",
+ "sha224",
+ "sha256",
+ "sha3_224",
+ "sha3_256",
+ "sha3_384",
+ "sha3_512",
+ "sha384",
+ "sha512"
+ ]
+ },
+ "prop_PackageVerificationCode_hashValue": {
+ "type": "string"
+ },
+ "prop_PackageVerificationCode_packageVerificationCodeExcludedFile": {
+ "type": "string"
+ },
+ "PositiveIntegerRange": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "PositiveIntegerRange" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/PositiveIntegerRange_props" }
+ ]
+ },
+ "PositiveIntegerRange_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/PositiveIntegerRange" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "PositiveIntegerRange_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "beginIntegerRange": {
+ "$ref": "#/$defs/prop_PositiveIntegerRange_beginIntegerRange"
+ },
+ "endIntegerRange": {
+ "$ref": "#/$defs/prop_PositiveIntegerRange_endIntegerRange"
+ }
+ },
+ "required": [
+ "beginIntegerRange",
+ "endIntegerRange"
+ ]
+ }
+ ]
+ },
+ "prop_PositiveIntegerRange_beginIntegerRange": {
+ "type": "integer",
+ "minimum": 1
+ },
+ "prop_PositiveIntegerRange_endIntegerRange": {
+ "type": "integer",
+ "minimum": 1
+ },
+ "PresenceType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "PresenceType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/PresenceType_props" }
+ ]
+ },
+ "PresenceType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/PresenceType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "PresenceType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "ProfileIdentifierType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "ProfileIdentifierType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ProfileIdentifierType_props" }
+ ]
+ },
+ "ProfileIdentifierType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ProfileIdentifierType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ProfileIdentifierType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "Relationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "Relationship" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/Relationship_props" }
+ ]
+ },
+ "Relationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/LifecycleScopedRelationship" },
+ { "$ref": "#/$defs/security_CvssV2VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_CvssV3VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_CvssV4VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_EpssVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_ExploitCatalogVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_SsvcVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexFixedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexNotAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexUnderInvestigationVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/Relationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Relationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ "completeness": {
+ "$ref": "#/$defs/prop_Relationship_completeness"
+ },
+ "endTime": {
+ "$ref": "#/$defs/prop_Relationship_endTime"
+ },
+ "from": {
+ "$ref": "#/$defs/prop_Relationship_from_"
+ },
+ "relationshipType": {
+ "$ref": "#/$defs/prop_Relationship_relationshipType"
+ },
+ "startTime": {
+ "$ref": "#/$defs/prop_Relationship_startTime"
+ },
+ "to": {
+ "oneOf": [
+ {
+ "type": "array",
+ "minItems": 1,
+ "items": {
+ "$ref": "#/$defs/prop_Relationship_to"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "from",
+ "relationshipType",
+ "to"
+ ]
+ }
+ ]
+ },
+ "prop_Relationship_completeness": {
+ "enum": [
+ "incomplete",
+ "complete",
+ "noAssertion"
+ ]
+ },
+ "prop_Relationship_endTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_Relationship_from_": {
+ "$ref": "#/$defs/Element_derived"
+ },
+ "prop_Relationship_relationshipType": {
+ "enum": [
+ "affects",
+ "amendedBy",
+ "ancestorOf",
+ "availableFrom",
+ "configures",
+ "contains",
+ "coordinatedBy",
+ "copiedTo",
+ "delegatedTo",
+ "dependsOn",
+ "descendantOf",
+ "describes",
+ "doesNotAffect",
+ "expandsTo",
+ "exploitCreatedBy",
+ "fixedBy",
+ "fixedIn",
+ "foundBy",
+ "generates",
+ "hasAddedFile",
+ "hasAssessmentFor",
+ "hasAssociatedVulnerability",
+ "hasConcludedLicense",
+ "hasDataFile",
+ "hasDeclaredLicense",
+ "hasDeletedFile",
+ "hasDependencyManifest",
+ "hasDistributionArtifact",
+ "hasDocumentation",
+ "hasDynamicLink",
+ "hasEvidence",
+ "hasExample",
+ "hasHost",
+ "hasInputs",
+ "hasMetadata",
+ "hasOptionalComponent",
+ "hasOptionalDependency",
+ "hasOutputs",
+ "hasPrerequsite",
+ "hasProvidedDependency",
+ "hasRequirement",
+ "hasSpecification",
+ "hasStaticLink",
+ "hasTest",
+ "hasTestCase",
+ "hasVariant",
+ "invokedBy",
+ "modifiedBy",
+ "other",
+ "packagedBy",
+ "patchedBy",
+ "publishedBy",
+ "reportedBy",
+ "republishedBy",
+ "serializedInArtifact",
+ "testedOn",
+ "trainedOn",
+ "underInvestigationFor",
+ "usesTool"
+ ]
+ },
+ "prop_Relationship_startTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_Relationship_to": {
+ "$ref": "#/$defs/Element_derived"
+ },
+ "RelationshipCompleteness": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "RelationshipCompleteness" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/RelationshipCompleteness_props" }
+ ]
+ },
+ "RelationshipCompleteness_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/RelationshipCompleteness" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "RelationshipCompleteness_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "RelationshipType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "RelationshipType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/RelationshipType_props" }
+ ]
+ },
+ "RelationshipType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/RelationshipType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "RelationshipType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "SpdxDocument": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "SpdxDocument" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/SpdxDocument_props" }
+ ]
+ },
+ "SpdxDocument_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/SpdxDocument" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "SpdxDocument_props": {
+ "allOf": [
+ { "$ref": "#/$defs/ElementCollection_props" },
+ {
+ "type": "object",
+ "properties": {
+ "dataLicense": {
+ "$ref": "#/$defs/prop_SpdxDocument_dataLicense"
+ },
+ "imports": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_SpdxDocument_imports"
+ }
+ }
+ ]
+ },
+ "namespaceMap": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_SpdxDocument_namespaceMap"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "prop_SpdxDocument_dataLicense": {
+ "$ref": "#/$defs/simplelicensing_AnyLicenseInfo_derived"
+ },
+ "prop_SpdxDocument_imports": {
+ "$ref": "#/$defs/ExternalMap_derived"
+ },
+ "prop_SpdxDocument_namespaceMap": {
+ "$ref": "#/$defs/NamespaceMap_derived"
+ },
+ "SupportType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "SupportType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/SupportType_props" }
+ ]
+ },
+ "SupportType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/SupportType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "SupportType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "Tool": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "Tool" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/Tool_props" }
+ ]
+ },
+ "Tool_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/Tool" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Tool_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "dataset_ConfidentialityLevelType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "dataset_ConfidentialityLevelType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/dataset_ConfidentialityLevelType_props" }
+ ]
+ },
+ "dataset_ConfidentialityLevelType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/dataset_ConfidentialityLevelType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "dataset_ConfidentialityLevelType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "dataset_DatasetAvailabilityType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "dataset_DatasetAvailabilityType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/dataset_DatasetAvailabilityType_props" }
+ ]
+ },
+ "dataset_DatasetAvailabilityType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/dataset_DatasetAvailabilityType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "dataset_DatasetAvailabilityType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "dataset_DatasetType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "dataset_DatasetType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/dataset_DatasetType_props" }
+ ]
+ },
+ "dataset_DatasetType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/dataset_DatasetType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "dataset_DatasetType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "expandedlicensing_LicenseAddition": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_LicenseAddition" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/expandedlicensing_LicenseAddition_props" }
+ ]
+ },
+ "expandedlicensing_LicenseAddition_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_CustomLicenseAddition" },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicenseException" },
+ { "$ref": "#/$defs/expandedlicensing_LicenseAddition" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_LicenseAddition_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ "expandedlicensing_additionText": {
+ "$ref": "#/$defs/prop_expandedlicensing_LicenseAddition_expandedlicensing_additionText"
+ },
+ "expandedlicensing_isDeprecatedAdditionId": {
+ "$ref": "#/$defs/prop_expandedlicensing_LicenseAddition_expandedlicensing_isDeprecatedAdditionId"
+ },
+ "expandedlicensing_licenseXml": {
+ "$ref": "#/$defs/prop_expandedlicensing_LicenseAddition_expandedlicensing_licenseXml"
+ },
+ "expandedlicensing_obsoletedBy": {
+ "$ref": "#/$defs/prop_expandedlicensing_LicenseAddition_expandedlicensing_obsoletedBy"
+ },
+ "expandedlicensing_seeAlso": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_expandedlicensing_LicenseAddition_expandedlicensing_seeAlso"
+ }
+ }
+ ]
+ },
+ "expandedlicensing_standardAdditionTemplate": {
+ "$ref": "#/$defs/prop_expandedlicensing_LicenseAddition_expandedlicensing_standardAdditionTemplate"
+ }
+ },
+ "required": [
+ "expandedlicensing_additionText"
+ ]
+ }
+ ]
+ },
+ "prop_expandedlicensing_LicenseAddition_expandedlicensing_additionText": {
+ "type": "string"
+ },
+ "prop_expandedlicensing_LicenseAddition_expandedlicensing_isDeprecatedAdditionId": {
+ "type": "boolean"
+ },
+ "prop_expandedlicensing_LicenseAddition_expandedlicensing_licenseXml": {
+ "type": "string"
+ },
+ "prop_expandedlicensing_LicenseAddition_expandedlicensing_obsoletedBy": {
+ "type": "string"
+ },
+ "prop_expandedlicensing_LicenseAddition_expandedlicensing_seeAlso": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_expandedlicensing_LicenseAddition_expandedlicensing_standardAdditionTemplate": {
+ "type": "string"
+ },
+ "expandedlicensing_ListedLicenseException": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_ListedLicenseException" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicenseException_props" }
+ ]
+ },
+ "expandedlicensing_ListedLicenseException_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_ListedLicenseException" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_ListedLicenseException_props": {
+ "allOf": [
+ { "$ref": "#/$defs/expandedlicensing_LicenseAddition_props" },
+ {
+ "type": "object",
+ "properties": {
+ "expandedlicensing_deprecatedVersion": {
+ "$ref": "#/$defs/prop_expandedlicensing_ListedLicenseException_expandedlicensing_deprecatedVersion"
+ },
+ "expandedlicensing_listVersionAdded": {
+ "$ref": "#/$defs/prop_expandedlicensing_ListedLicenseException_expandedlicensing_listVersionAdded"
+ }
+ }
+ }
+ ]
+ },
+ "prop_expandedlicensing_ListedLicenseException_expandedlicensing_deprecatedVersion": {
+ "type": "string"
+ },
+ "prop_expandedlicensing_ListedLicenseException_expandedlicensing_listVersionAdded": {
+ "type": "string"
+ },
+ "extension_CdxPropertyEntry": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "extension_CdxPropertyEntry" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/extension_CdxPropertyEntry_props" }
+ ]
+ },
+ "extension_CdxPropertyEntry_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/extension_CdxPropertyEntry" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "extension_CdxPropertyEntry_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "extension_cdxPropName": {
+ "$ref": "#/$defs/prop_extension_CdxPropertyEntry_extension_cdxPropName"
+ },
+ "extension_cdxPropValue": {
+ "$ref": "#/$defs/prop_extension_CdxPropertyEntry_extension_cdxPropValue"
+ }
+ },
+ "required": [
+ "extension_cdxPropName"
+ ]
+ }
+ ]
+ },
+ "prop_extension_CdxPropertyEntry_extension_cdxPropName": {
+ "type": "string"
+ },
+ "prop_extension_CdxPropertyEntry_extension_cdxPropValue": {
+ "type": "string"
+ },
+ "extension_Extension": {
+ "allOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": true,
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "$ref": "#/$defs/IRI" },
+ { "const": "extension_Extension" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/extension_Extension_props" }
+ ]
+ },
+ "extension_Extension_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "anyOf": [
+ { "$ref": "#/$defs/extension_CdxPropertiesExtension" },
+ { "$ref": "#/$defs/extension_Extension" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "extension_Extension_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "security_CvssSeverityType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_CvssSeverityType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_CvssSeverityType_props" }
+ ]
+ },
+ "security_CvssSeverityType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_CvssSeverityType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_CvssSeverityType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "security_ExploitCatalogType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_ExploitCatalogType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_ExploitCatalogType_props" }
+ ]
+ },
+ "security_ExploitCatalogType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_ExploitCatalogType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_ExploitCatalogType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "security_SsvcDecisionType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_SsvcDecisionType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_SsvcDecisionType_props" }
+ ]
+ },
+ "security_SsvcDecisionType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_SsvcDecisionType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_SsvcDecisionType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "security_VexJustificationType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_VexJustificationType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_VexJustificationType_props" }
+ ]
+ },
+ "security_VexJustificationType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_VexJustificationType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_VexJustificationType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "security_VulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_VulnAssessmentRelationship" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_VulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_CvssV2VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_CvssV3VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_CvssV4VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_EpssVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_ExploitCatalogVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_SsvcVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexFixedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexNotAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexUnderInvestigationVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_VulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Relationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "suppliedBy": {
+ "$ref": "#/$defs/prop_security_VulnAssessmentRelationship_suppliedBy"
+ },
+ "security_assessedElement": {
+ "$ref": "#/$defs/prop_security_VulnAssessmentRelationship_security_assessedElement"
+ },
+ "security_modifiedTime": {
+ "$ref": "#/$defs/prop_security_VulnAssessmentRelationship_security_modifiedTime"
+ },
+ "security_publishedTime": {
+ "$ref": "#/$defs/prop_security_VulnAssessmentRelationship_security_publishedTime"
+ },
+ "security_withdrawnTime": {
+ "$ref": "#/$defs/prop_security_VulnAssessmentRelationship_security_withdrawnTime"
+ }
+ }
+ }
+ ]
+ },
+ "prop_security_VulnAssessmentRelationship_suppliedBy": {
+ "$ref": "#/$defs/Agent_derived"
+ },
+ "prop_security_VulnAssessmentRelationship_security_assessedElement": {
+ "$ref": "#/$defs/Element_derived"
+ },
+ "prop_security_VulnAssessmentRelationship_security_modifiedTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_security_VulnAssessmentRelationship_security_publishedTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_security_VulnAssessmentRelationship_security_withdrawnTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "simplelicensing_AnyLicenseInfo": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "simplelicensing_AnyLicenseInfo" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/simplelicensing_AnyLicenseInfo_props" }
+ ]
+ },
+ "simplelicensing_AnyLicenseInfo_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_ConjunctiveLicenseSet" },
+ { "$ref": "#/$defs/expandedlicensing_CustomLicense" },
+ { "$ref": "#/$defs/expandedlicensing_DisjunctiveLicenseSet" },
+ { "$ref": "#/$defs/expandedlicensing_ExtendableLicense" },
+ { "$ref": "#/$defs/expandedlicensing_IndividualLicensingInfo" },
+ { "$ref": "#/$defs/expandedlicensing_License" },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicense" },
+ { "$ref": "#/$defs/expandedlicensing_OrLaterOperator" },
+ { "$ref": "#/$defs/expandedlicensing_WithAdditionOperator" },
+ { "$ref": "#/$defs/simplelicensing_LicenseExpression" },
+ { "$ref": "#/$defs/simplelicensing_AnyLicenseInfo" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "simplelicensing_AnyLicenseInfo_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "simplelicensing_LicenseExpression": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "simplelicensing_LicenseExpression" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/simplelicensing_LicenseExpression_props" }
+ ]
+ },
+ "simplelicensing_LicenseExpression_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/simplelicensing_LicenseExpression" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "simplelicensing_LicenseExpression_props": {
+ "allOf": [
+ { "$ref": "#/$defs/simplelicensing_AnyLicenseInfo_props" },
+ {
+ "type": "object",
+ "properties": {
+ "simplelicensing_customIdToUri": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_simplelicensing_LicenseExpression_simplelicensing_customIdToUri"
+ }
+ }
+ ]
+ },
+ "simplelicensing_licenseExpression": {
+ "$ref": "#/$defs/prop_simplelicensing_LicenseExpression_simplelicensing_licenseExpression"
+ },
+ "simplelicensing_licenseListVersion": {
+ "$ref": "#/$defs/prop_simplelicensing_LicenseExpression_simplelicensing_licenseListVersion"
+ }
+ },
+ "required": [
+ "simplelicensing_licenseExpression"
+ ]
+ }
+ ]
+ },
+ "prop_simplelicensing_LicenseExpression_simplelicensing_customIdToUri": {
+ "$ref": "#/$defs/DictionaryEntry_derived"
+ },
+ "prop_simplelicensing_LicenseExpression_simplelicensing_licenseExpression": {
+ "type": "string"
+ },
+ "prop_simplelicensing_LicenseExpression_simplelicensing_licenseListVersion": {
+ "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
+ "type": "string"
+ },
+ "simplelicensing_SimpleLicensingText": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "simplelicensing_SimpleLicensingText" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/simplelicensing_SimpleLicensingText_props" }
+ ]
+ },
+ "simplelicensing_SimpleLicensingText_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/simplelicensing_SimpleLicensingText" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "simplelicensing_SimpleLicensingText_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ "simplelicensing_licenseText": {
+ "$ref": "#/$defs/prop_simplelicensing_SimpleLicensingText_simplelicensing_licenseText"
+ }
+ },
+ "required": [
+ "simplelicensing_licenseText"
+ ]
+ }
+ ]
+ },
+ "prop_simplelicensing_SimpleLicensingText_simplelicensing_licenseText": {
+ "type": "string"
+ },
+ "software_ContentIdentifier": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "software_ContentIdentifier" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/software_ContentIdentifier_props" }
+ ]
+ },
+ "software_ContentIdentifier_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/software_ContentIdentifier" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_ContentIdentifier_props": {
+ "allOf": [
+ { "$ref": "#/$defs/IntegrityMethod_props" },
+ {
+ "type": "object",
+ "properties": {
+ "software_contentIdentifierType": {
+ "$ref": "#/$defs/prop_software_ContentIdentifier_software_contentIdentifierType"
+ },
+ "software_contentIdentifierValue": {
+ "$ref": "#/$defs/prop_software_ContentIdentifier_software_contentIdentifierValue"
+ }
+ },
+ "required": [
+ "software_contentIdentifierType",
+ "software_contentIdentifierValue"
+ ]
+ }
+ ]
+ },
+ "prop_software_ContentIdentifier_software_contentIdentifierType": {
+ "enum": [
+ "gitoid",
+ "swhid"
+ ]
+ },
+ "prop_software_ContentIdentifier_software_contentIdentifierValue": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "software_ContentIdentifierType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "software_ContentIdentifierType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/software_ContentIdentifierType_props" }
+ ]
+ },
+ "software_ContentIdentifierType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/software_ContentIdentifierType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_ContentIdentifierType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "software_FileKindType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "software_FileKindType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/software_FileKindType_props" }
+ ]
+ },
+ "software_FileKindType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/software_FileKindType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_FileKindType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "software_SbomType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "software_SbomType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/software_SbomType_props" }
+ ]
+ },
+ "software_SbomType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/software_SbomType" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_SbomType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "software_SoftwarePurpose": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "software_SoftwarePurpose" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/software_SoftwarePurpose_props" }
+ ]
+ },
+ "software_SoftwarePurpose_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/software_SoftwarePurpose" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_SoftwarePurpose_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "build_Build": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "build_Build" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/build_Build_props" }
+ ]
+ },
+ "build_Build_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/build_Build" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "build_Build_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ "build_buildEndTime": {
+ "$ref": "#/$defs/prop_build_Build_build_buildEndTime"
+ },
+ "build_buildId": {
+ "$ref": "#/$defs/prop_build_Build_build_buildId"
+ },
+ "build_buildStartTime": {
+ "$ref": "#/$defs/prop_build_Build_build_buildStartTime"
+ },
+ "build_buildType": {
+ "$ref": "#/$defs/prop_build_Build_build_buildType"
+ },
+ "build_configSourceDigest": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_build_Build_build_configSourceDigest"
+ }
+ }
+ ]
+ },
+ "build_configSourceEntrypoint": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_build_Build_build_configSourceEntrypoint"
+ }
+ }
+ ]
+ },
+ "build_configSourceUri": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_build_Build_build_configSourceUri"
+ }
+ }
+ ]
+ },
+ "build_environment": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_build_Build_build_environment"
+ }
+ }
+ ]
+ },
+ "build_parameters": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_build_Build_build_parameters"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "build_buildType"
+ ]
+ }
+ ]
+ },
+ "prop_build_Build_build_buildEndTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_build_Build_build_buildId": {
+ "type": "string"
+ },
+ "prop_build_Build_build_buildStartTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_build_Build_build_buildType": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_build_Build_build_configSourceDigest": {
+ "$ref": "#/$defs/Hash_derived"
+ },
+ "prop_build_Build_build_configSourceEntrypoint": {
+ "type": "string"
+ },
+ "prop_build_Build_build_configSourceUri": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_build_Build_build_environment": {
+ "$ref": "#/$defs/DictionaryEntry_derived"
+ },
+ "prop_build_Build_build_parameters": {
+ "$ref": "#/$defs/DictionaryEntry_derived"
+ },
+ "Agent": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "Agent" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/Agent_props" }
+ ]
+ },
+ "Agent_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/Organization" },
+ { "$ref": "#/$defs/Person" },
+ { "$ref": "#/$defs/SoftwareAgent" },
+ { "$ref": "#/$defs/Agent" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Agent_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "Annotation": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "Annotation" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/Annotation_props" }
+ ]
+ },
+ "Annotation_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/Annotation" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Annotation_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ "annotationType": {
+ "$ref": "#/$defs/prop_Annotation_annotationType"
+ },
+ "contentType": {
+ "$ref": "#/$defs/prop_Annotation_contentType"
+ },
+ "statement": {
+ "$ref": "#/$defs/prop_Annotation_statement"
+ },
+ "subject": {
+ "$ref": "#/$defs/prop_Annotation_subject"
+ }
+ },
+ "required": [
+ "annotationType",
+ "subject"
+ ]
+ }
+ ]
+ },
+ "prop_Annotation_annotationType": {
+ "enum": [
+ "other",
+ "review"
+ ]
+ },
+ "prop_Annotation_contentType": {
+ "pattern": "^[^\\/]+\\/[^\\/]+$",
+ "type": "string"
+ },
+ "prop_Annotation_statement": {
+ "type": "string"
+ },
+ "prop_Annotation_subject": {
+ "$ref": "#/$defs/Element_derived"
+ },
+ "Artifact": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "Artifact" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/Artifact_props" }
+ ]
+ },
+ "Artifact_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ai_AIPackage" },
+ { "$ref": "#/$defs/dataset_DatasetPackage" },
+ { "$ref": "#/$defs/security_Vulnerability" },
+ { "$ref": "#/$defs/software_File" },
+ { "$ref": "#/$defs/software_Package" },
+ { "$ref": "#/$defs/software_Snippet" },
+ { "$ref": "#/$defs/software_SoftwareArtifact" },
+ { "$ref": "#/$defs/Artifact" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Artifact_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ "builtTime": {
+ "$ref": "#/$defs/prop_Artifact_builtTime"
+ },
+ "originatedBy": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_Artifact_originatedBy"
+ }
+ }
+ ]
+ },
+ "releaseTime": {
+ "$ref": "#/$defs/prop_Artifact_releaseTime"
+ },
+ "standardName": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_Artifact_standardName"
+ }
+ }
+ ]
+ },
+ "suppliedBy": {
+ "$ref": "#/$defs/prop_Artifact_suppliedBy"
+ },
+ "supportLevel": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_Artifact_supportLevel"
+ }
+ }
+ ]
+ },
+ "validUntilTime": {
+ "$ref": "#/$defs/prop_Artifact_validUntilTime"
+ }
+ }
+ }
+ ]
+ },
+ "prop_Artifact_builtTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_Artifact_originatedBy": {
+ "$ref": "#/$defs/Agent_derived"
+ },
+ "prop_Artifact_releaseTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_Artifact_standardName": {
+ "type": "string"
+ },
+ "prop_Artifact_suppliedBy": {
+ "$ref": "#/$defs/Agent_derived"
+ },
+ "prop_Artifact_supportLevel": {
+ "enum": [
+ "development",
+ "support",
+ "deployed",
+ "limitedSupport",
+ "endOfSupport",
+ "noSupport",
+ "noAssertion"
+ ]
+ },
+ "prop_Artifact_validUntilTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "Bundle": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "Bundle" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/Bundle_props" }
+ ]
+ },
+ "Bundle_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/Bom" },
+ { "$ref": "#/$defs/software_Sbom" },
+ { "$ref": "#/$defs/Bundle" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Bundle_props": {
+ "allOf": [
+ { "$ref": "#/$defs/ElementCollection_props" },
+ {
+ "type": "object",
+ "properties": {
+ "context": {
+ "$ref": "#/$defs/prop_Bundle_context"
+ }
+ }
+ }
+ ]
+ },
+ "prop_Bundle_context": {
+ "type": "string"
+ },
+ "Hash": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "Hash" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/Hash_props" }
+ ]
+ },
+ "Hash_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/Hash" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Hash_props": {
+ "allOf": [
+ { "$ref": "#/$defs/IntegrityMethod_props" },
+ {
+ "type": "object",
+ "properties": {
+ "algorithm": {
+ "$ref": "#/$defs/prop_Hash_algorithm"
+ },
+ "hashValue": {
+ "$ref": "#/$defs/prop_Hash_hashValue"
+ }
+ },
+ "required": [
+ "algorithm",
+ "hashValue"
+ ]
+ }
+ ]
+ },
+ "prop_Hash_algorithm": {
+ "enum": [
+ "blake2b256",
+ "blake2b384",
+ "blake2b512",
+ "blake3",
+ "crystalsKyber",
+ "crystalsDilithium",
+ "falcon",
+ "md2",
+ "md4",
+ "md5",
+ "md6",
+ "other",
+ "sha1",
+ "sha224",
+ "sha256",
+ "sha3_224",
+ "sha3_256",
+ "sha3_384",
+ "sha3_512",
+ "sha384",
+ "sha512"
+ ]
+ },
+ "prop_Hash_hashValue": {
+ "type": "string"
+ },
+ "LifecycleScopedRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "LifecycleScopedRelationship" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/LifecycleScopedRelationship_props" }
+ ]
+ },
+ "LifecycleScopedRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/LifecycleScopedRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "LifecycleScopedRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Relationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "scope": {
+ "$ref": "#/$defs/prop_LifecycleScopedRelationship_scope"
+ }
+ }
+ }
+ ]
+ },
+ "prop_LifecycleScopedRelationship_scope": {
+ "enum": [
+ "design",
+ "development",
+ "build",
+ "test",
+ "runtime",
+ "other"
+ ]
+ },
+ "Organization": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "Organization" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/Organization_props" }
+ ]
+ },
+ "Organization_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/Organization" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Organization_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Agent_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "Person": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "Person" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/Person_props" }
+ ]
+ },
+ "Person_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/Person" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Person_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Agent_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "SoftwareAgent": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "SoftwareAgent" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/SoftwareAgent_props" }
+ ]
+ },
+ "SoftwareAgent_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/SoftwareAgent" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "SoftwareAgent_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Agent_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "expandedlicensing_ConjunctiveLicenseSet": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_ConjunctiveLicenseSet" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/expandedlicensing_ConjunctiveLicenseSet_props" }
+ ]
+ },
+ "expandedlicensing_ConjunctiveLicenseSet_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_ConjunctiveLicenseSet" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_ConjunctiveLicenseSet_props": {
+ "allOf": [
+ { "$ref": "#/$defs/simplelicensing_AnyLicenseInfo_props" },
+ {
+ "type": "object",
+ "properties": {
+ "expandedlicensing_member": {
+ "oneOf": [
+ {
+ "type": "array",
+ "minItems": 2,
+ "items": {
+ "$ref": "#/$defs/prop_expandedlicensing_ConjunctiveLicenseSet_expandedlicensing_member"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "expandedlicensing_member"
+ ]
+ }
+ ]
+ },
+ "prop_expandedlicensing_ConjunctiveLicenseSet_expandedlicensing_member": {
+ "$ref": "#/$defs/simplelicensing_AnyLicenseInfo_derived"
+ },
+ "expandedlicensing_CustomLicenseAddition": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_CustomLicenseAddition" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/expandedlicensing_CustomLicenseAddition_props" }
+ ]
+ },
+ "expandedlicensing_CustomLicenseAddition_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_CustomLicenseAddition" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_CustomLicenseAddition_props": {
+ "allOf": [
+ { "$ref": "#/$defs/expandedlicensing_LicenseAddition_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "expandedlicensing_DisjunctiveLicenseSet": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_DisjunctiveLicenseSet" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/expandedlicensing_DisjunctiveLicenseSet_props" }
+ ]
+ },
+ "expandedlicensing_DisjunctiveLicenseSet_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_DisjunctiveLicenseSet" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_DisjunctiveLicenseSet_props": {
+ "allOf": [
+ { "$ref": "#/$defs/simplelicensing_AnyLicenseInfo_props" },
+ {
+ "type": "object",
+ "properties": {
+ "expandedlicensing_member": {
+ "oneOf": [
+ {
+ "type": "array",
+ "minItems": 2,
+ "items": {
+ "$ref": "#/$defs/prop_expandedlicensing_DisjunctiveLicenseSet_expandedlicensing_member"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "expandedlicensing_member"
+ ]
+ }
+ ]
+ },
+ "prop_expandedlicensing_DisjunctiveLicenseSet_expandedlicensing_member": {
+ "$ref": "#/$defs/simplelicensing_AnyLicenseInfo_derived"
+ },
+ "expandedlicensing_ExtendableLicense": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_ExtendableLicense" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/expandedlicensing_ExtendableLicense_props" }
+ ]
+ },
+ "expandedlicensing_ExtendableLicense_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_CustomLicense" },
+ { "$ref": "#/$defs/expandedlicensing_License" },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicense" },
+ { "$ref": "#/$defs/expandedlicensing_OrLaterOperator" },
+ { "$ref": "#/$defs/expandedlicensing_ExtendableLicense" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_ExtendableLicense_props": {
+ "allOf": [
+ { "$ref": "#/$defs/simplelicensing_AnyLicenseInfo_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "expandedlicensing_IndividualLicensingInfo": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_IndividualLicensingInfo" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/expandedlicensing_IndividualLicensingInfo_props" }
+ ]
+ },
+ "expandedlicensing_IndividualLicensingInfo_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_IndividualLicensingInfo" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_IndividualLicensingInfo_props": {
+ "allOf": [
+ { "$ref": "#/$defs/simplelicensing_AnyLicenseInfo_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "expandedlicensing_License": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_License" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/expandedlicensing_License_props" }
+ ]
+ },
+ "expandedlicensing_License_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_CustomLicense" },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicense" },
+ { "$ref": "#/$defs/expandedlicensing_License" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_License_props": {
+ "allOf": [
+ { "$ref": "#/$defs/expandedlicensing_ExtendableLicense_props" },
+ {
+ "type": "object",
+ "properties": {
+ "expandedlicensing_isDeprecatedLicenseId": {
+ "$ref": "#/$defs/prop_expandedlicensing_License_expandedlicensing_isDeprecatedLicenseId"
+ },
+ "expandedlicensing_isFsfLibre": {
+ "$ref": "#/$defs/prop_expandedlicensing_License_expandedlicensing_isFsfLibre"
+ },
+ "expandedlicensing_isOsiApproved": {
+ "$ref": "#/$defs/prop_expandedlicensing_License_expandedlicensing_isOsiApproved"
+ },
+ "expandedlicensing_licenseXml": {
+ "$ref": "#/$defs/prop_expandedlicensing_License_expandedlicensing_licenseXml"
+ },
+ "expandedlicensing_obsoletedBy": {
+ "$ref": "#/$defs/prop_expandedlicensing_License_expandedlicensing_obsoletedBy"
+ },
+ "expandedlicensing_seeAlso": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_expandedlicensing_License_expandedlicensing_seeAlso"
+ }
+ }
+ ]
+ },
+ "expandedlicensing_standardLicenseHeader": {
+ "$ref": "#/$defs/prop_expandedlicensing_License_expandedlicensing_standardLicenseHeader"
+ },
+ "expandedlicensing_standardLicenseTemplate": {
+ "$ref": "#/$defs/prop_expandedlicensing_License_expandedlicensing_standardLicenseTemplate"
+ },
+ "simplelicensing_licenseText": {
+ "$ref": "#/$defs/prop_expandedlicensing_License_simplelicensing_licenseText"
+ }
+ },
+ "required": [
+ "simplelicensing_licenseText"
+ ]
+ }
+ ]
+ },
+ "prop_expandedlicensing_License_expandedlicensing_isDeprecatedLicenseId": {
+ "type": "boolean"
+ },
+ "prop_expandedlicensing_License_expandedlicensing_isFsfLibre": {
+ "type": "boolean"
+ },
+ "prop_expandedlicensing_License_expandedlicensing_isOsiApproved": {
+ "type": "boolean"
+ },
+ "prop_expandedlicensing_License_expandedlicensing_licenseXml": {
+ "type": "string"
+ },
+ "prop_expandedlicensing_License_expandedlicensing_obsoletedBy": {
+ "type": "string"
+ },
+ "prop_expandedlicensing_License_expandedlicensing_seeAlso": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_expandedlicensing_License_expandedlicensing_standardLicenseHeader": {
+ "type": "string"
+ },
+ "prop_expandedlicensing_License_expandedlicensing_standardLicenseTemplate": {
+ "type": "string"
+ },
+ "prop_expandedlicensing_License_simplelicensing_licenseText": {
+ "type": "string"
+ },
+ "expandedlicensing_ListedLicense": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_ListedLicense" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicense_props" }
+ ]
+ },
+ "expandedlicensing_ListedLicense_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_ListedLicense" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_ListedLicense_props": {
+ "allOf": [
+ { "$ref": "#/$defs/expandedlicensing_License_props" },
+ {
+ "type": "object",
+ "properties": {
+ "expandedlicensing_deprecatedVersion": {
+ "$ref": "#/$defs/prop_expandedlicensing_ListedLicense_expandedlicensing_deprecatedVersion"
+ },
+ "expandedlicensing_listVersionAdded": {
+ "$ref": "#/$defs/prop_expandedlicensing_ListedLicense_expandedlicensing_listVersionAdded"
+ }
+ }
+ }
+ ]
+ },
+ "prop_expandedlicensing_ListedLicense_expandedlicensing_deprecatedVersion": {
+ "type": "string"
+ },
+ "prop_expandedlicensing_ListedLicense_expandedlicensing_listVersionAdded": {
+ "type": "string"
+ },
+ "expandedlicensing_OrLaterOperator": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_OrLaterOperator" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/expandedlicensing_OrLaterOperator_props" }
+ ]
+ },
+ "expandedlicensing_OrLaterOperator_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_OrLaterOperator" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_OrLaterOperator_props": {
+ "allOf": [
+ { "$ref": "#/$defs/expandedlicensing_ExtendableLicense_props" },
+ {
+ "type": "object",
+ "properties": {
+ "expandedlicensing_subjectLicense": {
+ "$ref": "#/$defs/prop_expandedlicensing_OrLaterOperator_expandedlicensing_subjectLicense"
+ }
+ },
+ "required": [
+ "expandedlicensing_subjectLicense"
+ ]
+ }
+ ]
+ },
+ "prop_expandedlicensing_OrLaterOperator_expandedlicensing_subjectLicense": {
+ "$ref": "#/$defs/expandedlicensing_License_derived"
+ },
+ "expandedlicensing_WithAdditionOperator": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_WithAdditionOperator" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/expandedlicensing_WithAdditionOperator_props" }
+ ]
+ },
+ "expandedlicensing_WithAdditionOperator_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_WithAdditionOperator" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_WithAdditionOperator_props": {
+ "allOf": [
+ { "$ref": "#/$defs/simplelicensing_AnyLicenseInfo_props" },
+ {
+ "type": "object",
+ "properties": {
+ "expandedlicensing_subjectAddition": {
+ "$ref": "#/$defs/prop_expandedlicensing_WithAdditionOperator_expandedlicensing_subjectAddition"
+ },
+ "expandedlicensing_subjectExtendableLicense": {
+ "$ref": "#/$defs/prop_expandedlicensing_WithAdditionOperator_expandedlicensing_subjectExtendableLicense"
+ }
+ },
+ "required": [
+ "expandedlicensing_subjectAddition",
+ "expandedlicensing_subjectExtendableLicense"
+ ]
+ }
+ ]
+ },
+ "prop_expandedlicensing_WithAdditionOperator_expandedlicensing_subjectAddition": {
+ "$ref": "#/$defs/expandedlicensing_LicenseAddition_derived"
+ },
+ "prop_expandedlicensing_WithAdditionOperator_expandedlicensing_subjectExtendableLicense": {
+ "$ref": "#/$defs/expandedlicensing_ExtendableLicense_derived"
+ },
+ "extension_CdxPropertiesExtension": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "extension_CdxPropertiesExtension" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/extension_CdxPropertiesExtension_props" }
+ ]
+ },
+ "extension_CdxPropertiesExtension_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/extension_CdxPropertiesExtension" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "extension_CdxPropertiesExtension_props": {
+ "allOf": [
+ { "$ref": "#/$defs/extension_Extension_props" },
+ {
+ "type": "object",
+ "properties": {
+ "extension_cdxProperty": {
+ "oneOf": [
+ {
+ "type": "array",
+ "minItems": 1,
+ "items": {
+ "$ref": "#/$defs/prop_extension_CdxPropertiesExtension_extension_cdxProperty"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "extension_cdxProperty"
+ ]
+ }
+ ]
+ },
+ "prop_extension_CdxPropertiesExtension_extension_cdxProperty": {
+ "$ref": "#/$defs/extension_CdxPropertyEntry_derived"
+ },
+ "security_CvssV2VulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_CvssV2VulnAssessmentRelationship" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_CvssV2VulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_CvssV2VulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_CvssV2VulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_CvssV2VulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_score": {
+ "$ref": "#/$defs/prop_security_CvssV2VulnAssessmentRelationship_security_score"
+ },
+ "security_vectorString": {
+ "$ref": "#/$defs/prop_security_CvssV2VulnAssessmentRelationship_security_vectorString"
+ }
+ },
+ "required": [
+ "security_score",
+ "security_vectorString"
+ ]
+ }
+ ]
+ },
+ "prop_security_CvssV2VulnAssessmentRelationship_security_score": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string",
+ "pattern": "^-?[0-9]+(\\.[0-9]*)?$"
+ }
+ ]
+ },
+ "prop_security_CvssV2VulnAssessmentRelationship_security_vectorString": {
+ "type": "string"
+ },
+ "security_CvssV3VulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_CvssV3VulnAssessmentRelationship" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_CvssV3VulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_CvssV3VulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_CvssV3VulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_CvssV3VulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_score": {
+ "$ref": "#/$defs/prop_security_CvssV3VulnAssessmentRelationship_security_score"
+ },
+ "security_severity": {
+ "$ref": "#/$defs/prop_security_CvssV3VulnAssessmentRelationship_security_severity"
+ },
+ "security_vectorString": {
+ "$ref": "#/$defs/prop_security_CvssV3VulnAssessmentRelationship_security_vectorString"
+ }
+ },
+ "required": [
+ "security_score",
+ "security_severity",
+ "security_vectorString"
+ ]
+ }
+ ]
+ },
+ "prop_security_CvssV3VulnAssessmentRelationship_security_score": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string",
+ "pattern": "^-?[0-9]+(\\.[0-9]*)?$"
+ }
+ ]
+ },
+ "prop_security_CvssV3VulnAssessmentRelationship_security_severity": {
+ "enum": [
+ "critical",
+ "high",
+ "medium",
+ "low",
+ "none"
+ ]
+ },
+ "prop_security_CvssV3VulnAssessmentRelationship_security_vectorString": {
+ "type": "string"
+ },
+ "security_CvssV4VulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_CvssV4VulnAssessmentRelationship" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_CvssV4VulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_CvssV4VulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_CvssV4VulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_CvssV4VulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_score": {
+ "$ref": "#/$defs/prop_security_CvssV4VulnAssessmentRelationship_security_score"
+ },
+ "security_severity": {
+ "$ref": "#/$defs/prop_security_CvssV4VulnAssessmentRelationship_security_severity"
+ },
+ "security_vectorString": {
+ "$ref": "#/$defs/prop_security_CvssV4VulnAssessmentRelationship_security_vectorString"
+ }
+ },
+ "required": [
+ "security_score",
+ "security_severity",
+ "security_vectorString"
+ ]
+ }
+ ]
+ },
+ "prop_security_CvssV4VulnAssessmentRelationship_security_score": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string",
+ "pattern": "^-?[0-9]+(\\.[0-9]*)?$"
+ }
+ ]
+ },
+ "prop_security_CvssV4VulnAssessmentRelationship_security_severity": {
+ "enum": [
+ "critical",
+ "high",
+ "medium",
+ "low",
+ "none"
+ ]
+ },
+ "prop_security_CvssV4VulnAssessmentRelationship_security_vectorString": {
+ "type": "string"
+ },
+ "security_EpssVulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_EpssVulnAssessmentRelationship" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_EpssVulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_EpssVulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_EpssVulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_EpssVulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_percentile": {
+ "$ref": "#/$defs/prop_security_EpssVulnAssessmentRelationship_security_percentile"
+ },
+ "security_probability": {
+ "$ref": "#/$defs/prop_security_EpssVulnAssessmentRelationship_security_probability"
+ },
+ "security_publishedTime": {
+ "$ref": "#/$defs/prop_security_EpssVulnAssessmentRelationship_security_publishedTime"
+ }
+ },
+ "required": [
+ "security_percentile",
+ "security_probability",
+ "security_publishedTime"
+ ]
+ }
+ ]
+ },
+ "prop_security_EpssVulnAssessmentRelationship_security_percentile": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string",
+ "pattern": "^-?[0-9]+(\\.[0-9]*)?$"
+ }
+ ]
+ },
+ "prop_security_EpssVulnAssessmentRelationship_security_probability": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string",
+ "pattern": "^-?[0-9]+(\\.[0-9]*)?$"
+ }
+ ]
+ },
+ "prop_security_EpssVulnAssessmentRelationship_security_publishedTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "security_ExploitCatalogVulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_ExploitCatalogVulnAssessmentRelationship" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_ExploitCatalogVulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_ExploitCatalogVulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_ExploitCatalogVulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_ExploitCatalogVulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_catalogType": {
+ "$ref": "#/$defs/prop_security_ExploitCatalogVulnAssessmentRelationship_security_catalogType"
+ },
+ "security_exploited": {
+ "$ref": "#/$defs/prop_security_ExploitCatalogVulnAssessmentRelationship_security_exploited"
+ },
+ "security_locator": {
+ "$ref": "#/$defs/prop_security_ExploitCatalogVulnAssessmentRelationship_security_locator"
+ }
+ },
+ "required": [
+ "security_catalogType",
+ "security_exploited",
+ "security_locator"
+ ]
+ }
+ ]
+ },
+ "prop_security_ExploitCatalogVulnAssessmentRelationship_security_catalogType": {
+ "enum": [
+ "kev",
+ "other"
+ ]
+ },
+ "prop_security_ExploitCatalogVulnAssessmentRelationship_security_exploited": {
+ "type": "boolean"
+ },
+ "prop_security_ExploitCatalogVulnAssessmentRelationship_security_locator": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "security_SsvcVulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_SsvcVulnAssessmentRelationship" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_SsvcVulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_SsvcVulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_SsvcVulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_SsvcVulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_decisionType": {
+ "$ref": "#/$defs/prop_security_SsvcVulnAssessmentRelationship_security_decisionType"
+ }
+ },
+ "required": [
+ "security_decisionType"
+ ]
+ }
+ ]
+ },
+ "prop_security_SsvcVulnAssessmentRelationship_security_decisionType": {
+ "enum": [
+ "act",
+ "attend",
+ "track",
+ "trackStar"
+ ]
+ },
+ "security_VexVulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_VexVulnAssessmentRelationship" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_VexVulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_VexVulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_VexAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexFixedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexNotAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexUnderInvestigationVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexVulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_VexVulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_statusNotes": {
+ "$ref": "#/$defs/prop_security_VexVulnAssessmentRelationship_security_statusNotes"
+ },
+ "security_vexVersion": {
+ "$ref": "#/$defs/prop_security_VexVulnAssessmentRelationship_security_vexVersion"
+ }
+ }
+ }
+ ]
+ },
+ "prop_security_VexVulnAssessmentRelationship_security_statusNotes": {
+ "type": "string"
+ },
+ "prop_security_VexVulnAssessmentRelationship_security_vexVersion": {
+ "type": "string"
+ },
+ "security_Vulnerability": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_Vulnerability" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_Vulnerability_props" }
+ ]
+ },
+ "security_Vulnerability_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_Vulnerability" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_Vulnerability_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Artifact_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_modifiedTime": {
+ "$ref": "#/$defs/prop_security_Vulnerability_security_modifiedTime"
+ },
+ "security_publishedTime": {
+ "$ref": "#/$defs/prop_security_Vulnerability_security_publishedTime"
+ },
+ "security_withdrawnTime": {
+ "$ref": "#/$defs/prop_security_Vulnerability_security_withdrawnTime"
+ }
+ }
+ }
+ ]
+ },
+ "prop_security_Vulnerability_security_modifiedTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_security_Vulnerability_security_publishedTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_security_Vulnerability_security_withdrawnTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "software_SoftwareArtifact": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "software_SoftwareArtifact" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/software_SoftwareArtifact_props" }
+ ]
+ },
+ "software_SoftwareArtifact_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ai_AIPackage" },
+ { "$ref": "#/$defs/dataset_DatasetPackage" },
+ { "$ref": "#/$defs/software_File" },
+ { "$ref": "#/$defs/software_Package" },
+ { "$ref": "#/$defs/software_Snippet" },
+ { "$ref": "#/$defs/software_SoftwareArtifact" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_SoftwareArtifact_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Artifact_props" },
+ {
+ "type": "object",
+ "properties": {
+ "software_additionalPurpose": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_software_SoftwareArtifact_software_additionalPurpose"
+ }
+ }
+ ]
+ },
+ "software_attributionText": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_software_SoftwareArtifact_software_attributionText"
+ }
+ }
+ ]
+ },
+ "software_contentIdentifier": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_software_SoftwareArtifact_software_contentIdentifier"
+ }
+ }
+ ]
+ },
+ "software_copyrightText": {
+ "$ref": "#/$defs/prop_software_SoftwareArtifact_software_copyrightText"
+ },
+ "software_primaryPurpose": {
+ "$ref": "#/$defs/prop_software_SoftwareArtifact_software_primaryPurpose"
+ }
+ }
+ }
+ ]
+ },
+ "prop_software_SoftwareArtifact_software_additionalPurpose": {
+ "enum": [
+ "application",
+ "archive",
+ "bom",
+ "configuration",
+ "container",
+ "data",
+ "device",
+ "diskImage",
+ "deviceDriver",
+ "documentation",
+ "evidence",
+ "executable",
+ "file",
+ "filesystemImage",
+ "firmware",
+ "framework",
+ "install",
+ "library",
+ "manifest",
+ "model",
+ "module",
+ "operatingSystem",
+ "other",
+ "patch",
+ "platform",
+ "requirement",
+ "source",
+ "specification",
+ "test"
+ ]
+ },
+ "prop_software_SoftwareArtifact_software_attributionText": {
+ "type": "string"
+ },
+ "prop_software_SoftwareArtifact_software_contentIdentifier": {
+ "$ref": "#/$defs/software_ContentIdentifier_derived"
+ },
+ "prop_software_SoftwareArtifact_software_copyrightText": {
+ "type": "string"
+ },
+ "prop_software_SoftwareArtifact_software_primaryPurpose": {
+ "enum": [
+ "application",
+ "archive",
+ "bom",
+ "configuration",
+ "container",
+ "data",
+ "device",
+ "diskImage",
+ "deviceDriver",
+ "documentation",
+ "evidence",
+ "executable",
+ "file",
+ "filesystemImage",
+ "firmware",
+ "framework",
+ "install",
+ "library",
+ "manifest",
+ "model",
+ "module",
+ "operatingSystem",
+ "other",
+ "patch",
+ "platform",
+ "requirement",
+ "source",
+ "specification",
+ "test"
+ ]
+ },
+ "Bom": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "Bom" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/Bom_props" }
+ ]
+ },
+ "Bom_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/software_Sbom" },
+ { "$ref": "#/$defs/Bom" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Bom_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Bundle_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "expandedlicensing_CustomLicense": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_CustomLicense" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/expandedlicensing_CustomLicense_props" }
+ ]
+ },
+ "expandedlicensing_CustomLicense_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_CustomLicense" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_CustomLicense_props": {
+ "allOf": [
+ { "$ref": "#/$defs/expandedlicensing_License_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "security_VexAffectedVulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_VexAffectedVulnAssessmentRelationship" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_VexAffectedVulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_VexAffectedVulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_VexAffectedVulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_VexAffectedVulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VexVulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_actionStatement": {
+ "$ref": "#/$defs/prop_security_VexAffectedVulnAssessmentRelationship_security_actionStatement"
+ },
+ "security_actionStatementTime": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_security_VexAffectedVulnAssessmentRelationship_security_actionStatementTime"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "prop_security_VexAffectedVulnAssessmentRelationship_security_actionStatement": {
+ "type": "string"
+ },
+ "prop_security_VexAffectedVulnAssessmentRelationship_security_actionStatementTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "security_VexFixedVulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_VexFixedVulnAssessmentRelationship" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_VexFixedVulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_VexFixedVulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_VexFixedVulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_VexFixedVulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VexVulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "security_VexNotAffectedVulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_VexNotAffectedVulnAssessmentRelationship" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_VexNotAffectedVulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_VexNotAffectedVulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_VexNotAffectedVulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_VexNotAffectedVulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VexVulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_impactStatement": {
+ "$ref": "#/$defs/prop_security_VexNotAffectedVulnAssessmentRelationship_security_impactStatement"
+ },
+ "security_impactStatementTime": {
+ "$ref": "#/$defs/prop_security_VexNotAffectedVulnAssessmentRelationship_security_impactStatementTime"
+ },
+ "security_justificationType": {
+ "$ref": "#/$defs/prop_security_VexNotAffectedVulnAssessmentRelationship_security_justificationType"
+ }
+ }
+ }
+ ]
+ },
+ "prop_security_VexNotAffectedVulnAssessmentRelationship_security_impactStatement": {
+ "type": "string"
+ },
+ "prop_security_VexNotAffectedVulnAssessmentRelationship_security_impactStatementTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_security_VexNotAffectedVulnAssessmentRelationship_security_justificationType": {
+ "enum": [
+ "componentNotPresent",
+ "vulnerableCodeNotPresent",
+ "vulnerableCodeCannotBeControlledByAdversary",
+ "vulnerableCodeNotInExecutePath",
+ "inlineMitigationsAlreadyExist"
+ ]
+ },
+ "security_VexUnderInvestigationVulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_VexUnderInvestigationVulnAssessmentRelationship" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_VexUnderInvestigationVulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_VexUnderInvestigationVulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_VexUnderInvestigationVulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_VexUnderInvestigationVulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VexVulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "software_File": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "software_File" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/software_File_props" }
+ ]
+ },
+ "software_File_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/software_File" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_File_props": {
+ "allOf": [
+ { "$ref": "#/$defs/software_SoftwareArtifact_props" },
+ {
+ "type": "object",
+ "properties": {
+ "software_contentType": {
+ "$ref": "#/$defs/prop_software_File_software_contentType"
+ },
+ "software_fileKind": {
+ "$ref": "#/$defs/prop_software_File_software_fileKind"
+ }
+ }
+ }
+ ]
+ },
+ "prop_software_File_software_contentType": {
+ "pattern": "^[^\\/]+\\/[^\\/]+$",
+ "type": "string"
+ },
+ "prop_software_File_software_fileKind": {
+ "enum": [
+ "file",
+ "directory"
+ ]
+ },
+ "software_Package": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "software_Package" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/software_Package_props" }
+ ]
+ },
+ "software_Package_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ai_AIPackage" },
+ { "$ref": "#/$defs/dataset_DatasetPackage" },
+ { "$ref": "#/$defs/software_Package" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_Package_props": {
+ "allOf": [
+ { "$ref": "#/$defs/software_SoftwareArtifact_props" },
+ {
+ "type": "object",
+ "properties": {
+ "software_downloadLocation": {
+ "$ref": "#/$defs/prop_software_Package_software_downloadLocation"
+ },
+ "software_homePage": {
+ "$ref": "#/$defs/prop_software_Package_software_homePage"
+ },
+ "software_packageUrl": {
+ "$ref": "#/$defs/prop_software_Package_software_packageUrl"
+ },
+ "software_packageVersion": {
+ "$ref": "#/$defs/prop_software_Package_software_packageVersion"
+ },
+ "software_sourceInfo": {
+ "$ref": "#/$defs/prop_software_Package_software_sourceInfo"
+ }
+ }
+ }
+ ]
+ },
+ "prop_software_Package_software_downloadLocation": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_software_Package_software_homePage": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_software_Package_software_packageUrl": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_software_Package_software_packageVersion": {
+ "type": "string"
+ },
+ "prop_software_Package_software_sourceInfo": {
+ "type": "string"
+ },
+ "software_Sbom": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "software_Sbom" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/software_Sbom_props" }
+ ]
+ },
+ "software_Sbom_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/software_Sbom" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_Sbom_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Bom_props" },
+ {
+ "type": "object",
+ "properties": {
+ "software_sbomType": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_software_Sbom_software_sbomType"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "prop_software_Sbom_software_sbomType": {
+ "enum": [
+ "design",
+ "source",
+ "build",
+ "deployed",
+ "runtime",
+ "analyzed"
+ ]
+ },
+ "software_Snippet": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "software_Snippet" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/software_Snippet_props" }
+ ]
+ },
+ "software_Snippet_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/software_Snippet" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_Snippet_props": {
+ "allOf": [
+ { "$ref": "#/$defs/software_SoftwareArtifact_props" },
+ {
+ "type": "object",
+ "properties": {
+ "software_byteRange": {
+ "$ref": "#/$defs/prop_software_Snippet_software_byteRange"
+ },
+ "software_lineRange": {
+ "$ref": "#/$defs/prop_software_Snippet_software_lineRange"
+ },
+ "software_snippetFromFile": {
+ "$ref": "#/$defs/prop_software_Snippet_software_snippetFromFile"
+ }
+ },
+ "required": [
+ "software_snippetFromFile"
+ ]
+ }
+ ]
+ },
+ "prop_software_Snippet_software_byteRange": {
+ "$ref": "#/$defs/PositiveIntegerRange_derived"
+ },
+ "prop_software_Snippet_software_lineRange": {
+ "$ref": "#/$defs/PositiveIntegerRange_derived"
+ },
+ "prop_software_Snippet_software_snippetFromFile": {
+ "$ref": "#/$defs/software_File_derived"
+ },
+ "ai_AIPackage": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "ai_AIPackage" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ai_AIPackage_props" }
+ ]
+ },
+ "ai_AIPackage_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ai_AIPackage" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ai_AIPackage_props": {
+ "allOf": [
+ { "$ref": "#/$defs/software_Package_props" },
+ {
+ "type": "object",
+ "properties": {
+ "ai_autonomyType": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_autonomyType"
+ },
+ "ai_domain": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_domain"
+ }
+ }
+ ]
+ },
+ "ai_energyConsumption": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_energyConsumption"
+ },
+ "ai_hyperparameter": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_hyperparameter"
+ }
+ }
+ ]
+ },
+ "ai_informationAboutApplication": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_informationAboutApplication"
+ },
+ "ai_informationAboutTraining": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_informationAboutTraining"
+ },
+ "ai_limitation": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_limitation"
+ },
+ "ai_metric": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_metric"
+ }
+ }
+ ]
+ },
+ "ai_metricDecisionThreshold": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_metricDecisionThreshold"
+ }
+ }
+ ]
+ },
+ "ai_modelDataPreprocessing": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_modelDataPreprocessing"
+ }
+ }
+ ]
+ },
+ "ai_modelExplainability": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_modelExplainability"
+ }
+ }
+ ]
+ },
+ "ai_safetyRiskAssessment": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_safetyRiskAssessment"
+ },
+ "ai_standardCompliance": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_standardCompliance"
+ }
+ }
+ ]
+ },
+ "ai_typeOfModel": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_typeOfModel"
+ }
+ }
+ ]
+ },
+ "ai_useSensitivePersonalInformation": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_useSensitivePersonalInformation"
+ }
+ }
+ }
+ ]
+ },
+ "prop_ai_AIPackage_ai_autonomyType": {
+ "enum": [
+ "yes",
+ "no",
+ "noAssertion"
+ ]
+ },
+ "prop_ai_AIPackage_ai_domain": {
+ "type": "string"
+ },
+ "prop_ai_AIPackage_ai_energyConsumption": {
+ "$ref": "#/$defs/ai_EnergyConsumption_derived"
+ },
+ "prop_ai_AIPackage_ai_hyperparameter": {
+ "$ref": "#/$defs/DictionaryEntry_derived"
+ },
+ "prop_ai_AIPackage_ai_informationAboutApplication": {
+ "type": "string"
+ },
+ "prop_ai_AIPackage_ai_informationAboutTraining": {
+ "type": "string"
+ },
+ "prop_ai_AIPackage_ai_limitation": {
+ "type": "string"
+ },
+ "prop_ai_AIPackage_ai_metric": {
+ "$ref": "#/$defs/DictionaryEntry_derived"
+ },
+ "prop_ai_AIPackage_ai_metricDecisionThreshold": {
+ "$ref": "#/$defs/DictionaryEntry_derived"
+ },
+ "prop_ai_AIPackage_ai_modelDataPreprocessing": {
+ "type": "string"
+ },
+ "prop_ai_AIPackage_ai_modelExplainability": {
+ "type": "string"
+ },
+ "prop_ai_AIPackage_ai_safetyRiskAssessment": {
+ "enum": [
+ "serious",
+ "high",
+ "medium",
+ "low"
+ ]
+ },
+ "prop_ai_AIPackage_ai_standardCompliance": {
+ "type": "string"
+ },
+ "prop_ai_AIPackage_ai_typeOfModel": {
+ "type": "string"
+ },
+ "prop_ai_AIPackage_ai_useSensitivePersonalInformation": {
+ "enum": [
+ "yes",
+ "no",
+ "noAssertion"
+ ]
+ },
+ "dataset_DatasetPackage": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "dataset_DatasetPackage" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/dataset_DatasetPackage_props" }
+ ]
+ },
+ "dataset_DatasetPackage_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/dataset_DatasetPackage" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "dataset_DatasetPackage_props": {
+ "allOf": [
+ { "$ref": "#/$defs/software_Package_props" },
+ {
+ "type": "object",
+ "properties": {
+ "dataset_anonymizationMethodUsed": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_anonymizationMethodUsed"
+ }
+ }
+ ]
+ },
+ "dataset_confidentialityLevel": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_confidentialityLevel"
+ },
+ "dataset_dataCollectionProcess": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_dataCollectionProcess"
+ },
+ "dataset_dataPreprocessing": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_dataPreprocessing"
+ }
+ }
+ ]
+ },
+ "dataset_datasetAvailability": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_datasetAvailability"
+ },
+ "dataset_datasetNoise": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_datasetNoise"
+ },
+ "dataset_datasetSize": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_datasetSize"
+ },
+ "dataset_datasetType": {
+ "oneOf": [
+ {
+ "type": "array",
+ "minItems": 1,
+ "items": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_datasetType"
+ }
+ }
+ ]
+ },
+ "dataset_datasetUpdateMechanism": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_datasetUpdateMechanism"
+ },
+ "dataset_hasSensitivePersonalInformation": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_hasSensitivePersonalInformation"
+ },
+ "dataset_intendedUse": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_intendedUse"
+ },
+ "dataset_knownBias": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_knownBias"
+ }
+ }
+ ]
+ },
+ "dataset_sensor": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_sensor"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "dataset_datasetType"
+ ]
+ }
+ ]
+ },
+ "prop_dataset_DatasetPackage_dataset_anonymizationMethodUsed": {
+ "type": "string"
+ },
+ "prop_dataset_DatasetPackage_dataset_confidentialityLevel": {
+ "enum": [
+ "red",
+ "amber",
+ "green",
+ "clear"
+ ]
+ },
+ "prop_dataset_DatasetPackage_dataset_dataCollectionProcess": {
+ "type": "string"
+ },
+ "prop_dataset_DatasetPackage_dataset_dataPreprocessing": {
+ "type": "string"
+ },
+ "prop_dataset_DatasetPackage_dataset_datasetAvailability": {
+ "enum": [
+ "clickthrough",
+ "directDownload",
+ "query",
+ "registration",
+ "scrapingScript"
+ ]
+ },
+ "prop_dataset_DatasetPackage_dataset_datasetNoise": {
+ "type": "string"
+ },
+ "prop_dataset_DatasetPackage_dataset_datasetSize": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "prop_dataset_DatasetPackage_dataset_datasetType": {
+ "enum": [
+ "audio",
+ "categorical",
+ "graph",
+ "image",
+ "noAssertion",
+ "numeric",
+ "other",
+ "sensor",
+ "structured",
+ "syntactic",
+ "text",
+ "timeseries",
+ "timestamp",
+ "video"
+ ]
+ },
+ "prop_dataset_DatasetPackage_dataset_datasetUpdateMechanism": {
+ "type": "string"
+ },
+ "prop_dataset_DatasetPackage_dataset_hasSensitivePersonalInformation": {
+ "enum": [
+ "yes",
+ "no",
+ "noAssertion"
+ ]
+ },
+ "prop_dataset_DatasetPackage_dataset_intendedUse": {
+ "type": "string"
+ },
+ "prop_dataset_DatasetPackage_dataset_knownBias": {
+ "type": "string"
+ },
+ "prop_dataset_DatasetPackage_dataset_sensor": {
+ "$ref": "#/$defs/DictionaryEntry_derived"
+ },
+ "IRI": {
+ "type": "string",
+ "pattern": "^(?!_:).+:.+"
+ },
+ "BlankNode": {
+ "type": "string",
+ "pattern": "^_:.+"
+ },
+ "BlankNodeOrIRI": {
+ "oneOf": [
+ { "$ref": "#/$defs/IRI" },
+ { "$ref": "#/$defs/BlankNode" }
+ ]
+ },
+ "anyURI": {
+ "type": "string"
+ },
+ "DateTime": {
+ "type": "string"
+ },
+ "MediaType": {
+ "type": "string"
+ },
+ "SemVer": {
+ "type": "string"
+ },
+ "Extension": {
+ "type": "string"
+ },
+ "SHACLClass": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "oneOf": [
+ { "$ref": "#/$defs/IRI" },
+ {
+ "enum": [
+ "ai_EnergyConsumption",
+ "ai_EnergyConsumptionDescription",
+ "ai_EnergyUnitType",
+ "ai_SafetyRiskAssessmentType",
+ "AnnotationType",
+ "CreationInfo",
+ "DictionaryEntry",
+ "Element",
+ "ElementCollection",
+ "ExternalIdentifier",
+ "ExternalIdentifierType",
+ "ExternalMap",
+ "ExternalRef",
+ "ExternalRefType",
+ "HashAlgorithm",
+ "IntegrityMethod",
+ "LifecycleScopeType",
+ "NamespaceMap",
+ "PackageVerificationCode",
+ "PositiveIntegerRange",
+ "PresenceType",
+ "ProfileIdentifierType",
+ "Relationship",
+ "RelationshipCompleteness",
+ "RelationshipType",
+ "SpdxDocument",
+ "SupportType",
+ "Tool",
+ "dataset_ConfidentialityLevelType",
+ "dataset_DatasetAvailabilityType",
+ "dataset_DatasetType",
+ "expandedlicensing_LicenseAddition",
+ "expandedlicensing_ListedLicenseException",
+ "extension_CdxPropertyEntry",
+ "extension_Extension",
+ "security_CvssSeverityType",
+ "security_ExploitCatalogType",
+ "security_SsvcDecisionType",
+ "security_VexJustificationType",
+ "security_VulnAssessmentRelationship",
+ "simplelicensing_AnyLicenseInfo",
+ "simplelicensing_LicenseExpression",
+ "simplelicensing_SimpleLicensingText",
+ "software_ContentIdentifier",
+ "software_ContentIdentifierType",
+ "software_FileKindType",
+ "software_SbomType",
+ "software_SoftwarePurpose",
+ "build_Build",
+ "Agent",
+ "Annotation",
+ "Artifact",
+ "Bundle",
+ "Hash",
+ "LifecycleScopedRelationship",
+ "Organization",
+ "Person",
+ "SoftwareAgent",
+ "expandedlicensing_ConjunctiveLicenseSet",
+ "expandedlicensing_CustomLicenseAddition",
+ "expandedlicensing_DisjunctiveLicenseSet",
+ "expandedlicensing_ExtendableLicense",
+ "expandedlicensing_IndividualLicensingInfo",
+ "expandedlicensing_License",
+ "expandedlicensing_ListedLicense",
+ "expandedlicensing_OrLaterOperator",
+ "expandedlicensing_WithAdditionOperator",
+ "extension_CdxPropertiesExtension",
+ "security_CvssV2VulnAssessmentRelationship",
+ "security_CvssV3VulnAssessmentRelationship",
+ "security_CvssV4VulnAssessmentRelationship",
+ "security_EpssVulnAssessmentRelationship",
+ "security_ExploitCatalogVulnAssessmentRelationship",
+ "security_SsvcVulnAssessmentRelationship",
+ "security_VexVulnAssessmentRelationship",
+ "security_Vulnerability",
+ "software_SoftwareArtifact",
+ "Bom",
+ "expandedlicensing_CustomLicense",
+ "security_VexAffectedVulnAssessmentRelationship",
+ "security_VexFixedVulnAssessmentRelationship",
+ "security_VexNotAffectedVulnAssessmentRelationship",
+ "security_VexUnderInvestigationVulnAssessmentRelationship",
+ "software_File",
+ "software_Package",
+ "software_Sbom",
+ "software_Snippet",
+ "ai_AIPackage",
+ "dataset_DatasetPackage"
+ ]
+ }
+ ]
+ }
+ },
+ "required": ["type"]
+ },
+ "AnyClass": {
+ "anyOf": [
+ { "$ref": "#/$defs/ai_EnergyConsumption" },
+ { "$ref": "#/$defs/ai_EnergyConsumptionDescription" },
+ { "$ref": "#/$defs/ai_EnergyUnitType" },
+ { "$ref": "#/$defs/ai_SafetyRiskAssessmentType" },
+ { "$ref": "#/$defs/AnnotationType" },
+ { "$ref": "#/$defs/CreationInfo" },
+ { "$ref": "#/$defs/DictionaryEntry" },
+ { "$ref": "#/$defs/Element" },
+ { "$ref": "#/$defs/ElementCollection" },
+ { "$ref": "#/$defs/ExternalIdentifier" },
+ { "$ref": "#/$defs/ExternalIdentifierType" },
+ { "$ref": "#/$defs/ExternalMap" },
+ { "$ref": "#/$defs/ExternalRef" },
+ { "$ref": "#/$defs/ExternalRefType" },
+ { "$ref": "#/$defs/HashAlgorithm" },
+ { "$ref": "#/$defs/IntegrityMethod" },
+ { "$ref": "#/$defs/LifecycleScopeType" },
+ { "$ref": "#/$defs/NamespaceMap" },
+ { "$ref": "#/$defs/PackageVerificationCode" },
+ { "$ref": "#/$defs/PositiveIntegerRange" },
+ { "$ref": "#/$defs/PresenceType" },
+ { "$ref": "#/$defs/ProfileIdentifierType" },
+ { "$ref": "#/$defs/Relationship" },
+ { "$ref": "#/$defs/RelationshipCompleteness" },
+ { "$ref": "#/$defs/RelationshipType" },
+ { "$ref": "#/$defs/SpdxDocument" },
+ { "$ref": "#/$defs/SupportType" },
+ { "$ref": "#/$defs/Tool" },
+ { "$ref": "#/$defs/dataset_ConfidentialityLevelType" },
+ { "$ref": "#/$defs/dataset_DatasetAvailabilityType" },
+ { "$ref": "#/$defs/dataset_DatasetType" },
+ { "$ref": "#/$defs/expandedlicensing_LicenseAddition" },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicenseException" },
+ { "$ref": "#/$defs/extension_CdxPropertyEntry" },
+ { "$ref": "#/$defs/extension_Extension" },
+ { "$ref": "#/$defs/security_CvssSeverityType" },
+ { "$ref": "#/$defs/security_ExploitCatalogType" },
+ { "$ref": "#/$defs/security_SsvcDecisionType" },
+ { "$ref": "#/$defs/security_VexJustificationType" },
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/simplelicensing_AnyLicenseInfo" },
+ { "$ref": "#/$defs/simplelicensing_LicenseExpression" },
+ { "$ref": "#/$defs/simplelicensing_SimpleLicensingText" },
+ { "$ref": "#/$defs/software_ContentIdentifier" },
+ { "$ref": "#/$defs/software_ContentIdentifierType" },
+ { "$ref": "#/$defs/software_FileKindType" },
+ { "$ref": "#/$defs/software_SbomType" },
+ { "$ref": "#/$defs/software_SoftwarePurpose" },
+ { "$ref": "#/$defs/build_Build" },
+ { "$ref": "#/$defs/Agent" },
+ { "$ref": "#/$defs/Annotation" },
+ { "$ref": "#/$defs/Artifact" },
+ { "$ref": "#/$defs/Bundle" },
+ { "$ref": "#/$defs/Hash" },
+ { "$ref": "#/$defs/LifecycleScopedRelationship" },
+ { "$ref": "#/$defs/Organization" },
+ { "$ref": "#/$defs/Person" },
+ { "$ref": "#/$defs/SoftwareAgent" },
+ { "$ref": "#/$defs/expandedlicensing_ConjunctiveLicenseSet" },
+ { "$ref": "#/$defs/expandedlicensing_CustomLicenseAddition" },
+ { "$ref": "#/$defs/expandedlicensing_DisjunctiveLicenseSet" },
+ { "$ref": "#/$defs/expandedlicensing_ExtendableLicense" },
+ { "$ref": "#/$defs/expandedlicensing_IndividualLicensingInfo" },
+ { "$ref": "#/$defs/expandedlicensing_License" },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicense" },
+ { "$ref": "#/$defs/expandedlicensing_OrLaterOperator" },
+ { "$ref": "#/$defs/expandedlicensing_WithAdditionOperator" },
+ { "$ref": "#/$defs/extension_CdxPropertiesExtension" },
+ { "$ref": "#/$defs/security_CvssV2VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_CvssV3VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_CvssV4VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_EpssVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_ExploitCatalogVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_SsvcVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_Vulnerability" },
+ { "$ref": "#/$defs/software_SoftwareArtifact" },
+ { "$ref": "#/$defs/Bom" },
+ { "$ref": "#/$defs/expandedlicensing_CustomLicense" },
+ { "$ref": "#/$defs/security_VexAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexFixedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexNotAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexUnderInvestigationVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/software_File" },
+ { "$ref": "#/$defs/software_Package" },
+ { "$ref": "#/$defs/software_Sbom" },
+ { "$ref": "#/$defs/software_Snippet" },
+ { "$ref": "#/$defs/ai_AIPackage" },
+ { "$ref": "#/$defs/dataset_DatasetPackage" }
+ ]
+ }
+ }
+}
diff --git a/resources/spdx-schema-v3.0.1.json b/resources/spdx-schema-v3.0.1.json
new file mode 100644
index 0000000..5f0fcc3
--- /dev/null
+++ b/resources/spdx-schema-v3.0.1.json
@@ -0,0 +1,5971 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$comment": "This file was automatically generated by shacl2code. DO NOT MANUALLY MODIFY IT",
+ "type": "object",
+
+ "properties": {
+ "@context": {
+ "const": "https://spdx.org/rdf/3.0.1/spdx-context.jsonld"
+ }
+ },
+ "required": ["@context"],
+
+ "oneOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@graph": {
+ "description": "Top level container for JSON-LD objects",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "$ref": "#/$defs/AnyClass",
+ "unevaluatedProperties": false
+ }
+ }
+ },
+ "required": ["@graph"]
+ },
+ { "$ref": "#/$defs/AnyClass" }
+ ],
+ "unevaluatedProperties": false,
+
+ "$defs": {
+ "http_spdxinvalidAbstractClass": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "http://spdx.invalid./AbstractClass" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/http_spdxinvalidAbstractClass_props" }
+ ]
+ },
+ "http_spdxinvalidAbstractClass_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/http_spdxinvalidAbstractClass" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "http_spdxinvalidAbstractClass_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "ai_EnergyConsumption": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNode" },
+ "type": {
+ "oneOf": [
+ { "const": "ai_EnergyConsumption" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ai_EnergyConsumption_props" }
+ ]
+ },
+ "ai_EnergyConsumption_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ai_EnergyConsumption" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ai_EnergyConsumption_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "ai_finetuningEnergyConsumption": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_EnergyConsumption_ai_finetuningEnergyConsumption"
+ }
+ }
+ ]
+ },
+ "ai_inferenceEnergyConsumption": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_EnergyConsumption_ai_inferenceEnergyConsumption"
+ }
+ }
+ ]
+ },
+ "ai_trainingEnergyConsumption": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_EnergyConsumption_ai_trainingEnergyConsumption"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "prop_ai_EnergyConsumption_ai_finetuningEnergyConsumption": {
+ "$ref": "#/$defs/ai_EnergyConsumptionDescription_derived"
+ },
+ "prop_ai_EnergyConsumption_ai_inferenceEnergyConsumption": {
+ "$ref": "#/$defs/ai_EnergyConsumptionDescription_derived"
+ },
+ "prop_ai_EnergyConsumption_ai_trainingEnergyConsumption": {
+ "$ref": "#/$defs/ai_EnergyConsumptionDescription_derived"
+ },
+ "ai_EnergyConsumptionDescription": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNode" },
+ "type": {
+ "oneOf": [
+ { "const": "ai_EnergyConsumptionDescription" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ai_EnergyConsumptionDescription_props" }
+ ]
+ },
+ "ai_EnergyConsumptionDescription_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ai_EnergyConsumptionDescription" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ai_EnergyConsumptionDescription_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "ai_energyQuantity": {
+ "$ref": "#/$defs/prop_ai_EnergyConsumptionDescription_ai_energyQuantity"
+ },
+ "ai_energyUnit": {
+ "$ref": "#/$defs/prop_ai_EnergyConsumptionDescription_ai_energyUnit"
+ }
+ },
+ "required": [
+ "ai_energyQuantity",
+ "ai_energyUnit"
+ ]
+ }
+ ]
+ },
+ "prop_ai_EnergyConsumptionDescription_ai_energyQuantity": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string",
+ "pattern": "^-?[0-9]+(\\.[0-9]*)?$"
+ }
+ ]
+ },
+ "prop_ai_EnergyConsumptionDescription_ai_energyUnit": {
+ "enum": [
+ "kilowattHour",
+ "megajoule",
+ "other"
+ ]
+ },
+ "ai_EnergyUnitType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "ai_EnergyUnitType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ai_EnergyUnitType_props" }
+ ]
+ },
+ "ai_EnergyUnitType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ai_EnergyUnitType" }
+ ]
+ },
+ { "const": "spdx:AI/EnergyUnitType/megajoule" },
+ { "const": "spdx:AI/EnergyUnitType/kilowattHour" },
+ { "const": "spdx:AI/EnergyUnitType/other" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ai_EnergyUnitType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "ai_SafetyRiskAssessmentType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "ai_SafetyRiskAssessmentType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ai_SafetyRiskAssessmentType_props" }
+ ]
+ },
+ "ai_SafetyRiskAssessmentType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ai_SafetyRiskAssessmentType" }
+ ]
+ },
+ { "const": "spdx:AI/SafetyRiskAssessmentType/medium" },
+ { "const": "spdx:AI/SafetyRiskAssessmentType/low" },
+ { "const": "spdx:AI/SafetyRiskAssessmentType/high" },
+ { "const": "spdx:AI/SafetyRiskAssessmentType/serious" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ai_SafetyRiskAssessmentType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "AnnotationType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "AnnotationType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/AnnotationType_props" }
+ ]
+ },
+ "AnnotationType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/AnnotationType" }
+ ]
+ },
+ { "const": "spdx:Core/AnnotationType/other" },
+ { "const": "spdx:Core/AnnotationType/review" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "AnnotationType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "CreationInfo": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "@id": { "$ref": "#/$defs/BlankNode" },
+ "type": {
+ "oneOf": [
+ { "const": "CreationInfo" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/CreationInfo_props" }
+ ]
+ },
+ "CreationInfo_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/CreationInfo" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "CreationInfo_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "comment": {
+ "$ref": "#/$defs/prop_CreationInfo_comment"
+ },
+ "created": {
+ "$ref": "#/$defs/prop_CreationInfo_created"
+ },
+ "createdBy": {
+ "oneOf": [
+ {
+ "type": "array",
+ "minItems": 1,
+ "items": {
+ "$ref": "#/$defs/prop_CreationInfo_createdBy"
+ }
+ }
+ ]
+ },
+ "createdUsing": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_CreationInfo_createdUsing"
+ }
+ }
+ ]
+ },
+ "specVersion": {
+ "$ref": "#/$defs/prop_CreationInfo_specVersion"
+ }
+ },
+ "required": [
+ "created",
+ "createdBy",
+ "specVersion"
+ ]
+ }
+ ]
+ },
+ "prop_CreationInfo_comment": {
+ "type": "string"
+ },
+ "prop_CreationInfo_created": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_CreationInfo_createdBy": {
+ "$ref": "#/$defs/Agent_derived"
+ },
+ "prop_CreationInfo_createdUsing": {
+ "$ref": "#/$defs/Tool_derived"
+ },
+ "prop_CreationInfo_specVersion": {
+ "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
+ "type": "string"
+ },
+ "DictionaryEntry": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNode" },
+ "type": {
+ "oneOf": [
+ { "const": "DictionaryEntry" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/DictionaryEntry_props" }
+ ]
+ },
+ "DictionaryEntry_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/DictionaryEntry" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "DictionaryEntry_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "key": {
+ "$ref": "#/$defs/prop_DictionaryEntry_key"
+ },
+ "value": {
+ "$ref": "#/$defs/prop_DictionaryEntry_value"
+ }
+ },
+ "required": [
+ "key"
+ ]
+ }
+ ]
+ },
+ "prop_DictionaryEntry_key": {
+ "type": "string"
+ },
+ "prop_DictionaryEntry_value": {
+ "type": "string"
+ },
+ "Element_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ai_AIPackage" },
+ { "$ref": "#/$defs/build_Build" },
+ { "$ref": "#/$defs/Agent" },
+ { "$ref": "#/$defs/Annotation" },
+ { "$ref": "#/$defs/Bom" },
+ { "$ref": "#/$defs/Bundle" },
+ { "$ref": "#/$defs/LifecycleScopedRelationship" },
+ { "$ref": "#/$defs/Organization" },
+ { "$ref": "#/$defs/Person" },
+ { "$ref": "#/$defs/Relationship" },
+ { "$ref": "#/$defs/SoftwareAgent" },
+ { "$ref": "#/$defs/SpdxDocument" },
+ { "$ref": "#/$defs/Tool" },
+ { "$ref": "#/$defs/dataset_DatasetPackage" },
+ { "$ref": "#/$defs/expandedlicensing_ConjunctiveLicenseSet" },
+ { "$ref": "#/$defs/expandedlicensing_CustomLicense" },
+ { "$ref": "#/$defs/expandedlicensing_CustomLicenseAddition" },
+ { "$ref": "#/$defs/expandedlicensing_DisjunctiveLicenseSet" },
+ { "$ref": "#/$defs/expandedlicensing_IndividualLicensingInfo" },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicense" },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicenseException" },
+ { "$ref": "#/$defs/expandedlicensing_OrLaterOperator" },
+ { "$ref": "#/$defs/expandedlicensing_WithAdditionOperator" },
+ { "$ref": "#/$defs/security_CvssV2VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_CvssV3VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_CvssV4VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_EpssVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_ExploitCatalogVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_SsvcVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexFixedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexNotAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexUnderInvestigationVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_Vulnerability" },
+ { "$ref": "#/$defs/simplelicensing_LicenseExpression" },
+ { "$ref": "#/$defs/simplelicensing_SimpleLicensingText" },
+ { "$ref": "#/$defs/software_File" },
+ { "$ref": "#/$defs/software_Package" },
+ { "$ref": "#/$defs/software_Sbom" },
+ { "$ref": "#/$defs/software_Snippet" }
+ ]
+ },
+ { "const": "spdx:ExpandedLicensing/NoAssertionLicense" },
+ { "const": "spdx:ExpandedLicensing/NoneLicense" },
+ { "const": "spdx:Core/NoneElement" },
+ { "const": "spdx:Core/NoAssertionElement" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Element_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "comment": {
+ "$ref": "#/$defs/prop_Element_comment"
+ },
+ "creationInfo": {
+ "$ref": "#/$defs/prop_Element_creationInfo"
+ },
+ "description": {
+ "$ref": "#/$defs/prop_Element_description"
+ },
+ "extension": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_Element_extension"
+ }
+ }
+ ]
+ },
+ "externalIdentifier": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_Element_externalIdentifier"
+ }
+ }
+ ]
+ },
+ "externalRef": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_Element_externalRef"
+ }
+ }
+ ]
+ },
+ "name": {
+ "$ref": "#/$defs/prop_Element_name"
+ },
+ "summary": {
+ "$ref": "#/$defs/prop_Element_summary"
+ },
+ "verifiedUsing": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_Element_verifiedUsing"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "creationInfo"
+ ]
+ }
+ ]
+ },
+ "prop_Element_comment": {
+ "type": "string"
+ },
+ "prop_Element_creationInfo": {
+ "$ref": "#/$defs/CreationInfo_derived"
+ },
+ "prop_Element_description": {
+ "type": "string"
+ },
+ "prop_Element_extension": {
+ "$ref": "#/$defs/extension_Extension_derived"
+ },
+ "prop_Element_externalIdentifier": {
+ "$ref": "#/$defs/ExternalIdentifier_derived"
+ },
+ "prop_Element_externalRef": {
+ "$ref": "#/$defs/ExternalRef_derived"
+ },
+ "prop_Element_name": {
+ "type": "string"
+ },
+ "prop_Element_summary": {
+ "type": "string"
+ },
+ "prop_Element_verifiedUsing": {
+ "$ref": "#/$defs/IntegrityMethod_derived"
+ },
+ "ElementCollection_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/Bom" },
+ { "$ref": "#/$defs/Bundle" },
+ { "$ref": "#/$defs/SpdxDocument" },
+ { "$ref": "#/$defs/software_Sbom" },
+ { "$ref": "#/$defs/ElementCollection" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ElementCollection_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ "element": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ElementCollection_element"
+ }
+ }
+ ]
+ },
+ "profileConformance": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ElementCollection_profileConformance"
+ }
+ }
+ ]
+ },
+ "rootElement": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ElementCollection_rootElement"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "prop_ElementCollection_element": {
+ "$ref": "#/$defs/Element_derived"
+ },
+ "prop_ElementCollection_profileConformance": {
+ "enum": [
+ "ai",
+ "build",
+ "core",
+ "dataset",
+ "expandedLicensing",
+ "extension",
+ "lite",
+ "security",
+ "simpleLicensing",
+ "software"
+ ]
+ },
+ "prop_ElementCollection_rootElement": {
+ "$ref": "#/$defs/Element_derived"
+ },
+ "ExternalIdentifier": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNode" },
+ "type": {
+ "oneOf": [
+ { "const": "ExternalIdentifier" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ExternalIdentifier_props" }
+ ]
+ },
+ "ExternalIdentifier_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ExternalIdentifier" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ExternalIdentifier_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "comment": {
+ "$ref": "#/$defs/prop_ExternalIdentifier_comment"
+ },
+ "externalIdentifierType": {
+ "$ref": "#/$defs/prop_ExternalIdentifier_externalIdentifierType"
+ },
+ "identifier": {
+ "$ref": "#/$defs/prop_ExternalIdentifier_identifier"
+ },
+ "identifierLocator": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ExternalIdentifier_identifierLocator"
+ }
+ }
+ ]
+ },
+ "issuingAuthority": {
+ "$ref": "#/$defs/prop_ExternalIdentifier_issuingAuthority"
+ }
+ },
+ "required": [
+ "externalIdentifierType",
+ "identifier"
+ ]
+ }
+ ]
+ },
+ "prop_ExternalIdentifier_comment": {
+ "type": "string"
+ },
+ "prop_ExternalIdentifier_externalIdentifierType": {
+ "enum": [
+ "cpe22",
+ "cpe23",
+ "cve",
+ "email",
+ "gitoid",
+ "other",
+ "packageUrl",
+ "securityOther",
+ "swhid",
+ "swid",
+ "urlScheme"
+ ]
+ },
+ "prop_ExternalIdentifier_identifier": {
+ "type": "string"
+ },
+ "prop_ExternalIdentifier_identifierLocator": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_ExternalIdentifier_issuingAuthority": {
+ "type": "string"
+ },
+ "ExternalIdentifierType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "ExternalIdentifierType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ExternalIdentifierType_props" }
+ ]
+ },
+ "ExternalIdentifierType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ExternalIdentifierType" }
+ ]
+ },
+ { "const": "spdx:Core/ExternalIdentifierType/swhid" },
+ { "const": "spdx:Core/ExternalIdentifierType/cpe23" },
+ { "const": "spdx:Core/ExternalIdentifierType/other" },
+ { "const": "spdx:Core/ExternalIdentifierType/packageUrl" },
+ { "const": "spdx:Core/ExternalIdentifierType/cpe22" },
+ { "const": "spdx:Core/ExternalIdentifierType/gitoid" },
+ { "const": "spdx:Core/ExternalIdentifierType/cve" },
+ { "const": "spdx:Core/ExternalIdentifierType/email" },
+ { "const": "spdx:Core/ExternalIdentifierType/urlScheme" },
+ { "const": "spdx:Core/ExternalIdentifierType/securityOther" },
+ { "const": "spdx:Core/ExternalIdentifierType/swid" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ExternalIdentifierType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "ExternalMap": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNode" },
+ "type": {
+ "oneOf": [
+ { "const": "ExternalMap" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ExternalMap_props" }
+ ]
+ },
+ "ExternalMap_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ExternalMap" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ExternalMap_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "definingArtifact": {
+ "$ref": "#/$defs/prop_ExternalMap_definingArtifact"
+ },
+ "externalSpdxId": {
+ "$ref": "#/$defs/prop_ExternalMap_externalSpdxId"
+ },
+ "locationHint": {
+ "$ref": "#/$defs/prop_ExternalMap_locationHint"
+ },
+ "verifiedUsing": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ExternalMap_verifiedUsing"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "externalSpdxId"
+ ]
+ }
+ ]
+ },
+ "prop_ExternalMap_definingArtifact": {
+ "$ref": "#/$defs/Artifact_derived"
+ },
+ "prop_ExternalMap_externalSpdxId": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_ExternalMap_locationHint": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_ExternalMap_verifiedUsing": {
+ "$ref": "#/$defs/IntegrityMethod_derived"
+ },
+ "ExternalRef": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNode" },
+ "type": {
+ "oneOf": [
+ { "const": "ExternalRef" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ExternalRef_props" }
+ ]
+ },
+ "ExternalRef_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ExternalRef" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ExternalRef_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "comment": {
+ "$ref": "#/$defs/prop_ExternalRef_comment"
+ },
+ "contentType": {
+ "$ref": "#/$defs/prop_ExternalRef_contentType"
+ },
+ "externalRefType": {
+ "$ref": "#/$defs/prop_ExternalRef_externalRefType"
+ },
+ "locator": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ExternalRef_locator"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "prop_ExternalRef_comment": {
+ "type": "string"
+ },
+ "prop_ExternalRef_contentType": {
+ "pattern": "^[^\\/]+\\/[^\\/]+$",
+ "type": "string"
+ },
+ "prop_ExternalRef_externalRefType": {
+ "enum": [
+ "altDownloadLocation",
+ "altWebPage",
+ "binaryArtifact",
+ "bower",
+ "buildMeta",
+ "buildSystem",
+ "certificationReport",
+ "chat",
+ "componentAnalysisReport",
+ "cwe",
+ "documentation",
+ "dynamicAnalysisReport",
+ "eolNotice",
+ "exportControlAssessment",
+ "funding",
+ "issueTracker",
+ "license",
+ "mailingList",
+ "mavenCentral",
+ "metrics",
+ "npm",
+ "nuget",
+ "other",
+ "privacyAssessment",
+ "productMetadata",
+ "purchaseOrder",
+ "qualityAssessmentReport",
+ "releaseHistory",
+ "releaseNotes",
+ "riskAssessment",
+ "runtimeAnalysisReport",
+ "secureSoftwareAttestation",
+ "securityAdversaryModel",
+ "securityAdvisory",
+ "securityFix",
+ "securityOther",
+ "securityPenTestReport",
+ "securityPolicy",
+ "securityThreatModel",
+ "socialMedia",
+ "sourceArtifact",
+ "staticAnalysisReport",
+ "support",
+ "vcs",
+ "vulnerabilityDisclosureReport",
+ "vulnerabilityExploitabilityAssessment"
+ ]
+ },
+ "prop_ExternalRef_locator": {
+ "type": "string"
+ },
+ "ExternalRefType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "ExternalRefType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ExternalRefType_props" }
+ ]
+ },
+ "ExternalRefType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ExternalRefType" }
+ ]
+ },
+ { "const": "spdx:Core/ExternalRefType/mailingList" },
+ { "const": "spdx:Core/ExternalRefType/support" },
+ { "const": "spdx:Core/ExternalRefType/securityOther" },
+ { "const": "spdx:Core/ExternalRefType/securityFix" },
+ { "const": "spdx:Core/ExternalRefType/staticAnalysisReport" },
+ { "const": "spdx:Core/ExternalRefType/eolNotice" },
+ { "const": "spdx:Core/ExternalRefType/qualityAssessmentReport" },
+ { "const": "spdx:Core/ExternalRefType/issueTracker" },
+ { "const": "spdx:Core/ExternalRefType/purchaseOrder" },
+ { "const": "spdx:Core/ExternalRefType/license" },
+ { "const": "spdx:Core/ExternalRefType/securityAdvisory" },
+ { "const": "spdx:Core/ExternalRefType/vulnerabilityExploitabilityAssessment" },
+ { "const": "spdx:Core/ExternalRefType/certificationReport" },
+ { "const": "spdx:Core/ExternalRefType/vulnerabilityDisclosureReport" },
+ { "const": "spdx:Core/ExternalRefType/runtimeAnalysisReport" },
+ { "const": "spdx:Core/ExternalRefType/chat" },
+ { "const": "spdx:Core/ExternalRefType/vcs" },
+ { "const": "spdx:Core/ExternalRefType/other" },
+ { "const": "spdx:Core/ExternalRefType/cwe" },
+ { "const": "spdx:Core/ExternalRefType/releaseHistory" },
+ { "const": "spdx:Core/ExternalRefType/metrics" },
+ { "const": "spdx:Core/ExternalRefType/bower" },
+ { "const": "spdx:Core/ExternalRefType/securityThreatModel" },
+ { "const": "spdx:Core/ExternalRefType/exportControlAssessment" },
+ { "const": "spdx:Core/ExternalRefType/npm" },
+ { "const": "spdx:Core/ExternalRefType/buildSystem" },
+ { "const": "spdx:Core/ExternalRefType/altWebPage" },
+ { "const": "spdx:Core/ExternalRefType/binaryArtifact" },
+ { "const": "spdx:Core/ExternalRefType/releaseNotes" },
+ { "const": "spdx:Core/ExternalRefType/dynamicAnalysisReport" },
+ { "const": "spdx:Core/ExternalRefType/socialMedia" },
+ { "const": "spdx:Core/ExternalRefType/funding" },
+ { "const": "spdx:Core/ExternalRefType/privacyAssessment" },
+ { "const": "spdx:Core/ExternalRefType/riskAssessment" },
+ { "const": "spdx:Core/ExternalRefType/altDownloadLocation" },
+ { "const": "spdx:Core/ExternalRefType/productMetadata" },
+ { "const": "spdx:Core/ExternalRefType/mavenCentral" },
+ { "const": "spdx:Core/ExternalRefType/buildMeta" },
+ { "const": "spdx:Core/ExternalRefType/securityPenTestReport" },
+ { "const": "spdx:Core/ExternalRefType/nuget" },
+ { "const": "spdx:Core/ExternalRefType/componentAnalysisReport" },
+ { "const": "spdx:Core/ExternalRefType/sourceArtifact" },
+ { "const": "spdx:Core/ExternalRefType/documentation" },
+ { "const": "spdx:Core/ExternalRefType/secureSoftwareAttestation" },
+ { "const": "spdx:Core/ExternalRefType/securityPolicy" },
+ { "const": "spdx:Core/ExternalRefType/securityAdversaryModel" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ExternalRefType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "HashAlgorithm": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "HashAlgorithm" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/HashAlgorithm_props" }
+ ]
+ },
+ "HashAlgorithm_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/HashAlgorithm" }
+ ]
+ },
+ { "const": "spdx:Core/HashAlgorithm/sha512" },
+ { "const": "spdx:Core/HashAlgorithm/md4" },
+ { "const": "spdx:Core/HashAlgorithm/sha224" },
+ { "const": "spdx:Core/HashAlgorithm/sha3_224" },
+ { "const": "spdx:Core/HashAlgorithm/blake2b384" },
+ { "const": "spdx:Core/HashAlgorithm/sha1" },
+ { "const": "spdx:Core/HashAlgorithm/blake2b256" },
+ { "const": "spdx:Core/HashAlgorithm/md2" },
+ { "const": "spdx:Core/HashAlgorithm/sha256" },
+ { "const": "spdx:Core/HashAlgorithm/sha3_512" },
+ { "const": "spdx:Core/HashAlgorithm/md6" },
+ { "const": "spdx:Core/HashAlgorithm/crystalsKyber" },
+ { "const": "spdx:Core/HashAlgorithm/crystalsDilithium" },
+ { "const": "spdx:Core/HashAlgorithm/sha3_256" },
+ { "const": "spdx:Core/HashAlgorithm/falcon" },
+ { "const": "spdx:Core/HashAlgorithm/adler32" },
+ { "const": "spdx:Core/HashAlgorithm/blake3" },
+ { "const": "spdx:Core/HashAlgorithm/sha384" },
+ { "const": "spdx:Core/HashAlgorithm/sha3_384" },
+ { "const": "spdx:Core/HashAlgorithm/other" },
+ { "const": "spdx:Core/HashAlgorithm/md5" },
+ { "const": "spdx:Core/HashAlgorithm/blake2b512" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "HashAlgorithm_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "IntegrityMethod_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/Hash" },
+ { "$ref": "#/$defs/PackageVerificationCode" },
+ { "$ref": "#/$defs/software_ContentIdentifier" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "IntegrityMethod_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "comment": {
+ "$ref": "#/$defs/prop_IntegrityMethod_comment"
+ }
+ }
+ }
+ ]
+ },
+ "prop_IntegrityMethod_comment": {
+ "type": "string"
+ },
+ "LifecycleScopeType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "LifecycleScopeType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/LifecycleScopeType_props" }
+ ]
+ },
+ "LifecycleScopeType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/LifecycleScopeType" }
+ ]
+ },
+ { "const": "spdx:Core/LifecycleScopeType/build" },
+ { "const": "spdx:Core/LifecycleScopeType/other" },
+ { "const": "spdx:Core/LifecycleScopeType/test" },
+ { "const": "spdx:Core/LifecycleScopeType/design" },
+ { "const": "spdx:Core/LifecycleScopeType/development" },
+ { "const": "spdx:Core/LifecycleScopeType/runtime" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "LifecycleScopeType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "NamespaceMap": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNode" },
+ "type": {
+ "oneOf": [
+ { "const": "NamespaceMap" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/NamespaceMap_props" }
+ ]
+ },
+ "NamespaceMap_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/NamespaceMap" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "NamespaceMap_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "namespace": {
+ "$ref": "#/$defs/prop_NamespaceMap_namespace"
+ },
+ "prefix": {
+ "$ref": "#/$defs/prop_NamespaceMap_prefix"
+ }
+ },
+ "required": [
+ "namespace",
+ "prefix"
+ ]
+ }
+ ]
+ },
+ "prop_NamespaceMap_namespace": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_NamespaceMap_prefix": {
+ "type": "string"
+ },
+ "PackageVerificationCode": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNode" },
+ "type": {
+ "oneOf": [
+ { "const": "PackageVerificationCode" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/PackageVerificationCode_props" }
+ ]
+ },
+ "PackageVerificationCode_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/PackageVerificationCode" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "PackageVerificationCode_props": {
+ "allOf": [
+ { "$ref": "#/$defs/IntegrityMethod_props" },
+ {
+ "type": "object",
+ "properties": {
+ "algorithm": {
+ "$ref": "#/$defs/prop_PackageVerificationCode_algorithm"
+ },
+ "hashValue": {
+ "$ref": "#/$defs/prop_PackageVerificationCode_hashValue"
+ },
+ "packageVerificationCodeExcludedFile": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_PackageVerificationCode_packageVerificationCodeExcludedFile"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "algorithm",
+ "hashValue"
+ ]
+ }
+ ]
+ },
+ "prop_PackageVerificationCode_algorithm": {
+ "enum": [
+ "adler32",
+ "blake2b256",
+ "blake2b384",
+ "blake2b512",
+ "blake3",
+ "crystalsDilithium",
+ "crystalsKyber",
+ "falcon",
+ "md2",
+ "md4",
+ "md5",
+ "md6",
+ "other",
+ "sha1",
+ "sha224",
+ "sha256",
+ "sha384",
+ "sha3_224",
+ "sha3_256",
+ "sha3_384",
+ "sha3_512",
+ "sha512"
+ ]
+ },
+ "prop_PackageVerificationCode_hashValue": {
+ "type": "string"
+ },
+ "prop_PackageVerificationCode_packageVerificationCodeExcludedFile": {
+ "type": "string"
+ },
+ "PositiveIntegerRange": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNode" },
+ "type": {
+ "oneOf": [
+ { "const": "PositiveIntegerRange" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/PositiveIntegerRange_props" }
+ ]
+ },
+ "PositiveIntegerRange_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/PositiveIntegerRange" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "PositiveIntegerRange_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "beginIntegerRange": {
+ "$ref": "#/$defs/prop_PositiveIntegerRange_beginIntegerRange"
+ },
+ "endIntegerRange": {
+ "$ref": "#/$defs/prop_PositiveIntegerRange_endIntegerRange"
+ }
+ },
+ "required": [
+ "beginIntegerRange",
+ "endIntegerRange"
+ ]
+ }
+ ]
+ },
+ "prop_PositiveIntegerRange_beginIntegerRange": {
+ "type": "integer",
+ "minimum": 1
+ },
+ "prop_PositiveIntegerRange_endIntegerRange": {
+ "type": "integer",
+ "minimum": 1
+ },
+ "PresenceType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "PresenceType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/PresenceType_props" }
+ ]
+ },
+ "PresenceType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/PresenceType" }
+ ]
+ },
+ { "const": "spdx:Core/PresenceType/yes" },
+ { "const": "spdx:Core/PresenceType/no" },
+ { "const": "spdx:Core/PresenceType/noAssertion" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "PresenceType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "ProfileIdentifierType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "ProfileIdentifierType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/ProfileIdentifierType_props" }
+ ]
+ },
+ "ProfileIdentifierType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ProfileIdentifierType" }
+ ]
+ },
+ { "const": "spdx:Core/ProfileIdentifierType/core" },
+ { "const": "spdx:Core/ProfileIdentifierType/dataset" },
+ { "const": "spdx:Core/ProfileIdentifierType/lite" },
+ { "const": "spdx:Core/ProfileIdentifierType/expandedLicensing" },
+ { "const": "spdx:Core/ProfileIdentifierType/software" },
+ { "const": "spdx:Core/ProfileIdentifierType/simpleLicensing" },
+ { "const": "spdx:Core/ProfileIdentifierType/build" },
+ { "const": "spdx:Core/ProfileIdentifierType/ai" },
+ { "const": "spdx:Core/ProfileIdentifierType/extension" },
+ { "const": "spdx:Core/ProfileIdentifierType/security" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ProfileIdentifierType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "Relationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "Relationship" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/Relationship_props" }
+ ]
+ },
+ "Relationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/LifecycleScopedRelationship" },
+ { "$ref": "#/$defs/security_CvssV2VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_CvssV3VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_CvssV4VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_EpssVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_ExploitCatalogVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_SsvcVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexFixedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexNotAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexUnderInvestigationVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/Relationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Relationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ "completeness": {
+ "$ref": "#/$defs/prop_Relationship_completeness"
+ },
+ "endTime": {
+ "$ref": "#/$defs/prop_Relationship_endTime"
+ },
+ "from": {
+ "$ref": "#/$defs/prop_Relationship_from_"
+ },
+ "relationshipType": {
+ "$ref": "#/$defs/prop_Relationship_relationshipType"
+ },
+ "startTime": {
+ "$ref": "#/$defs/prop_Relationship_startTime"
+ },
+ "to": {
+ "oneOf": [
+ {
+ "type": "array",
+ "minItems": 1,
+ "items": {
+ "$ref": "#/$defs/prop_Relationship_to"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "from",
+ "relationshipType",
+ "to"
+ ]
+ }
+ ]
+ },
+ "prop_Relationship_completeness": {
+ "enum": [
+ "complete",
+ "incomplete",
+ "noAssertion"
+ ]
+ },
+ "prop_Relationship_endTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_Relationship_from_": {
+ "$ref": "#/$defs/Element_derived"
+ },
+ "prop_Relationship_relationshipType": {
+ "enum": [
+ "affects",
+ "amendedBy",
+ "ancestorOf",
+ "availableFrom",
+ "configures",
+ "contains",
+ "coordinatedBy",
+ "copiedTo",
+ "delegatedTo",
+ "dependsOn",
+ "descendantOf",
+ "describes",
+ "doesNotAffect",
+ "expandsTo",
+ "exploitCreatedBy",
+ "fixedBy",
+ "fixedIn",
+ "foundBy",
+ "generates",
+ "hasAddedFile",
+ "hasAssessmentFor",
+ "hasAssociatedVulnerability",
+ "hasConcludedLicense",
+ "hasDataFile",
+ "hasDeclaredLicense",
+ "hasDeletedFile",
+ "hasDependencyManifest",
+ "hasDistributionArtifact",
+ "hasDocumentation",
+ "hasDynamicLink",
+ "hasEvidence",
+ "hasExample",
+ "hasHost",
+ "hasInput",
+ "hasMetadata",
+ "hasOptionalComponent",
+ "hasOptionalDependency",
+ "hasOutput",
+ "hasPrerequisite",
+ "hasProvidedDependency",
+ "hasRequirement",
+ "hasSpecification",
+ "hasStaticLink",
+ "hasTest",
+ "hasTestCase",
+ "hasVariant",
+ "invokedBy",
+ "modifiedBy",
+ "other",
+ "packagedBy",
+ "patchedBy",
+ "publishedBy",
+ "reportedBy",
+ "republishedBy",
+ "serializedInArtifact",
+ "testedOn",
+ "trainedOn",
+ "underInvestigationFor",
+ "usesTool"
+ ]
+ },
+ "prop_Relationship_startTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_Relationship_to": {
+ "$ref": "#/$defs/Element_derived"
+ },
+ "RelationshipCompleteness": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "RelationshipCompleteness" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/RelationshipCompleteness_props" }
+ ]
+ },
+ "RelationshipCompleteness_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/RelationshipCompleteness" }
+ ]
+ },
+ { "const": "spdx:Core/RelationshipCompleteness/incomplete" },
+ { "const": "spdx:Core/RelationshipCompleteness/complete" },
+ { "const": "spdx:Core/RelationshipCompleteness/noAssertion" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "RelationshipCompleteness_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "RelationshipType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "RelationshipType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/RelationshipType_props" }
+ ]
+ },
+ "RelationshipType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/RelationshipType" }
+ ]
+ },
+ { "const": "spdx:Core/RelationshipType/hasAssessmentFor" },
+ { "const": "spdx:Core/RelationshipType/publishedBy" },
+ { "const": "spdx:Core/RelationshipType/hasHost" },
+ { "const": "spdx:Core/RelationshipType/trainedOn" },
+ { "const": "spdx:Core/RelationshipType/hasOutput" },
+ { "const": "spdx:Core/RelationshipType/hasDynamicLink" },
+ { "const": "spdx:Core/RelationshipType/exploitCreatedBy" },
+ { "const": "spdx:Core/RelationshipType/hasDocumentation" },
+ { "const": "spdx:Core/RelationshipType/hasStaticLink" },
+ { "const": "spdx:Core/RelationshipType/hasAddedFile" },
+ { "const": "spdx:Core/RelationshipType/configures" },
+ { "const": "spdx:Core/RelationshipType/coordinatedBy" },
+ { "const": "spdx:Core/RelationshipType/hasConcludedLicense" },
+ { "const": "spdx:Core/RelationshipType/hasDependencyManifest" },
+ { "const": "spdx:Core/RelationshipType/serializedInArtifact" },
+ { "const": "spdx:Core/RelationshipType/hasTestCase" },
+ { "const": "spdx:Core/RelationshipType/hasDataFile" },
+ { "const": "spdx:Core/RelationshipType/usesTool" },
+ { "const": "spdx:Core/RelationshipType/dependsOn" },
+ { "const": "spdx:Core/RelationshipType/affects" },
+ { "const": "spdx:Core/RelationshipType/hasExample" },
+ { "const": "spdx:Core/RelationshipType/hasInput" },
+ { "const": "spdx:Core/RelationshipType/hasVariant" },
+ { "const": "spdx:Core/RelationshipType/contains" },
+ { "const": "spdx:Core/RelationshipType/hasRequirement" },
+ { "const": "spdx:Core/RelationshipType/other" },
+ { "const": "spdx:Core/RelationshipType/testedOn" },
+ { "const": "spdx:Core/RelationshipType/hasMetadata" },
+ { "const": "spdx:Core/RelationshipType/delegatedTo" },
+ { "const": "spdx:Core/RelationshipType/hasDistributionArtifact" },
+ { "const": "spdx:Core/RelationshipType/reportedBy" },
+ { "const": "spdx:Core/RelationshipType/hasOptionalComponent" },
+ { "const": "spdx:Core/RelationshipType/generates" },
+ { "const": "spdx:Core/RelationshipType/amendedBy" },
+ { "const": "spdx:Core/RelationshipType/patchedBy" },
+ { "const": "spdx:Core/RelationshipType/hasProvidedDependency" },
+ { "const": "spdx:Core/RelationshipType/describes" },
+ { "const": "spdx:Core/RelationshipType/ancestorOf" },
+ { "const": "spdx:Core/RelationshipType/copiedTo" },
+ { "const": "spdx:Core/RelationshipType/hasPrerequisite" },
+ { "const": "spdx:Core/RelationshipType/descendantOf" },
+ { "const": "spdx:Core/RelationshipType/packagedBy" },
+ { "const": "spdx:Core/RelationshipType/republishedBy" },
+ { "const": "spdx:Core/RelationshipType/hasSpecification" },
+ { "const": "spdx:Core/RelationshipType/hasAssociatedVulnerability" },
+ { "const": "spdx:Core/RelationshipType/availableFrom" },
+ { "const": "spdx:Core/RelationshipType/fixedIn" },
+ { "const": "spdx:Core/RelationshipType/hasTest" },
+ { "const": "spdx:Core/RelationshipType/modifiedBy" },
+ { "const": "spdx:Core/RelationshipType/hasOptionalDependency" },
+ { "const": "spdx:Core/RelationshipType/hasDeletedFile" },
+ { "const": "spdx:Core/RelationshipType/hasEvidence" },
+ { "const": "spdx:Core/RelationshipType/underInvestigationFor" },
+ { "const": "spdx:Core/RelationshipType/hasDeclaredLicense" },
+ { "const": "spdx:Core/RelationshipType/doesNotAffect" },
+ { "const": "spdx:Core/RelationshipType/foundBy" },
+ { "const": "spdx:Core/RelationshipType/invokedBy" },
+ { "const": "spdx:Core/RelationshipType/expandsTo" },
+ { "const": "spdx:Core/RelationshipType/fixedBy" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "RelationshipType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "SpdxDocument": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "SpdxDocument" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/SpdxDocument_props" }
+ ]
+ },
+ "SpdxDocument_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/SpdxDocument" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "SpdxDocument_props": {
+ "allOf": [
+ { "$ref": "#/$defs/ElementCollection_props" },
+ {
+ "type": "object",
+ "properties": {
+ "dataLicense": {
+ "$ref": "#/$defs/prop_SpdxDocument_dataLicense"
+ },
+ "import": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_SpdxDocument_import_"
+ }
+ }
+ ]
+ },
+ "namespaceMap": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_SpdxDocument_namespaceMap"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "prop_SpdxDocument_dataLicense": {
+ "$ref": "#/$defs/simplelicensing_AnyLicenseInfo_derived"
+ },
+ "prop_SpdxDocument_import_": {
+ "$ref": "#/$defs/ExternalMap_derived"
+ },
+ "prop_SpdxDocument_namespaceMap": {
+ "$ref": "#/$defs/NamespaceMap_derived"
+ },
+ "SupportType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "SupportType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/SupportType_props" }
+ ]
+ },
+ "SupportType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/SupportType" }
+ ]
+ },
+ { "const": "spdx:Core/SupportType/noAssertion" },
+ { "const": "spdx:Core/SupportType/limitedSupport" },
+ { "const": "spdx:Core/SupportType/deployed" },
+ { "const": "spdx:Core/SupportType/support" },
+ { "const": "spdx:Core/SupportType/development" },
+ { "const": "spdx:Core/SupportType/noSupport" },
+ { "const": "spdx:Core/SupportType/endOfSupport" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "SupportType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "Tool": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "Tool" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/Tool_props" }
+ ]
+ },
+ "Tool_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/Tool" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Tool_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "dataset_ConfidentialityLevelType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "dataset_ConfidentialityLevelType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/dataset_ConfidentialityLevelType_props" }
+ ]
+ },
+ "dataset_ConfidentialityLevelType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/dataset_ConfidentialityLevelType" }
+ ]
+ },
+ { "const": "spdx:Dataset/ConfidentialityLevelType/green" },
+ { "const": "spdx:Dataset/ConfidentialityLevelType/red" },
+ { "const": "spdx:Dataset/ConfidentialityLevelType/amber" },
+ { "const": "spdx:Dataset/ConfidentialityLevelType/clear" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "dataset_ConfidentialityLevelType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "dataset_DatasetAvailabilityType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "dataset_DatasetAvailabilityType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/dataset_DatasetAvailabilityType_props" }
+ ]
+ },
+ "dataset_DatasetAvailabilityType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/dataset_DatasetAvailabilityType" }
+ ]
+ },
+ { "const": "spdx:Dataset/DatasetAvailabilityType/clickthrough" },
+ { "const": "spdx:Dataset/DatasetAvailabilityType/query" },
+ { "const": "spdx:Dataset/DatasetAvailabilityType/scrapingScript" },
+ { "const": "spdx:Dataset/DatasetAvailabilityType/registration" },
+ { "const": "spdx:Dataset/DatasetAvailabilityType/directDownload" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "dataset_DatasetAvailabilityType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "dataset_DatasetType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "dataset_DatasetType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/dataset_DatasetType_props" }
+ ]
+ },
+ "dataset_DatasetType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/dataset_DatasetType" }
+ ]
+ },
+ { "const": "spdx:Dataset/DatasetType/audio" },
+ { "const": "spdx:Dataset/DatasetType/graph" },
+ { "const": "spdx:Dataset/DatasetType/video" },
+ { "const": "spdx:Dataset/DatasetType/syntactic" },
+ { "const": "spdx:Dataset/DatasetType/categorical" },
+ { "const": "spdx:Dataset/DatasetType/timestamp" },
+ { "const": "spdx:Dataset/DatasetType/timeseries" },
+ { "const": "spdx:Dataset/DatasetType/image" },
+ { "const": "spdx:Dataset/DatasetType/structured" },
+ { "const": "spdx:Dataset/DatasetType/noAssertion" },
+ { "const": "spdx:Dataset/DatasetType/sensor" },
+ { "const": "spdx:Dataset/DatasetType/numeric" },
+ { "const": "spdx:Dataset/DatasetType/other" },
+ { "const": "spdx:Dataset/DatasetType/text" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "dataset_DatasetType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "expandedlicensing_LicenseAddition_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_CustomLicenseAddition" },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicenseException" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_LicenseAddition_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ "expandedlicensing_additionText": {
+ "$ref": "#/$defs/prop_expandedlicensing_LicenseAddition_expandedlicensing_additionText"
+ },
+ "expandedlicensing_isDeprecatedAdditionId": {
+ "$ref": "#/$defs/prop_expandedlicensing_LicenseAddition_expandedlicensing_isDeprecatedAdditionId"
+ },
+ "expandedlicensing_licenseXml": {
+ "$ref": "#/$defs/prop_expandedlicensing_LicenseAddition_expandedlicensing_licenseXml"
+ },
+ "expandedlicensing_obsoletedBy": {
+ "$ref": "#/$defs/prop_expandedlicensing_LicenseAddition_expandedlicensing_obsoletedBy"
+ },
+ "expandedlicensing_seeAlso": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_expandedlicensing_LicenseAddition_expandedlicensing_seeAlso"
+ }
+ }
+ ]
+ },
+ "expandedlicensing_standardAdditionTemplate": {
+ "$ref": "#/$defs/prop_expandedlicensing_LicenseAddition_expandedlicensing_standardAdditionTemplate"
+ }
+ },
+ "required": [
+ "expandedlicensing_additionText"
+ ]
+ }
+ ]
+ },
+ "prop_expandedlicensing_LicenseAddition_expandedlicensing_additionText": {
+ "type": "string"
+ },
+ "prop_expandedlicensing_LicenseAddition_expandedlicensing_isDeprecatedAdditionId": {
+ "type": "boolean"
+ },
+ "prop_expandedlicensing_LicenseAddition_expandedlicensing_licenseXml": {
+ "type": "string"
+ },
+ "prop_expandedlicensing_LicenseAddition_expandedlicensing_obsoletedBy": {
+ "type": "string"
+ },
+ "prop_expandedlicensing_LicenseAddition_expandedlicensing_seeAlso": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_expandedlicensing_LicenseAddition_expandedlicensing_standardAdditionTemplate": {
+ "type": "string"
+ },
+ "expandedlicensing_ListedLicenseException": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_ListedLicenseException" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicenseException_props" }
+ ]
+ },
+ "expandedlicensing_ListedLicenseException_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_ListedLicenseException" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_ListedLicenseException_props": {
+ "allOf": [
+ { "$ref": "#/$defs/expandedlicensing_LicenseAddition_props" },
+ {
+ "type": "object",
+ "properties": {
+ "expandedlicensing_deprecatedVersion": {
+ "$ref": "#/$defs/prop_expandedlicensing_ListedLicenseException_expandedlicensing_deprecatedVersion"
+ },
+ "expandedlicensing_listVersionAdded": {
+ "$ref": "#/$defs/prop_expandedlicensing_ListedLicenseException_expandedlicensing_listVersionAdded"
+ }
+ }
+ }
+ ]
+ },
+ "prop_expandedlicensing_ListedLicenseException_expandedlicensing_deprecatedVersion": {
+ "type": "string"
+ },
+ "prop_expandedlicensing_ListedLicenseException_expandedlicensing_listVersionAdded": {
+ "type": "string"
+ },
+ "extension_CdxPropertyEntry": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNode" },
+ "type": {
+ "oneOf": [
+ { "const": "extension_CdxPropertyEntry" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/extension_CdxPropertyEntry_props" }
+ ]
+ },
+ "extension_CdxPropertyEntry_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/extension_CdxPropertyEntry" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "extension_CdxPropertyEntry_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ "extension_cdxPropName": {
+ "$ref": "#/$defs/prop_extension_CdxPropertyEntry_extension_cdxPropName"
+ },
+ "extension_cdxPropValue": {
+ "$ref": "#/$defs/prop_extension_CdxPropertyEntry_extension_cdxPropValue"
+ }
+ },
+ "required": [
+ "extension_cdxPropName"
+ ]
+ }
+ ]
+ },
+ "prop_extension_CdxPropertyEntry_extension_cdxPropName": {
+ "type": "string"
+ },
+ "prop_extension_CdxPropertyEntry_extension_cdxPropValue": {
+ "type": "string"
+ },
+ "extension_Extension_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/extension_CdxPropertiesExtension" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "extension_Extension_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "security_CvssSeverityType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_CvssSeverityType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_CvssSeverityType_props" }
+ ]
+ },
+ "security_CvssSeverityType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_CvssSeverityType" }
+ ]
+ },
+ { "const": "spdx:Security/CvssSeverityType/low" },
+ { "const": "spdx:Security/CvssSeverityType/none" },
+ { "const": "spdx:Security/CvssSeverityType/critical" },
+ { "const": "spdx:Security/CvssSeverityType/medium" },
+ { "const": "spdx:Security/CvssSeverityType/high" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_CvssSeverityType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "security_ExploitCatalogType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_ExploitCatalogType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_ExploitCatalogType_props" }
+ ]
+ },
+ "security_ExploitCatalogType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_ExploitCatalogType" }
+ ]
+ },
+ { "const": "spdx:Security/ExploitCatalogType/kev" },
+ { "const": "spdx:Security/ExploitCatalogType/other" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_ExploitCatalogType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "security_SsvcDecisionType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_SsvcDecisionType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_SsvcDecisionType_props" }
+ ]
+ },
+ "security_SsvcDecisionType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_SsvcDecisionType" }
+ ]
+ },
+ { "const": "spdx:Security/SsvcDecisionType/attend" },
+ { "const": "spdx:Security/SsvcDecisionType/act" },
+ { "const": "spdx:Security/SsvcDecisionType/track" },
+ { "const": "spdx:Security/SsvcDecisionType/trackStar" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_SsvcDecisionType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "security_VexJustificationType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_VexJustificationType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/security_VexJustificationType_props" }
+ ]
+ },
+ "security_VexJustificationType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_VexJustificationType" }
+ ]
+ },
+ { "const": "spdx:Security/VexJustificationType/vulnerableCodeNotInExecutePath" },
+ { "const": "spdx:Security/VexJustificationType/componentNotPresent" },
+ { "const": "spdx:Security/VexJustificationType/vulnerableCodeNotPresent" },
+ { "const": "spdx:Security/VexJustificationType/inlineMitigationsAlreadyExist" },
+ { "const": "spdx:Security/VexJustificationType/vulnerableCodeCannotBeControlledByAdversary" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_VexJustificationType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "security_VulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_CvssV2VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_CvssV3VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_CvssV4VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_EpssVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_ExploitCatalogVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_SsvcVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexFixedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexNotAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexUnderInvestigationVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_VulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Relationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "suppliedBy": {
+ "$ref": "#/$defs/prop_security_VulnAssessmentRelationship_suppliedBy"
+ },
+ "security_assessedElement": {
+ "$ref": "#/$defs/prop_security_VulnAssessmentRelationship_security_assessedElement"
+ },
+ "security_modifiedTime": {
+ "$ref": "#/$defs/prop_security_VulnAssessmentRelationship_security_modifiedTime"
+ },
+ "security_publishedTime": {
+ "$ref": "#/$defs/prop_security_VulnAssessmentRelationship_security_publishedTime"
+ },
+ "security_withdrawnTime": {
+ "$ref": "#/$defs/prop_security_VulnAssessmentRelationship_security_withdrawnTime"
+ }
+ }
+ }
+ ]
+ },
+ "prop_security_VulnAssessmentRelationship_suppliedBy": {
+ "$ref": "#/$defs/Agent_derived"
+ },
+ "prop_security_VulnAssessmentRelationship_security_assessedElement": {
+ "$ref": "#/$defs/Element_derived"
+ },
+ "prop_security_VulnAssessmentRelationship_security_modifiedTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_security_VulnAssessmentRelationship_security_publishedTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_security_VulnAssessmentRelationship_security_withdrawnTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "simplelicensing_AnyLicenseInfo_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_ConjunctiveLicenseSet" },
+ { "$ref": "#/$defs/expandedlicensing_CustomLicense" },
+ { "$ref": "#/$defs/expandedlicensing_DisjunctiveLicenseSet" },
+ { "$ref": "#/$defs/expandedlicensing_IndividualLicensingInfo" },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicense" },
+ { "$ref": "#/$defs/expandedlicensing_OrLaterOperator" },
+ { "$ref": "#/$defs/expandedlicensing_WithAdditionOperator" },
+ { "$ref": "#/$defs/simplelicensing_LicenseExpression" }
+ ]
+ },
+ { "const": "spdx:ExpandedLicensing/NoAssertionLicense" },
+ { "const": "spdx:ExpandedLicensing/NoneLicense" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "simplelicensing_AnyLicenseInfo_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "simplelicensing_LicenseExpression": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "simplelicensing_LicenseExpression" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/simplelicensing_LicenseExpression_props" }
+ ]
+ },
+ "simplelicensing_LicenseExpression_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/simplelicensing_LicenseExpression" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "simplelicensing_LicenseExpression_props": {
+ "allOf": [
+ { "$ref": "#/$defs/simplelicensing_AnyLicenseInfo_props" },
+ {
+ "type": "object",
+ "properties": {
+ "simplelicensing_customIdToUri": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_simplelicensing_LicenseExpression_simplelicensing_customIdToUri"
+ }
+ }
+ ]
+ },
+ "simplelicensing_licenseExpression": {
+ "$ref": "#/$defs/prop_simplelicensing_LicenseExpression_simplelicensing_licenseExpression"
+ },
+ "simplelicensing_licenseListVersion": {
+ "$ref": "#/$defs/prop_simplelicensing_LicenseExpression_simplelicensing_licenseListVersion"
+ }
+ },
+ "required": [
+ "simplelicensing_licenseExpression"
+ ]
+ }
+ ]
+ },
+ "prop_simplelicensing_LicenseExpression_simplelicensing_customIdToUri": {
+ "$ref": "#/$defs/DictionaryEntry_derived"
+ },
+ "prop_simplelicensing_LicenseExpression_simplelicensing_licenseExpression": {
+ "type": "string"
+ },
+ "prop_simplelicensing_LicenseExpression_simplelicensing_licenseListVersion": {
+ "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
+ "type": "string"
+ },
+ "simplelicensing_SimpleLicensingText": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "simplelicensing_SimpleLicensingText" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/simplelicensing_SimpleLicensingText_props" }
+ ]
+ },
+ "simplelicensing_SimpleLicensingText_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/simplelicensing_SimpleLicensingText" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "simplelicensing_SimpleLicensingText_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ "simplelicensing_licenseText": {
+ "$ref": "#/$defs/prop_simplelicensing_SimpleLicensingText_simplelicensing_licenseText"
+ }
+ },
+ "required": [
+ "simplelicensing_licenseText"
+ ]
+ }
+ ]
+ },
+ "prop_simplelicensing_SimpleLicensingText_simplelicensing_licenseText": {
+ "type": "string"
+ },
+ "software_ContentIdentifier": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNode" },
+ "type": {
+ "oneOf": [
+ { "const": "software_ContentIdentifier" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/software_ContentIdentifier_props" }
+ ]
+ },
+ "software_ContentIdentifier_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/software_ContentIdentifier" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_ContentIdentifier_props": {
+ "allOf": [
+ { "$ref": "#/$defs/IntegrityMethod_props" },
+ {
+ "type": "object",
+ "properties": {
+ "software_contentIdentifierType": {
+ "$ref": "#/$defs/prop_software_ContentIdentifier_software_contentIdentifierType"
+ },
+ "software_contentIdentifierValue": {
+ "$ref": "#/$defs/prop_software_ContentIdentifier_software_contentIdentifierValue"
+ }
+ },
+ "required": [
+ "software_contentIdentifierType",
+ "software_contentIdentifierValue"
+ ]
+ }
+ ]
+ },
+ "prop_software_ContentIdentifier_software_contentIdentifierType": {
+ "enum": [
+ "gitoid",
+ "swhid"
+ ]
+ },
+ "prop_software_ContentIdentifier_software_contentIdentifierValue": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "software_ContentIdentifierType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "software_ContentIdentifierType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/software_ContentIdentifierType_props" }
+ ]
+ },
+ "software_ContentIdentifierType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/software_ContentIdentifierType" }
+ ]
+ },
+ { "const": "spdx:Software/ContentIdentifierType/swhid" },
+ { "const": "spdx:Software/ContentIdentifierType/gitoid" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_ContentIdentifierType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "software_FileKindType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "software_FileKindType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/software_FileKindType_props" }
+ ]
+ },
+ "software_FileKindType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/software_FileKindType" }
+ ]
+ },
+ { "const": "spdx:Software/FileKindType/file" },
+ { "const": "spdx:Software/FileKindType/directory" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_FileKindType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "software_SbomType": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "software_SbomType" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/software_SbomType_props" }
+ ]
+ },
+ "software_SbomType_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/software_SbomType" }
+ ]
+ },
+ { "const": "spdx:Software/SbomType/design" },
+ { "const": "spdx:Software/SbomType/deployed" },
+ { "const": "spdx:Software/SbomType/analyzed" },
+ { "const": "spdx:Software/SbomType/runtime" },
+ { "const": "spdx:Software/SbomType/source" },
+ { "const": "spdx:Software/SbomType/build" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_SbomType_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "software_SoftwarePurpose": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNodeOrIRI" },
+ "type": {
+ "oneOf": [
+ { "const": "software_SoftwarePurpose" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/software_SoftwarePurpose_props" }
+ ]
+ },
+ "software_SoftwarePurpose_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/software_SoftwarePurpose" }
+ ]
+ },
+ { "const": "spdx:Software/SoftwarePurpose/file" },
+ { "const": "spdx:Software/SoftwarePurpose/other" },
+ { "const": "spdx:Software/SoftwarePurpose/specification" },
+ { "const": "spdx:Software/SoftwarePurpose/bom" },
+ { "const": "spdx:Software/SoftwarePurpose/container" },
+ { "const": "spdx:Software/SoftwarePurpose/platform" },
+ { "const": "spdx:Software/SoftwarePurpose/device" },
+ { "const": "spdx:Software/SoftwarePurpose/firmware" },
+ { "const": "spdx:Software/SoftwarePurpose/install" },
+ { "const": "spdx:Software/SoftwarePurpose/source" },
+ { "const": "spdx:Software/SoftwarePurpose/diskImage" },
+ { "const": "spdx:Software/SoftwarePurpose/configuration" },
+ { "const": "spdx:Software/SoftwarePurpose/module" },
+ { "const": "spdx:Software/SoftwarePurpose/archive" },
+ { "const": "spdx:Software/SoftwarePurpose/application" },
+ { "const": "spdx:Software/SoftwarePurpose/operatingSystem" },
+ { "const": "spdx:Software/SoftwarePurpose/executable" },
+ { "const": "spdx:Software/SoftwarePurpose/library" },
+ { "const": "spdx:Software/SoftwarePurpose/evidence" },
+ { "const": "spdx:Software/SoftwarePurpose/manifest" },
+ { "const": "spdx:Software/SoftwarePurpose/model" },
+ { "const": "spdx:Software/SoftwarePurpose/requirement" },
+ { "const": "spdx:Software/SoftwarePurpose/filesystemImage" },
+ { "const": "spdx:Software/SoftwarePurpose/documentation" },
+ { "const": "spdx:Software/SoftwarePurpose/test" },
+ { "const": "spdx:Software/SoftwarePurpose/framework" },
+ { "const": "spdx:Software/SoftwarePurpose/data" },
+ { "const": "spdx:Software/SoftwarePurpose/deviceDriver" },
+ { "const": "spdx:Software/SoftwarePurpose/patch" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_SoftwarePurpose_props": {
+ "allOf": [
+ { "$ref": "#/$defs/SHACLClass" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "build_Build": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "build_Build" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/build_Build_props" }
+ ]
+ },
+ "build_Build_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/build_Build" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "build_Build_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ "build_buildEndTime": {
+ "$ref": "#/$defs/prop_build_Build_build_buildEndTime"
+ },
+ "build_buildId": {
+ "$ref": "#/$defs/prop_build_Build_build_buildId"
+ },
+ "build_buildStartTime": {
+ "$ref": "#/$defs/prop_build_Build_build_buildStartTime"
+ },
+ "build_buildType": {
+ "$ref": "#/$defs/prop_build_Build_build_buildType"
+ },
+ "build_configSourceDigest": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_build_Build_build_configSourceDigest"
+ }
+ }
+ ]
+ },
+ "build_configSourceEntrypoint": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_build_Build_build_configSourceEntrypoint"
+ }
+ }
+ ]
+ },
+ "build_configSourceUri": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_build_Build_build_configSourceUri"
+ }
+ }
+ ]
+ },
+ "build_environment": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_build_Build_build_environment"
+ }
+ }
+ ]
+ },
+ "build_parameter": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_build_Build_build_parameter"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "build_buildType"
+ ]
+ }
+ ]
+ },
+ "prop_build_Build_build_buildEndTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_build_Build_build_buildId": {
+ "type": "string"
+ },
+ "prop_build_Build_build_buildStartTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_build_Build_build_buildType": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_build_Build_build_configSourceDigest": {
+ "$ref": "#/$defs/Hash_derived"
+ },
+ "prop_build_Build_build_configSourceEntrypoint": {
+ "type": "string"
+ },
+ "prop_build_Build_build_configSourceUri": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_build_Build_build_environment": {
+ "$ref": "#/$defs/DictionaryEntry_derived"
+ },
+ "prop_build_Build_build_parameter": {
+ "$ref": "#/$defs/DictionaryEntry_derived"
+ },
+ "Agent": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "Agent" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/Agent_props" }
+ ]
+ },
+ "Agent_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/Organization" },
+ { "$ref": "#/$defs/Person" },
+ { "$ref": "#/$defs/SoftwareAgent" },
+ { "$ref": "#/$defs/Agent" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Agent_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "Annotation": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "Annotation" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/Annotation_props" }
+ ]
+ },
+ "Annotation_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/Annotation" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Annotation_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ "annotationType": {
+ "$ref": "#/$defs/prop_Annotation_annotationType"
+ },
+ "contentType": {
+ "$ref": "#/$defs/prop_Annotation_contentType"
+ },
+ "statement": {
+ "$ref": "#/$defs/prop_Annotation_statement"
+ },
+ "subject": {
+ "$ref": "#/$defs/prop_Annotation_subject"
+ }
+ },
+ "required": [
+ "annotationType",
+ "subject"
+ ]
+ }
+ ]
+ },
+ "prop_Annotation_annotationType": {
+ "enum": [
+ "other",
+ "review"
+ ]
+ },
+ "prop_Annotation_contentType": {
+ "pattern": "^[^\\/]+\\/[^\\/]+$",
+ "type": "string"
+ },
+ "prop_Annotation_statement": {
+ "type": "string"
+ },
+ "prop_Annotation_subject": {
+ "$ref": "#/$defs/Element_derived"
+ },
+ "Artifact_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ai_AIPackage" },
+ { "$ref": "#/$defs/dataset_DatasetPackage" },
+ { "$ref": "#/$defs/security_Vulnerability" },
+ { "$ref": "#/$defs/software_File" },
+ { "$ref": "#/$defs/software_Package" },
+ { "$ref": "#/$defs/software_Snippet" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Artifact_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Element_props" },
+ {
+ "type": "object",
+ "properties": {
+ "builtTime": {
+ "$ref": "#/$defs/prop_Artifact_builtTime"
+ },
+ "originatedBy": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_Artifact_originatedBy"
+ }
+ }
+ ]
+ },
+ "releaseTime": {
+ "$ref": "#/$defs/prop_Artifact_releaseTime"
+ },
+ "standardName": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_Artifact_standardName"
+ }
+ }
+ ]
+ },
+ "suppliedBy": {
+ "$ref": "#/$defs/prop_Artifact_suppliedBy"
+ },
+ "supportLevel": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_Artifact_supportLevel"
+ }
+ }
+ ]
+ },
+ "validUntilTime": {
+ "$ref": "#/$defs/prop_Artifact_validUntilTime"
+ }
+ }
+ }
+ ]
+ },
+ "prop_Artifact_builtTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_Artifact_originatedBy": {
+ "$ref": "#/$defs/Agent_derived"
+ },
+ "prop_Artifact_releaseTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_Artifact_standardName": {
+ "type": "string"
+ },
+ "prop_Artifact_suppliedBy": {
+ "$ref": "#/$defs/Agent_derived"
+ },
+ "prop_Artifact_supportLevel": {
+ "enum": [
+ "deployed",
+ "development",
+ "endOfSupport",
+ "limitedSupport",
+ "noAssertion",
+ "noSupport",
+ "support"
+ ]
+ },
+ "prop_Artifact_validUntilTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "Bundle": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "Bundle" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/Bundle_props" }
+ ]
+ },
+ "Bundle_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/Bom" },
+ { "$ref": "#/$defs/software_Sbom" },
+ { "$ref": "#/$defs/Bundle" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Bundle_props": {
+ "allOf": [
+ { "$ref": "#/$defs/ElementCollection_props" },
+ {
+ "type": "object",
+ "properties": {
+ "context": {
+ "$ref": "#/$defs/prop_Bundle_context"
+ }
+ }
+ }
+ ]
+ },
+ "prop_Bundle_context": {
+ "type": "string"
+ },
+ "Hash": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNode" },
+ "type": {
+ "oneOf": [
+ { "const": "Hash" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/Hash_props" }
+ ]
+ },
+ "Hash_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/Hash" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Hash_props": {
+ "allOf": [
+ { "$ref": "#/$defs/IntegrityMethod_props" },
+ {
+ "type": "object",
+ "properties": {
+ "algorithm": {
+ "$ref": "#/$defs/prop_Hash_algorithm"
+ },
+ "hashValue": {
+ "$ref": "#/$defs/prop_Hash_hashValue"
+ }
+ },
+ "required": [
+ "algorithm",
+ "hashValue"
+ ]
+ }
+ ]
+ },
+ "prop_Hash_algorithm": {
+ "enum": [
+ "adler32",
+ "blake2b256",
+ "blake2b384",
+ "blake2b512",
+ "blake3",
+ "crystalsDilithium",
+ "crystalsKyber",
+ "falcon",
+ "md2",
+ "md4",
+ "md5",
+ "md6",
+ "other",
+ "sha1",
+ "sha224",
+ "sha256",
+ "sha384",
+ "sha3_224",
+ "sha3_256",
+ "sha3_384",
+ "sha3_512",
+ "sha512"
+ ]
+ },
+ "prop_Hash_hashValue": {
+ "type": "string"
+ },
+ "LifecycleScopedRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "LifecycleScopedRelationship" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/LifecycleScopedRelationship_props" }
+ ]
+ },
+ "LifecycleScopedRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/LifecycleScopedRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "LifecycleScopedRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Relationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "scope": {
+ "$ref": "#/$defs/prop_LifecycleScopedRelationship_scope"
+ }
+ }
+ }
+ ]
+ },
+ "prop_LifecycleScopedRelationship_scope": {
+ "enum": [
+ "build",
+ "design",
+ "development",
+ "other",
+ "runtime",
+ "test"
+ ]
+ },
+ "Organization": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "Organization" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/Organization_props" }
+ ]
+ },
+ "Organization_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/Organization" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Organization_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Agent_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "Person": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "Person" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/Person_props" }
+ ]
+ },
+ "Person_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/Person" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Person_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Agent_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "SoftwareAgent": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "SoftwareAgent" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/SoftwareAgent_props" }
+ ]
+ },
+ "SoftwareAgent_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/SoftwareAgent" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "SoftwareAgent_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Agent_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "expandedlicensing_ConjunctiveLicenseSet": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_ConjunctiveLicenseSet" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/expandedlicensing_ConjunctiveLicenseSet_props" }
+ ]
+ },
+ "expandedlicensing_ConjunctiveLicenseSet_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_ConjunctiveLicenseSet" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_ConjunctiveLicenseSet_props": {
+ "allOf": [
+ { "$ref": "#/$defs/simplelicensing_AnyLicenseInfo_props" },
+ {
+ "type": "object",
+ "properties": {
+ "expandedlicensing_member": {
+ "oneOf": [
+ {
+ "type": "array",
+ "minItems": 2,
+ "items": {
+ "$ref": "#/$defs/prop_expandedlicensing_ConjunctiveLicenseSet_expandedlicensing_member"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "expandedlicensing_member"
+ ]
+ }
+ ]
+ },
+ "prop_expandedlicensing_ConjunctiveLicenseSet_expandedlicensing_member": {
+ "$ref": "#/$defs/simplelicensing_AnyLicenseInfo_derived"
+ },
+ "expandedlicensing_CustomLicenseAddition": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_CustomLicenseAddition" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/expandedlicensing_CustomLicenseAddition_props" }
+ ]
+ },
+ "expandedlicensing_CustomLicenseAddition_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_CustomLicenseAddition" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_CustomLicenseAddition_props": {
+ "allOf": [
+ { "$ref": "#/$defs/expandedlicensing_LicenseAddition_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "expandedlicensing_DisjunctiveLicenseSet": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_DisjunctiveLicenseSet" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/expandedlicensing_DisjunctiveLicenseSet_props" }
+ ]
+ },
+ "expandedlicensing_DisjunctiveLicenseSet_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_DisjunctiveLicenseSet" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_DisjunctiveLicenseSet_props": {
+ "allOf": [
+ { "$ref": "#/$defs/simplelicensing_AnyLicenseInfo_props" },
+ {
+ "type": "object",
+ "properties": {
+ "expandedlicensing_member": {
+ "oneOf": [
+ {
+ "type": "array",
+ "minItems": 2,
+ "items": {
+ "$ref": "#/$defs/prop_expandedlicensing_DisjunctiveLicenseSet_expandedlicensing_member"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "expandedlicensing_member"
+ ]
+ }
+ ]
+ },
+ "prop_expandedlicensing_DisjunctiveLicenseSet_expandedlicensing_member": {
+ "$ref": "#/$defs/simplelicensing_AnyLicenseInfo_derived"
+ },
+ "expandedlicensing_ExtendableLicense_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_CustomLicense" },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicense" },
+ { "$ref": "#/$defs/expandedlicensing_OrLaterOperator" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_ExtendableLicense_props": {
+ "allOf": [
+ { "$ref": "#/$defs/simplelicensing_AnyLicenseInfo_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "expandedlicensing_IndividualLicensingInfo": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_IndividualLicensingInfo" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/expandedlicensing_IndividualLicensingInfo_props" }
+ ]
+ },
+ "expandedlicensing_IndividualLicensingInfo_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_IndividualLicensingInfo" }
+ ]
+ },
+ { "const": "spdx:ExpandedLicensing/NoAssertionLicense" },
+ { "const": "spdx:ExpandedLicensing/NoneLicense" },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_IndividualLicensingInfo_props": {
+ "allOf": [
+ { "$ref": "#/$defs/simplelicensing_AnyLicenseInfo_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "expandedlicensing_License_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_CustomLicense" },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicense" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_License_props": {
+ "allOf": [
+ { "$ref": "#/$defs/expandedlicensing_ExtendableLicense_props" },
+ {
+ "type": "object",
+ "properties": {
+ "expandedlicensing_isDeprecatedLicenseId": {
+ "$ref": "#/$defs/prop_expandedlicensing_License_expandedlicensing_isDeprecatedLicenseId"
+ },
+ "expandedlicensing_isFsfLibre": {
+ "$ref": "#/$defs/prop_expandedlicensing_License_expandedlicensing_isFsfLibre"
+ },
+ "expandedlicensing_isOsiApproved": {
+ "$ref": "#/$defs/prop_expandedlicensing_License_expandedlicensing_isOsiApproved"
+ },
+ "expandedlicensing_licenseXml": {
+ "$ref": "#/$defs/prop_expandedlicensing_License_expandedlicensing_licenseXml"
+ },
+ "expandedlicensing_obsoletedBy": {
+ "$ref": "#/$defs/prop_expandedlicensing_License_expandedlicensing_obsoletedBy"
+ },
+ "expandedlicensing_seeAlso": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_expandedlicensing_License_expandedlicensing_seeAlso"
+ }
+ }
+ ]
+ },
+ "expandedlicensing_standardLicenseHeader": {
+ "$ref": "#/$defs/prop_expandedlicensing_License_expandedlicensing_standardLicenseHeader"
+ },
+ "expandedlicensing_standardLicenseTemplate": {
+ "$ref": "#/$defs/prop_expandedlicensing_License_expandedlicensing_standardLicenseTemplate"
+ },
+ "simplelicensing_licenseText": {
+ "$ref": "#/$defs/prop_expandedlicensing_License_simplelicensing_licenseText"
+ }
+ },
+ "required": [
+ "simplelicensing_licenseText"
+ ]
+ }
+ ]
+ },
+ "prop_expandedlicensing_License_expandedlicensing_isDeprecatedLicenseId": {
+ "type": "boolean"
+ },
+ "prop_expandedlicensing_License_expandedlicensing_isFsfLibre": {
+ "type": "boolean"
+ },
+ "prop_expandedlicensing_License_expandedlicensing_isOsiApproved": {
+ "type": "boolean"
+ },
+ "prop_expandedlicensing_License_expandedlicensing_licenseXml": {
+ "type": "string"
+ },
+ "prop_expandedlicensing_License_expandedlicensing_obsoletedBy": {
+ "type": "string"
+ },
+ "prop_expandedlicensing_License_expandedlicensing_seeAlso": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_expandedlicensing_License_expandedlicensing_standardLicenseHeader": {
+ "type": "string"
+ },
+ "prop_expandedlicensing_License_expandedlicensing_standardLicenseTemplate": {
+ "type": "string"
+ },
+ "prop_expandedlicensing_License_simplelicensing_licenseText": {
+ "type": "string"
+ },
+ "expandedlicensing_ListedLicense": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_ListedLicense" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicense_props" }
+ ]
+ },
+ "expandedlicensing_ListedLicense_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_ListedLicense" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_ListedLicense_props": {
+ "allOf": [
+ { "$ref": "#/$defs/expandedlicensing_License_props" },
+ {
+ "type": "object",
+ "properties": {
+ "expandedlicensing_deprecatedVersion": {
+ "$ref": "#/$defs/prop_expandedlicensing_ListedLicense_expandedlicensing_deprecatedVersion"
+ },
+ "expandedlicensing_listVersionAdded": {
+ "$ref": "#/$defs/prop_expandedlicensing_ListedLicense_expandedlicensing_listVersionAdded"
+ }
+ }
+ }
+ ]
+ },
+ "prop_expandedlicensing_ListedLicense_expandedlicensing_deprecatedVersion": {
+ "type": "string"
+ },
+ "prop_expandedlicensing_ListedLicense_expandedlicensing_listVersionAdded": {
+ "type": "string"
+ },
+ "expandedlicensing_OrLaterOperator": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_OrLaterOperator" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/expandedlicensing_OrLaterOperator_props" }
+ ]
+ },
+ "expandedlicensing_OrLaterOperator_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_OrLaterOperator" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_OrLaterOperator_props": {
+ "allOf": [
+ { "$ref": "#/$defs/expandedlicensing_ExtendableLicense_props" },
+ {
+ "type": "object",
+ "properties": {
+ "expandedlicensing_subjectLicense": {
+ "$ref": "#/$defs/prop_expandedlicensing_OrLaterOperator_expandedlicensing_subjectLicense"
+ }
+ },
+ "required": [
+ "expandedlicensing_subjectLicense"
+ ]
+ }
+ ]
+ },
+ "prop_expandedlicensing_OrLaterOperator_expandedlicensing_subjectLicense": {
+ "$ref": "#/$defs/expandedlicensing_License_derived"
+ },
+ "expandedlicensing_WithAdditionOperator": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_WithAdditionOperator" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/expandedlicensing_WithAdditionOperator_props" }
+ ]
+ },
+ "expandedlicensing_WithAdditionOperator_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_WithAdditionOperator" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_WithAdditionOperator_props": {
+ "allOf": [
+ { "$ref": "#/$defs/simplelicensing_AnyLicenseInfo_props" },
+ {
+ "type": "object",
+ "properties": {
+ "expandedlicensing_subjectAddition": {
+ "$ref": "#/$defs/prop_expandedlicensing_WithAdditionOperator_expandedlicensing_subjectAddition"
+ },
+ "expandedlicensing_subjectExtendableLicense": {
+ "$ref": "#/$defs/prop_expandedlicensing_WithAdditionOperator_expandedlicensing_subjectExtendableLicense"
+ }
+ },
+ "required": [
+ "expandedlicensing_subjectAddition",
+ "expandedlicensing_subjectExtendableLicense"
+ ]
+ }
+ ]
+ },
+ "prop_expandedlicensing_WithAdditionOperator_expandedlicensing_subjectAddition": {
+ "$ref": "#/$defs/expandedlicensing_LicenseAddition_derived"
+ },
+ "prop_expandedlicensing_WithAdditionOperator_expandedlicensing_subjectExtendableLicense": {
+ "$ref": "#/$defs/expandedlicensing_ExtendableLicense_derived"
+ },
+ "extension_CdxPropertiesExtension": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/BlankNode" },
+ "type": {
+ "oneOf": [
+ { "const": "extension_CdxPropertiesExtension" }
+ ]
+ }
+ }
+ },
+ { "$ref": "#/$defs/extension_CdxPropertiesExtension_props" }
+ ]
+ },
+ "extension_CdxPropertiesExtension_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/extension_CdxPropertiesExtension" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "extension_CdxPropertiesExtension_props": {
+ "allOf": [
+ { "$ref": "#/$defs/extension_Extension_props" },
+ {
+ "type": "object",
+ "properties": {
+ "extension_cdxProperty": {
+ "oneOf": [
+ {
+ "type": "array",
+ "minItems": 1,
+ "items": {
+ "$ref": "#/$defs/prop_extension_CdxPropertiesExtension_extension_cdxProperty"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "extension_cdxProperty"
+ ]
+ }
+ ]
+ },
+ "prop_extension_CdxPropertiesExtension_extension_cdxProperty": {
+ "$ref": "#/$defs/extension_CdxPropertyEntry_derived"
+ },
+ "security_CvssV2VulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_CvssV2VulnAssessmentRelationship" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/security_CvssV2VulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_CvssV2VulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_CvssV2VulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_CvssV2VulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_score": {
+ "$ref": "#/$defs/prop_security_CvssV2VulnAssessmentRelationship_security_score"
+ },
+ "security_vectorString": {
+ "$ref": "#/$defs/prop_security_CvssV2VulnAssessmentRelationship_security_vectorString"
+ }
+ },
+ "required": [
+ "security_score",
+ "security_vectorString"
+ ]
+ }
+ ]
+ },
+ "prop_security_CvssV2VulnAssessmentRelationship_security_score": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string",
+ "pattern": "^-?[0-9]+(\\.[0-9]*)?$"
+ }
+ ]
+ },
+ "prop_security_CvssV2VulnAssessmentRelationship_security_vectorString": {
+ "type": "string"
+ },
+ "security_CvssV3VulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_CvssV3VulnAssessmentRelationship" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/security_CvssV3VulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_CvssV3VulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_CvssV3VulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_CvssV3VulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_score": {
+ "$ref": "#/$defs/prop_security_CvssV3VulnAssessmentRelationship_security_score"
+ },
+ "security_severity": {
+ "$ref": "#/$defs/prop_security_CvssV3VulnAssessmentRelationship_security_severity"
+ },
+ "security_vectorString": {
+ "$ref": "#/$defs/prop_security_CvssV3VulnAssessmentRelationship_security_vectorString"
+ }
+ },
+ "required": [
+ "security_score",
+ "security_severity",
+ "security_vectorString"
+ ]
+ }
+ ]
+ },
+ "prop_security_CvssV3VulnAssessmentRelationship_security_score": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string",
+ "pattern": "^-?[0-9]+(\\.[0-9]*)?$"
+ }
+ ]
+ },
+ "prop_security_CvssV3VulnAssessmentRelationship_security_severity": {
+ "enum": [
+ "critical",
+ "high",
+ "low",
+ "medium",
+ "none"
+ ]
+ },
+ "prop_security_CvssV3VulnAssessmentRelationship_security_vectorString": {
+ "type": "string"
+ },
+ "security_CvssV4VulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_CvssV4VulnAssessmentRelationship" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/security_CvssV4VulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_CvssV4VulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_CvssV4VulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_CvssV4VulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_score": {
+ "$ref": "#/$defs/prop_security_CvssV4VulnAssessmentRelationship_security_score"
+ },
+ "security_severity": {
+ "$ref": "#/$defs/prop_security_CvssV4VulnAssessmentRelationship_security_severity"
+ },
+ "security_vectorString": {
+ "$ref": "#/$defs/prop_security_CvssV4VulnAssessmentRelationship_security_vectorString"
+ }
+ },
+ "required": [
+ "security_score",
+ "security_severity",
+ "security_vectorString"
+ ]
+ }
+ ]
+ },
+ "prop_security_CvssV4VulnAssessmentRelationship_security_score": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string",
+ "pattern": "^-?[0-9]+(\\.[0-9]*)?$"
+ }
+ ]
+ },
+ "prop_security_CvssV4VulnAssessmentRelationship_security_severity": {
+ "enum": [
+ "critical",
+ "high",
+ "low",
+ "medium",
+ "none"
+ ]
+ },
+ "prop_security_CvssV4VulnAssessmentRelationship_security_vectorString": {
+ "type": "string"
+ },
+ "security_EpssVulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_EpssVulnAssessmentRelationship" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/security_EpssVulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_EpssVulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_EpssVulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_EpssVulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_percentile": {
+ "$ref": "#/$defs/prop_security_EpssVulnAssessmentRelationship_security_percentile"
+ },
+ "security_probability": {
+ "$ref": "#/$defs/prop_security_EpssVulnAssessmentRelationship_security_probability"
+ }
+ },
+ "required": [
+ "security_percentile",
+ "security_probability"
+ ]
+ }
+ ]
+ },
+ "prop_security_EpssVulnAssessmentRelationship_security_percentile": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string",
+ "pattern": "^-?[0-9]+(\\.[0-9]*)?$"
+ }
+ ]
+ },
+ "prop_security_EpssVulnAssessmentRelationship_security_probability": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "string",
+ "pattern": "^-?[0-9]+(\\.[0-9]*)?$"
+ }
+ ]
+ },
+ "security_ExploitCatalogVulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_ExploitCatalogVulnAssessmentRelationship" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/security_ExploitCatalogVulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_ExploitCatalogVulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_ExploitCatalogVulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_ExploitCatalogVulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_catalogType": {
+ "$ref": "#/$defs/prop_security_ExploitCatalogVulnAssessmentRelationship_security_catalogType"
+ },
+ "security_exploited": {
+ "$ref": "#/$defs/prop_security_ExploitCatalogVulnAssessmentRelationship_security_exploited"
+ },
+ "security_locator": {
+ "$ref": "#/$defs/prop_security_ExploitCatalogVulnAssessmentRelationship_security_locator"
+ }
+ },
+ "required": [
+ "security_catalogType",
+ "security_exploited",
+ "security_locator"
+ ]
+ }
+ ]
+ },
+ "prop_security_ExploitCatalogVulnAssessmentRelationship_security_catalogType": {
+ "enum": [
+ "kev",
+ "other"
+ ]
+ },
+ "prop_security_ExploitCatalogVulnAssessmentRelationship_security_exploited": {
+ "type": "boolean"
+ },
+ "prop_security_ExploitCatalogVulnAssessmentRelationship_security_locator": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "security_SsvcVulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_SsvcVulnAssessmentRelationship" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/security_SsvcVulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_SsvcVulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_SsvcVulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_SsvcVulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_decisionType": {
+ "$ref": "#/$defs/prop_security_SsvcVulnAssessmentRelationship_security_decisionType"
+ }
+ },
+ "required": [
+ "security_decisionType"
+ ]
+ }
+ ]
+ },
+ "prop_security_SsvcVulnAssessmentRelationship_security_decisionType": {
+ "enum": [
+ "act",
+ "attend",
+ "track",
+ "trackStar"
+ ]
+ },
+ "security_VexVulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_VexAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexFixedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexNotAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexUnderInvestigationVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexVulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_VexVulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_statusNotes": {
+ "$ref": "#/$defs/prop_security_VexVulnAssessmentRelationship_security_statusNotes"
+ },
+ "security_vexVersion": {
+ "$ref": "#/$defs/prop_security_VexVulnAssessmentRelationship_security_vexVersion"
+ }
+ }
+ }
+ ]
+ },
+ "prop_security_VexVulnAssessmentRelationship_security_statusNotes": {
+ "type": "string"
+ },
+ "prop_security_VexVulnAssessmentRelationship_security_vexVersion": {
+ "type": "string"
+ },
+ "security_Vulnerability": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_Vulnerability" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/security_Vulnerability_props" }
+ ]
+ },
+ "security_Vulnerability_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_Vulnerability" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_Vulnerability_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Artifact_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_modifiedTime": {
+ "$ref": "#/$defs/prop_security_Vulnerability_security_modifiedTime"
+ },
+ "security_publishedTime": {
+ "$ref": "#/$defs/prop_security_Vulnerability_security_publishedTime"
+ },
+ "security_withdrawnTime": {
+ "$ref": "#/$defs/prop_security_Vulnerability_security_withdrawnTime"
+ }
+ }
+ }
+ ]
+ },
+ "prop_security_Vulnerability_security_modifiedTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_security_Vulnerability_security_publishedTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_security_Vulnerability_security_withdrawnTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "software_SoftwareArtifact_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ai_AIPackage" },
+ { "$ref": "#/$defs/dataset_DatasetPackage" },
+ { "$ref": "#/$defs/software_File" },
+ { "$ref": "#/$defs/software_Package" },
+ { "$ref": "#/$defs/software_Snippet" },
+ { "$ref": "#/$defs/software_SoftwareArtifact" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_SoftwareArtifact_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Artifact_props" },
+ {
+ "type": "object",
+ "properties": {
+ "software_additionalPurpose": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_software_SoftwareArtifact_software_additionalPurpose"
+ }
+ }
+ ]
+ },
+ "software_attributionText": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_software_SoftwareArtifact_software_attributionText"
+ }
+ }
+ ]
+ },
+ "software_contentIdentifier": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_software_SoftwareArtifact_software_contentIdentifier"
+ }
+ }
+ ]
+ },
+ "software_copyrightText": {
+ "$ref": "#/$defs/prop_software_SoftwareArtifact_software_copyrightText"
+ },
+ "software_primaryPurpose": {
+ "$ref": "#/$defs/prop_software_SoftwareArtifact_software_primaryPurpose"
+ }
+ }
+ }
+ ]
+ },
+ "prop_software_SoftwareArtifact_software_additionalPurpose": {
+ "enum": [
+ "application",
+ "archive",
+ "bom",
+ "configuration",
+ "container",
+ "data",
+ "device",
+ "deviceDriver",
+ "diskImage",
+ "documentation",
+ "evidence",
+ "executable",
+ "file",
+ "filesystemImage",
+ "firmware",
+ "framework",
+ "install",
+ "library",
+ "manifest",
+ "model",
+ "module",
+ "operatingSystem",
+ "other",
+ "patch",
+ "platform",
+ "requirement",
+ "source",
+ "specification",
+ "test"
+ ]
+ },
+ "prop_software_SoftwareArtifact_software_attributionText": {
+ "type": "string"
+ },
+ "prop_software_SoftwareArtifact_software_contentIdentifier": {
+ "$ref": "#/$defs/software_ContentIdentifier_derived"
+ },
+ "prop_software_SoftwareArtifact_software_copyrightText": {
+ "type": "string"
+ },
+ "prop_software_SoftwareArtifact_software_primaryPurpose": {
+ "enum": [
+ "application",
+ "archive",
+ "bom",
+ "configuration",
+ "container",
+ "data",
+ "device",
+ "deviceDriver",
+ "diskImage",
+ "documentation",
+ "evidence",
+ "executable",
+ "file",
+ "filesystemImage",
+ "firmware",
+ "framework",
+ "install",
+ "library",
+ "manifest",
+ "model",
+ "module",
+ "operatingSystem",
+ "other",
+ "patch",
+ "platform",
+ "requirement",
+ "source",
+ "specification",
+ "test"
+ ]
+ },
+ "Bom": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "Bom" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/Bom_props" }
+ ]
+ },
+ "Bom_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/software_Sbom" },
+ { "$ref": "#/$defs/Bom" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "Bom_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Bundle_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "expandedlicensing_CustomLicense": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "expandedlicensing_CustomLicense" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/expandedlicensing_CustomLicense_props" }
+ ]
+ },
+ "expandedlicensing_CustomLicense_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/expandedlicensing_CustomLicense" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "expandedlicensing_CustomLicense_props": {
+ "allOf": [
+ { "$ref": "#/$defs/expandedlicensing_License_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "security_VexAffectedVulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_VexAffectedVulnAssessmentRelationship" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/security_VexAffectedVulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_VexAffectedVulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_VexAffectedVulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_VexAffectedVulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VexVulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_actionStatement": {
+ "$ref": "#/$defs/prop_security_VexAffectedVulnAssessmentRelationship_security_actionStatement"
+ },
+ "security_actionStatementTime": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_security_VexAffectedVulnAssessmentRelationship_security_actionStatementTime"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "prop_security_VexAffectedVulnAssessmentRelationship_security_actionStatement": {
+ "type": "string"
+ },
+ "prop_security_VexAffectedVulnAssessmentRelationship_security_actionStatementTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "security_VexFixedVulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_VexFixedVulnAssessmentRelationship" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/security_VexFixedVulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_VexFixedVulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_VexFixedVulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_VexFixedVulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VexVulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "security_VexNotAffectedVulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_VexNotAffectedVulnAssessmentRelationship" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/security_VexNotAffectedVulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_VexNotAffectedVulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_VexNotAffectedVulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_VexNotAffectedVulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VexVulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ "security_impactStatement": {
+ "$ref": "#/$defs/prop_security_VexNotAffectedVulnAssessmentRelationship_security_impactStatement"
+ },
+ "security_impactStatementTime": {
+ "$ref": "#/$defs/prop_security_VexNotAffectedVulnAssessmentRelationship_security_impactStatementTime"
+ },
+ "security_justificationType": {
+ "$ref": "#/$defs/prop_security_VexNotAffectedVulnAssessmentRelationship_security_justificationType"
+ }
+ }
+ }
+ ]
+ },
+ "prop_security_VexNotAffectedVulnAssessmentRelationship_security_impactStatement": {
+ "type": "string"
+ },
+ "prop_security_VexNotAffectedVulnAssessmentRelationship_security_impactStatementTime": {
+ "type": "string",
+ "allOf": [
+ {
+ "pattern": "^[0-9]{4}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-6][0-9]:[0-6][0-9](Z|[+-][0-9]{2}:[0-9]{2})$"
+ },
+ {
+ "pattern": "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
+ }
+ ]
+ },
+ "prop_security_VexNotAffectedVulnAssessmentRelationship_security_justificationType": {
+ "enum": [
+ "componentNotPresent",
+ "inlineMitigationsAlreadyExist",
+ "vulnerableCodeCannotBeControlledByAdversary",
+ "vulnerableCodeNotInExecutePath",
+ "vulnerableCodeNotPresent"
+ ]
+ },
+ "security_VexUnderInvestigationVulnAssessmentRelationship": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "security_VexUnderInvestigationVulnAssessmentRelationship" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/security_VexUnderInvestigationVulnAssessmentRelationship_props" }
+ ]
+ },
+ "security_VexUnderInvestigationVulnAssessmentRelationship_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/security_VexUnderInvestigationVulnAssessmentRelationship" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "security_VexUnderInvestigationVulnAssessmentRelationship_props": {
+ "allOf": [
+ { "$ref": "#/$defs/security_VexVulnAssessmentRelationship_props" },
+ {
+ "type": "object",
+ "properties": {
+ }
+ }
+ ]
+ },
+ "software_File": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "software_File" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/software_File_props" }
+ ]
+ },
+ "software_File_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/software_File" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_File_props": {
+ "allOf": [
+ { "$ref": "#/$defs/software_SoftwareArtifact_props" },
+ {
+ "type": "object",
+ "properties": {
+ "contentType": {
+ "$ref": "#/$defs/prop_software_File_contentType"
+ },
+ "software_fileKind": {
+ "$ref": "#/$defs/prop_software_File_software_fileKind"
+ }
+ }
+ }
+ ]
+ },
+ "prop_software_File_contentType": {
+ "pattern": "^[^\\/]+\\/[^\\/]+$",
+ "type": "string"
+ },
+ "prop_software_File_software_fileKind": {
+ "enum": [
+ "directory",
+ "file"
+ ]
+ },
+ "software_Package": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "software_Package" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/software_Package_props" }
+ ]
+ },
+ "software_Package_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ai_AIPackage" },
+ { "$ref": "#/$defs/dataset_DatasetPackage" },
+ { "$ref": "#/$defs/software_Package" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_Package_props": {
+ "allOf": [
+ { "$ref": "#/$defs/software_SoftwareArtifact_props" },
+ {
+ "type": "object",
+ "properties": {
+ "software_downloadLocation": {
+ "$ref": "#/$defs/prop_software_Package_software_downloadLocation"
+ },
+ "software_homePage": {
+ "$ref": "#/$defs/prop_software_Package_software_homePage"
+ },
+ "software_packageUrl": {
+ "$ref": "#/$defs/prop_software_Package_software_packageUrl"
+ },
+ "software_packageVersion": {
+ "$ref": "#/$defs/prop_software_Package_software_packageVersion"
+ },
+ "software_sourceInfo": {
+ "$ref": "#/$defs/prop_software_Package_software_sourceInfo"
+ }
+ }
+ }
+ ]
+ },
+ "prop_software_Package_software_downloadLocation": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_software_Package_software_homePage": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_software_Package_software_packageUrl": {
+ "$ref": "#/$defs/anyURI"
+ },
+ "prop_software_Package_software_packageVersion": {
+ "type": "string"
+ },
+ "prop_software_Package_software_sourceInfo": {
+ "type": "string"
+ },
+ "software_Sbom": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "software_Sbom" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/software_Sbom_props" }
+ ]
+ },
+ "software_Sbom_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/software_Sbom" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_Sbom_props": {
+ "allOf": [
+ { "$ref": "#/$defs/Bom_props" },
+ {
+ "type": "object",
+ "properties": {
+ "software_sbomType": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_software_Sbom_software_sbomType"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "prop_software_Sbom_software_sbomType": {
+ "enum": [
+ "analyzed",
+ "build",
+ "deployed",
+ "design",
+ "runtime",
+ "source"
+ ]
+ },
+ "software_Snippet": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "software_Snippet" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/software_Snippet_props" }
+ ]
+ },
+ "software_Snippet_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/software_Snippet" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "software_Snippet_props": {
+ "allOf": [
+ { "$ref": "#/$defs/software_SoftwareArtifact_props" },
+ {
+ "type": "object",
+ "properties": {
+ "software_byteRange": {
+ "$ref": "#/$defs/prop_software_Snippet_software_byteRange"
+ },
+ "software_lineRange": {
+ "$ref": "#/$defs/prop_software_Snippet_software_lineRange"
+ },
+ "software_snippetFromFile": {
+ "$ref": "#/$defs/prop_software_Snippet_software_snippetFromFile"
+ }
+ },
+ "required": [
+ "software_snippetFromFile"
+ ]
+ }
+ ]
+ },
+ "prop_software_Snippet_software_byteRange": {
+ "$ref": "#/$defs/PositiveIntegerRange_derived"
+ },
+ "prop_software_Snippet_software_lineRange": {
+ "$ref": "#/$defs/PositiveIntegerRange_derived"
+ },
+ "prop_software_Snippet_software_snippetFromFile": {
+ "$ref": "#/$defs/software_File_derived"
+ },
+ "ai_AIPackage": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "ai_AIPackage" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/ai_AIPackage_props" }
+ ]
+ },
+ "ai_AIPackage_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/ai_AIPackage" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "ai_AIPackage_props": {
+ "allOf": [
+ { "$ref": "#/$defs/software_Package_props" },
+ {
+ "type": "object",
+ "properties": {
+ "ai_autonomyType": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_autonomyType"
+ },
+ "ai_domain": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_domain"
+ }
+ }
+ ]
+ },
+ "ai_energyConsumption": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_energyConsumption"
+ },
+ "ai_hyperparameter": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_hyperparameter"
+ }
+ }
+ ]
+ },
+ "ai_informationAboutApplication": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_informationAboutApplication"
+ },
+ "ai_informationAboutTraining": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_informationAboutTraining"
+ },
+ "ai_limitation": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_limitation"
+ },
+ "ai_metric": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_metric"
+ }
+ }
+ ]
+ },
+ "ai_metricDecisionThreshold": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_metricDecisionThreshold"
+ }
+ }
+ ]
+ },
+ "ai_modelDataPreprocessing": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_modelDataPreprocessing"
+ }
+ }
+ ]
+ },
+ "ai_modelExplainability": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_modelExplainability"
+ }
+ }
+ ]
+ },
+ "ai_safetyRiskAssessment": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_safetyRiskAssessment"
+ },
+ "ai_standardCompliance": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_standardCompliance"
+ }
+ }
+ ]
+ },
+ "ai_typeOfModel": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_typeOfModel"
+ }
+ }
+ ]
+ },
+ "ai_useSensitivePersonalInformation": {
+ "$ref": "#/$defs/prop_ai_AIPackage_ai_useSensitivePersonalInformation"
+ }
+ }
+ }
+ ]
+ },
+ "prop_ai_AIPackage_ai_autonomyType": {
+ "enum": [
+ "no",
+ "noAssertion",
+ "yes"
+ ]
+ },
+ "prop_ai_AIPackage_ai_domain": {
+ "type": "string"
+ },
+ "prop_ai_AIPackage_ai_energyConsumption": {
+ "$ref": "#/$defs/ai_EnergyConsumption_derived"
+ },
+ "prop_ai_AIPackage_ai_hyperparameter": {
+ "$ref": "#/$defs/DictionaryEntry_derived"
+ },
+ "prop_ai_AIPackage_ai_informationAboutApplication": {
+ "type": "string"
+ },
+ "prop_ai_AIPackage_ai_informationAboutTraining": {
+ "type": "string"
+ },
+ "prop_ai_AIPackage_ai_limitation": {
+ "type": "string"
+ },
+ "prop_ai_AIPackage_ai_metric": {
+ "$ref": "#/$defs/DictionaryEntry_derived"
+ },
+ "prop_ai_AIPackage_ai_metricDecisionThreshold": {
+ "$ref": "#/$defs/DictionaryEntry_derived"
+ },
+ "prop_ai_AIPackage_ai_modelDataPreprocessing": {
+ "type": "string"
+ },
+ "prop_ai_AIPackage_ai_modelExplainability": {
+ "type": "string"
+ },
+ "prop_ai_AIPackage_ai_safetyRiskAssessment": {
+ "enum": [
+ "high",
+ "low",
+ "medium",
+ "serious"
+ ]
+ },
+ "prop_ai_AIPackage_ai_standardCompliance": {
+ "type": "string"
+ },
+ "prop_ai_AIPackage_ai_typeOfModel": {
+ "type": "string"
+ },
+ "prop_ai_AIPackage_ai_useSensitivePersonalInformation": {
+ "enum": [
+ "no",
+ "noAssertion",
+ "yes"
+ ]
+ },
+ "dataset_DatasetPackage": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "spdxId": { "$ref": "#/$defs/IRI" },
+ "type": {
+ "oneOf": [
+ { "const": "dataset_DatasetPackage" }
+ ]
+ }
+ },
+ "required": ["spdxId"]
+ },
+ { "$ref": "#/$defs/dataset_DatasetPackage_props" }
+ ]
+ },
+ "dataset_DatasetPackage_derived": {
+ "anyOf": [
+ {
+ "type": "object",
+ "unevaluatedProperties": false,
+ "anyOf": [
+ { "$ref": "#/$defs/dataset_DatasetPackage" }
+ ]
+ },
+ { "$ref": "#/$defs/BlankNodeOrIRI" }
+ ]
+ },
+ "dataset_DatasetPackage_props": {
+ "allOf": [
+ { "$ref": "#/$defs/software_Package_props" },
+ {
+ "type": "object",
+ "properties": {
+ "dataset_anonymizationMethodUsed": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_anonymizationMethodUsed"
+ }
+ }
+ ]
+ },
+ "dataset_confidentialityLevel": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_confidentialityLevel"
+ },
+ "dataset_dataCollectionProcess": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_dataCollectionProcess"
+ },
+ "dataset_dataPreprocessing": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_dataPreprocessing"
+ }
+ }
+ ]
+ },
+ "dataset_datasetAvailability": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_datasetAvailability"
+ },
+ "dataset_datasetNoise": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_datasetNoise"
+ },
+ "dataset_datasetSize": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_datasetSize"
+ },
+ "dataset_datasetType": {
+ "oneOf": [
+ {
+ "type": "array",
+ "minItems": 1,
+ "items": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_datasetType"
+ }
+ }
+ ]
+ },
+ "dataset_datasetUpdateMechanism": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_datasetUpdateMechanism"
+ },
+ "dataset_hasSensitivePersonalInformation": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_hasSensitivePersonalInformation"
+ },
+ "dataset_intendedUse": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_intendedUse"
+ },
+ "dataset_knownBias": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_knownBias"
+ }
+ }
+ ]
+ },
+ "dataset_sensor": {
+ "oneOf": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/prop_dataset_DatasetPackage_dataset_sensor"
+ }
+ }
+ ]
+ }
+ },
+ "required": [
+ "dataset_datasetType"
+ ]
+ }
+ ]
+ },
+ "prop_dataset_DatasetPackage_dataset_anonymizationMethodUsed": {
+ "type": "string"
+ },
+ "prop_dataset_DatasetPackage_dataset_confidentialityLevel": {
+ "enum": [
+ "amber",
+ "clear",
+ "green",
+ "red"
+ ]
+ },
+ "prop_dataset_DatasetPackage_dataset_dataCollectionProcess": {
+ "type": "string"
+ },
+ "prop_dataset_DatasetPackage_dataset_dataPreprocessing": {
+ "type": "string"
+ },
+ "prop_dataset_DatasetPackage_dataset_datasetAvailability": {
+ "enum": [
+ "clickthrough",
+ "directDownload",
+ "query",
+ "registration",
+ "scrapingScript"
+ ]
+ },
+ "prop_dataset_DatasetPackage_dataset_datasetNoise": {
+ "type": "string"
+ },
+ "prop_dataset_DatasetPackage_dataset_datasetSize": {
+ "type": "integer",
+ "minimum": 0
+ },
+ "prop_dataset_DatasetPackage_dataset_datasetType": {
+ "enum": [
+ "audio",
+ "categorical",
+ "graph",
+ "image",
+ "noAssertion",
+ "numeric",
+ "other",
+ "sensor",
+ "structured",
+ "syntactic",
+ "text",
+ "timeseries",
+ "timestamp",
+ "video"
+ ]
+ },
+ "prop_dataset_DatasetPackage_dataset_datasetUpdateMechanism": {
+ "type": "string"
+ },
+ "prop_dataset_DatasetPackage_dataset_hasSensitivePersonalInformation": {
+ "enum": [
+ "no",
+ "noAssertion",
+ "yes"
+ ]
+ },
+ "prop_dataset_DatasetPackage_dataset_intendedUse": {
+ "type": "string"
+ },
+ "prop_dataset_DatasetPackage_dataset_knownBias": {
+ "type": "string"
+ },
+ "prop_dataset_DatasetPackage_dataset_sensor": {
+ "$ref": "#/$defs/DictionaryEntry_derived"
+ },
+ "IRI": {
+ "type": "string",
+ "pattern": "^(?!_:).+:.+"
+ },
+ "BlankNode": {
+ "type": "string",
+ "pattern": "^_:.+"
+ },
+ "BlankNodeOrIRI": {
+ "oneOf": [
+ { "$ref": "#/$defs/IRI" },
+ { "$ref": "#/$defs/BlankNode" }
+ ]
+ },
+ "anyURI": {
+ "type": "string"
+ },
+ "SHACLClass": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "oneOf": [
+ { "$ref": "#/$defs/IRI" },
+ {
+ "enum": [
+ "http://spdx.invalid./AbstractClass",
+ "ai_EnergyConsumption",
+ "ai_EnergyConsumptionDescription",
+ "ai_EnergyUnitType",
+ "ai_SafetyRiskAssessmentType",
+ "AnnotationType",
+ "CreationInfo",
+ "DictionaryEntry",
+ "ExternalIdentifier",
+ "ExternalIdentifierType",
+ "ExternalMap",
+ "ExternalRef",
+ "ExternalRefType",
+ "HashAlgorithm",
+ "LifecycleScopeType",
+ "NamespaceMap",
+ "PackageVerificationCode",
+ "PositiveIntegerRange",
+ "PresenceType",
+ "ProfileIdentifierType",
+ "Relationship",
+ "RelationshipCompleteness",
+ "RelationshipType",
+ "SpdxDocument",
+ "SupportType",
+ "Tool",
+ "dataset_ConfidentialityLevelType",
+ "dataset_DatasetAvailabilityType",
+ "dataset_DatasetType",
+ "expandedlicensing_ListedLicenseException",
+ "extension_CdxPropertyEntry",
+ "security_CvssSeverityType",
+ "security_ExploitCatalogType",
+ "security_SsvcDecisionType",
+ "security_VexJustificationType",
+ "simplelicensing_LicenseExpression",
+ "simplelicensing_SimpleLicensingText",
+ "software_ContentIdentifier",
+ "software_ContentIdentifierType",
+ "software_FileKindType",
+ "software_SbomType",
+ "software_SoftwarePurpose",
+ "build_Build",
+ "Agent",
+ "Annotation",
+ "Bundle",
+ "Hash",
+ "LifecycleScopedRelationship",
+ "Organization",
+ "Person",
+ "SoftwareAgent",
+ "expandedlicensing_ConjunctiveLicenseSet",
+ "expandedlicensing_CustomLicenseAddition",
+ "expandedlicensing_DisjunctiveLicenseSet",
+ "expandedlicensing_IndividualLicensingInfo",
+ "expandedlicensing_ListedLicense",
+ "expandedlicensing_OrLaterOperator",
+ "expandedlicensing_WithAdditionOperator",
+ "extension_CdxPropertiesExtension",
+ "security_CvssV2VulnAssessmentRelationship",
+ "security_CvssV3VulnAssessmentRelationship",
+ "security_CvssV4VulnAssessmentRelationship",
+ "security_EpssVulnAssessmentRelationship",
+ "security_ExploitCatalogVulnAssessmentRelationship",
+ "security_SsvcVulnAssessmentRelationship",
+ "security_Vulnerability",
+ "Bom",
+ "expandedlicensing_CustomLicense",
+ "security_VexAffectedVulnAssessmentRelationship",
+ "security_VexFixedVulnAssessmentRelationship",
+ "security_VexNotAffectedVulnAssessmentRelationship",
+ "security_VexUnderInvestigationVulnAssessmentRelationship",
+ "software_File",
+ "software_Package",
+ "software_Sbom",
+ "software_Snippet",
+ "ai_AIPackage",
+ "dataset_DatasetPackage"
+ ]
+ }
+ ]
+ }
+ },
+ "required": ["type"]
+ },
+ "AnyClass": {
+ "anyOf": [
+ { "$ref": "#/$defs/http_spdxinvalidAbstractClass" },
+ { "$ref": "#/$defs/ai_EnergyConsumption" },
+ { "$ref": "#/$defs/ai_EnergyConsumptionDescription" },
+ { "$ref": "#/$defs/ai_EnergyUnitType" },
+ { "$ref": "#/$defs/ai_SafetyRiskAssessmentType" },
+ { "$ref": "#/$defs/AnnotationType" },
+ { "$ref": "#/$defs/CreationInfo" },
+ { "$ref": "#/$defs/DictionaryEntry" },
+ { "$ref": "#/$defs/ExternalIdentifier" },
+ { "$ref": "#/$defs/ExternalIdentifierType" },
+ { "$ref": "#/$defs/ExternalMap" },
+ { "$ref": "#/$defs/ExternalRef" },
+ { "$ref": "#/$defs/ExternalRefType" },
+ { "$ref": "#/$defs/HashAlgorithm" },
+ { "$ref": "#/$defs/LifecycleScopeType" },
+ { "$ref": "#/$defs/NamespaceMap" },
+ { "$ref": "#/$defs/PackageVerificationCode" },
+ { "$ref": "#/$defs/PositiveIntegerRange" },
+ { "$ref": "#/$defs/PresenceType" },
+ { "$ref": "#/$defs/ProfileIdentifierType" },
+ { "$ref": "#/$defs/Relationship" },
+ { "$ref": "#/$defs/RelationshipCompleteness" },
+ { "$ref": "#/$defs/RelationshipType" },
+ { "$ref": "#/$defs/SpdxDocument" },
+ { "$ref": "#/$defs/SupportType" },
+ { "$ref": "#/$defs/Tool" },
+ { "$ref": "#/$defs/dataset_ConfidentialityLevelType" },
+ { "$ref": "#/$defs/dataset_DatasetAvailabilityType" },
+ { "$ref": "#/$defs/dataset_DatasetType" },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicenseException" },
+ { "$ref": "#/$defs/extension_CdxPropertyEntry" },
+ { "$ref": "#/$defs/security_CvssSeverityType" },
+ { "$ref": "#/$defs/security_ExploitCatalogType" },
+ { "$ref": "#/$defs/security_SsvcDecisionType" },
+ { "$ref": "#/$defs/security_VexJustificationType" },
+ { "$ref": "#/$defs/simplelicensing_LicenseExpression" },
+ { "$ref": "#/$defs/simplelicensing_SimpleLicensingText" },
+ { "$ref": "#/$defs/software_ContentIdentifier" },
+ { "$ref": "#/$defs/software_ContentIdentifierType" },
+ { "$ref": "#/$defs/software_FileKindType" },
+ { "$ref": "#/$defs/software_SbomType" },
+ { "$ref": "#/$defs/software_SoftwarePurpose" },
+ { "$ref": "#/$defs/build_Build" },
+ { "$ref": "#/$defs/Agent" },
+ { "$ref": "#/$defs/Annotation" },
+ { "$ref": "#/$defs/Bundle" },
+ { "$ref": "#/$defs/Hash" },
+ { "$ref": "#/$defs/LifecycleScopedRelationship" },
+ { "$ref": "#/$defs/Organization" },
+ { "$ref": "#/$defs/Person" },
+ { "$ref": "#/$defs/SoftwareAgent" },
+ { "$ref": "#/$defs/expandedlicensing_ConjunctiveLicenseSet" },
+ { "$ref": "#/$defs/expandedlicensing_CustomLicenseAddition" },
+ { "$ref": "#/$defs/expandedlicensing_DisjunctiveLicenseSet" },
+ { "$ref": "#/$defs/expandedlicensing_IndividualLicensingInfo" },
+ { "$ref": "#/$defs/expandedlicensing_ListedLicense" },
+ { "$ref": "#/$defs/expandedlicensing_OrLaterOperator" },
+ { "$ref": "#/$defs/expandedlicensing_WithAdditionOperator" },
+ { "$ref": "#/$defs/extension_CdxPropertiesExtension" },
+ { "$ref": "#/$defs/security_CvssV2VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_CvssV3VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_CvssV4VulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_EpssVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_ExploitCatalogVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_SsvcVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_Vulnerability" },
+ { "$ref": "#/$defs/Bom" },
+ { "$ref": "#/$defs/expandedlicensing_CustomLicense" },
+ { "$ref": "#/$defs/security_VexAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexFixedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexNotAffectedVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/security_VexUnderInvestigationVulnAssessmentRelationship" },
+ { "$ref": "#/$defs/software_File" },
+ { "$ref": "#/$defs/software_Package" },
+ { "$ref": "#/$defs/software_Sbom" },
+ { "$ref": "#/$defs/software_Snippet" },
+ { "$ref": "#/$defs/ai_AIPackage" },
+ { "$ref": "#/$defs/dataset_DatasetPackage" }
+ ]
+ }
+ }
+}
diff --git a/src/main/java/org/spdx/tools/CompareSpdxDocs.java b/src/main/java/org/spdx/tools/CompareSpdxDocs.java
index f78da1f..ad4d49d 100644
--- a/src/main/java/org/spdx/tools/CompareSpdxDocs.java
+++ b/src/main/java/org/spdx/tools/CompareSpdxDocs.java
@@ -24,13 +24,11 @@
import java.util.List;
import java.util.UUID;
-import org.joda.time.DateTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.spdx.library.InvalidSPDXAnalysisException;
+import org.spdx.core.InvalidSPDXAnalysisException;
import org.spdx.library.ModelCopyManager;
-import org.spdx.library.model.SpdxDocument;
-import org.spdx.library.model.SpdxModelFactory;
+import org.spdx.library.model.v2.SpdxDocument;
import org.spdx.spreadsheetstore.SpreadsheetException;
import org.spdx.storage.IModelStore;
import org.spdx.storage.simple.InMemSpdxStore;
@@ -69,6 +67,7 @@ public static void main(String[] args) {
usage();
System.exit(ERROR_STATUS);
}
+ SpdxToolsHelper.initialize();
try {
onlineFunction(args);
} catch (OnlineToolException e){
@@ -142,7 +141,7 @@ private static void addDocToComparer(List compareDocs,
throw new FileNotFoundException("File "+filePath+" not found");
}
if (spdxDocOrDir.isFile()) {
- SpdxDocument doc = SpdxToolsHelper.deserializeDocument(spdxDocOrDir);
+ SpdxDocument doc = SpdxToolsHelper.deserializeDocumentCompatV2(spdxDocOrDir);
List warnings = doc.verify();
boolean dupDocUri = false;
for (SpdxDocument otherDocs:compareDocs) {
@@ -157,7 +156,7 @@ private static void addDocToComparer(List compareDocs,
warnings.add("Duplicate Document URI: " + doc.getDocumentUri() + " changed to " + newUri);
IModelStore newStore = new InMemSpdxStore();
ModelCopyManager copyManager = new ModelCopyManager();
- SpdxDocument newDoc = SpdxModelFactory.createSpdxDocument(newStore, newUri, copyManager);
+ SpdxDocument newDoc = new SpdxDocument(newStore, newUri, copyManager, false);
newDoc.copyFrom(doc);
doc = newDoc;
}
diff --git a/src/main/java/org/spdx/tools/GenerateVerificationCode.java b/src/main/java/org/spdx/tools/GenerateVerificationCode.java
index fd660cc..f84ff34 100644
--- a/src/main/java/org/spdx/tools/GenerateVerificationCode.java
+++ b/src/main/java/org/spdx/tools/GenerateVerificationCode.java
@@ -26,8 +26,8 @@
import javax.annotation.Nullable;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxPackageVerificationCode;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.SpdxPackageVerificationCode;
import org.spdx.storage.IModelStore;
import org.spdx.storage.simple.InMemSpdxStore;
import org.spdx.utility.verificationcode.JavaSha1ChecksumGenerator;
@@ -57,6 +57,7 @@ public static void main(String[] args) {
skippedRegex = args[1];
}
+ SpdxToolsHelper.initialize();
try {
SpdxPackageVerificationCode verificationCode = generateVerificationCode(directoryPath, skippedRegex);
printVerificationCode(verificationCode);
diff --git a/src/main/java/org/spdx/tools/MatchingStandardLicenses.java b/src/main/java/org/spdx/tools/MatchingStandardLicenses.java
index 0414599..d47742d 100644
--- a/src/main/java/org/spdx/tools/MatchingStandardLicenses.java
+++ b/src/main/java/org/spdx/tools/MatchingStandardLicenses.java
@@ -21,7 +21,7 @@
import java.nio.charset.Charset;
import java.nio.file.Files;
-import org.spdx.library.InvalidSPDXAnalysisException;
+import org.spdx.core.InvalidSPDXAnalysisException;
import org.spdx.utility.compare.LicenseCompareHelper;
import org.spdx.utility.compare.SpdxCompareException;
@@ -60,7 +60,8 @@ public static void main(String[] args) {
usage();
System.exit(ERROR_STATUS);
}
-
+
+ SpdxToolsHelper.initialize();
String licenseText = null;
try {
licenseText = readAll(textFile);
diff --git a/src/main/java/org/spdx/tools/SpdxConverter.java b/src/main/java/org/spdx/tools/SpdxConverter.java
index 2bf36fd..4e929a9 100644
--- a/src/main/java/org/spdx/tools/SpdxConverter.java
+++ b/src/main/java/org/spdx/tools/SpdxConverter.java
@@ -25,12 +25,17 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.spdx.library.InvalidSPDXAnalysisException;
+import org.spdx.core.InvalidSPDXAnalysisException;
import org.spdx.library.ModelCopyManager;
-import org.spdx.library.SpdxConstants;
+import org.spdx.library.SpdxModelFactory;
+import org.spdx.library.conversion.Spdx2to3Converter;
+import org.spdx.library.model.v2.SpdxConstantsCompatV2;
+import org.spdx.library.model.v3_0_1.SpdxConstantsV3.SpdxMajorVersion;
+import org.spdx.library.model.v3_0_1.core.CreationInfo;
import org.spdx.spdxRdfStore.RdfStore;
import org.spdx.storage.ISerializableModelStore;
import org.spdx.tools.SpdxToolsHelper.SerFileType;
+import org.spdx.v3jsonldstore.JsonLDStore;
/**
* Converts between various SPDX file types
@@ -56,6 +61,8 @@ public class SpdxConverter {
* @param args
*/
public static void main(String[] args) {
+
+ SpdxToolsHelper.initialize();
if (args.length < MIN_ARGS) {
System.err
@@ -171,6 +178,13 @@ public static void convert(String fromFilePath, String toFilePath, SerFileType f
try {
ISerializableModelStore fromStore = SpdxToolsHelper.fileTypeToStore(fromFileType);
ISerializableModelStore toStore = SpdxToolsHelper.fileTypeToStore(toFileType);
+ SpdxMajorVersion fromVersion = fromStore instanceof JsonLDStore ? SpdxMajorVersion.VERSION_3 :
+ SpdxMajorVersion.VERSION_2;
+ SpdxMajorVersion toVersion = toStore instanceof JsonLDStore ? SpdxMajorVersion.VERSION_3 :
+ SpdxMajorVersion.VERSION_2;
+ if (fromVersion == SpdxMajorVersion.VERSION_3 && toVersion != SpdxMajorVersion.VERSION_3) {
+ throw new SpdxConverterException("Can not convert from SPDX spec version 3 to previous versions");
+ }
if (fromStore instanceof RdfStore || toStore instanceof RdfStore) {
// Setting the property value will avoid the error message
// See issue #90 for more information
@@ -182,31 +196,20 @@ public static void convert(String fromFilePath, String toFilePath, SerFileType f
propertySet = false; // we'll just deal with the extra error message
}
}
+ if (toStore instanceof JsonLDStore) {
+ ((JsonLDStore)toStore).setUseExternalListedElements(true);
+ }
input = new FileInputStream(fromFile);
output = new FileOutputStream(toFile);
- String documentUri = fromStore.deSerialize(input, false);
- ModelCopyManager copyManager = new ModelCopyManager();
- // Need to copy the external document refs first so that they line up with the references
- fromStore.getAllItems(documentUri, SpdxConstants.CLASS_EXTERNAL_DOC_REF).forEach(tv -> {
- try {
- copyManager.copy(toStore, documentUri, fromStore, documentUri,
- tv.getId(), tv.getType());
- } catch (InvalidSPDXAnalysisException e) {
- throw new RuntimeException(e);
- }
- });
- fromStore.getAllItems(documentUri, null).forEach(tv -> {
- try {
- if (!SpdxConstants.CLASS_EXTERNAL_DOC_REF.equals(tv.getType()) &&
- !(excludeLicenseDetails && SpdxConstants.CLASS_CROSS_REF.equals(tv.getType()))) {
- copyManager.copy(toStore, documentUri, fromStore, documentUri,
- tv.getId(), tv.getType(), excludeLicenseDetails);
- }
- } catch (InvalidSPDXAnalysisException e) {
- throw new RuntimeException(e);
- }
- });
- toStore.serialize(documentUri, output);
+ fromStore.deSerialize(input, false);
+ if (fromVersion == SpdxMajorVersion.VERSION_3) {
+ copyV3ToV3(fromStore, toStore, excludeLicenseDetails);
+ } else if (toVersion == SpdxMajorVersion.VERSION_3) {
+ copyV2ToV3(fromStore, toStore, excludeLicenseDetails);
+ } else {
+ copyV2ToV2(fromStore, toStore, excludeLicenseDetails);
+ }
+ toStore.serialize(output);
} catch (Exception ex) {
String msg = "Error converting SPDX file: "+ex.getClass().toString();
if (Objects.nonNull(ex.getMessage())) {
@@ -239,6 +242,112 @@ public static void convert(String fromFilePath, String toFilePath, SerFileType f
}
+ /**
+ * Copies all data from the SPDX spec version 2 fromStore to an SPDX spec version 2 store
+ * @param fromStore store to copy from
+ * @param toStore store to copy to
+ * @param excludeLicenseDetails If true, don't copy over properties of the listed licenses
+ * @throws InvalidSPDXAnalysisException on copy errors
+ */
+ private static void copyV2ToV2(ISerializableModelStore fromStore,
+ ISerializableModelStore toStore, boolean excludeLicenseDetails) throws InvalidSPDXAnalysisException {
+ String documentUri = SpdxToolsHelper.getDocFromStoreCompatV2(fromStore).getDocumentUri();
+ if (toStore instanceof RdfStore) {
+ ((RdfStore) toStore).setDocumentUri(documentUri, false);
+ ((RdfStore) toStore).setDontStoreLicenseDetails(excludeLicenseDetails);
+ }
+ ModelCopyManager copyManager = new ModelCopyManager();
+ // Need to copy the external document refs first so that they line up with the references
+ fromStore.getAllItems(documentUri, SpdxConstantsCompatV2.CLASS_EXTERNAL_DOC_REF).forEach(tv -> {
+ try {
+ copyManager.copy(toStore, fromStore, tv.getObjectUri(), tv.getSpecVersion(),
+ documentUri + "#");
+ } catch (InvalidSPDXAnalysisException e) {
+ throw new RuntimeException(e);
+ }
+ });
+ fromStore.getAllItems(documentUri, null).forEach(tv -> {
+ try {
+ if (!SpdxConstantsCompatV2.CLASS_EXTERNAL_DOC_REF.equals(tv.getType()) &&
+ !(excludeLicenseDetails && SpdxConstantsCompatV2.CLASS_CROSS_REF.equals(tv.getType()))) {
+ copyManager.copy(toStore, fromStore, tv.getObjectUri(), tv.getSpecVersion(), documentUri);
+ }
+ } catch (InvalidSPDXAnalysisException e) {
+ throw new RuntimeException(e);
+ }
+ });
+ }
+
+ /**
+ * Copies all data from the SPDX spec version 2 fromStore to an SPDX spec version 3 store
+ * @param fromStore store to copy from
+ * @param toStore store to copy to
+ * @param excludeLicenseDetails If true, don't copy over properties of the listed licenses
+ * @throws InvalidSPDXAnalysisException on copy errors
+ */
+ private static void copyV2ToV3(ISerializableModelStore fromStore,
+ ISerializableModelStore toStore, boolean excludeLicenseDetails) throws InvalidSPDXAnalysisException {
+ ModelCopyManager copyManager = new ModelCopyManager();
+ org.spdx.library.model.v2.SpdxDocument fromDoc = SpdxToolsHelper.getDocFromStoreCompatV2(fromStore);
+ String toUriPrefix = fromDoc.getDocumentUri() + "-specv3/";
+ CreationInfo defaultCreationInfo = Spdx2to3Converter.convertCreationInfo(fromDoc.getCreationInfo(),
+ toStore, toUriPrefix);
+ Spdx2to3Converter converter = new Spdx2to3Converter(toStore, copyManager, defaultCreationInfo,
+ SpdxModelFactory.getLatestSpecVersion(), toUriPrefix);
+ converter.convertAndStore(fromDoc);
+ // Make sure we get all files, packages and snippets - any relationships and annotations will be copied
+ // as properties. Note that the conversion of the document should already have been copied.
+ SpdxModelFactory.getSpdxObjects(fromStore, copyManager, SpdxConstantsCompatV2.CLASS_SPDX_FILE,
+ fromDoc.getDocumentUri(), fromDoc.getDocumentUri()).forEach(f -> {
+ if (!converter.alreadyCopied((((org.spdx.library.model.v2.SpdxFile)f).getObjectUri()))) {
+ try {
+ converter.convertAndStore((org.spdx.library.model.v2.SpdxFile)f);
+ } catch (InvalidSPDXAnalysisException e) {
+ throw new RuntimeException("Error upgrading file "+f+" from spec version 2 to spec version 3",e);
+ }
+ }
+ });
+ SpdxModelFactory.getSpdxObjects(fromStore, copyManager, SpdxConstantsCompatV2.CLASS_SPDX_PACKAGE,
+ fromDoc.getDocumentUri(), fromDoc.getDocumentUri()).forEach(p -> {
+ if (!converter.alreadyCopied((((org.spdx.library.model.v2.SpdxPackage)p).getObjectUri()))) {
+ try {
+ converter.convertAndStore((org.spdx.library.model.v2.SpdxPackage)p);
+ } catch (InvalidSPDXAnalysisException e) {
+ throw new RuntimeException("Error upgrading package "+p+" from spec version 2 to spec version 3",e);
+ }
+ }
+ });
+ SpdxModelFactory.getSpdxObjects(fromStore, copyManager, SpdxConstantsCompatV2.CLASS_SPDX_SNIPPET,
+ fromDoc.getDocumentUri(), fromDoc.getDocumentUri()).forEach(s -> {
+ if (!converter.alreadyCopied((((org.spdx.library.model.v2.SpdxSnippet)s).getObjectUri()))) {
+ try {
+ converter.convertAndStore((org.spdx.library.model.v2.SpdxSnippet)s);
+ } catch (InvalidSPDXAnalysisException e) {
+ throw new RuntimeException("Error upgrading snippet "+s+" from spec version 2 to spec version 3",e);
+ }
+ }
+ });
+ }
+
+ /**
+ * Copies all data from the SPDX spec version 3 fromStore to an SPDX spec version 3 store
+ * @param fromStore store to copy from
+ * @param toStore store to copy to
+ * @param excludeLicenseDetails If true, don't copy over properties of the listed licenses
+ * @throws InvalidSPDXAnalysisException on copy errors
+ */
+ private static void copyV3ToV3(ISerializableModelStore fromStore,
+ ISerializableModelStore toStore, boolean excludeLicenseDetails) throws InvalidSPDXAnalysisException {
+ ModelCopyManager copyManager = new ModelCopyManager();
+ fromStore.getAllItems(null, null).forEach(tv -> {
+ try {
+ copyManager.copy(toStore, fromStore, tv.getObjectUri(), tv.getSpecVersion(), null);
+ } catch (InvalidSPDXAnalysisException e) {
+ throw new RuntimeException(e);
+ }
+ });
+ }
+
private static void usage() {
System.out.println("Usage:");
System.out.println("SpdxConverter fromFilePath toFilePath [fromFileType] [toFileType]");
diff --git a/src/main/java/org/spdx/tools/SpdxToolsHelper.java b/src/main/java/org/spdx/tools/SpdxToolsHelper.java
index 7e43e58..5c525b7 100644
--- a/src/main/java/org/spdx/tools/SpdxToolsHelper.java
+++ b/src/main/java/org/spdx/tools/SpdxToolsHelper.java
@@ -26,14 +26,23 @@
import java.io.InputStream;
import java.util.Collections;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.Objects;
+import java.util.Scanner;
+import java.util.stream.Collectors;
import org.spdx.jacksonstore.MultiFormatStore;
import org.spdx.jacksonstore.MultiFormatStore.Format;
import org.spdx.jacksonstore.MultiFormatStore.Verbose;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxDocument;
+import org.spdx.core.CoreModelObject;
+import org.spdx.core.DefaultModelStore;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.ModelCopyManager;
+import org.spdx.library.SpdxModelFactory;
+import org.spdx.library.model.v2.SpdxConstantsCompatV2;
+import org.spdx.library.model.v2.SpdxDocument;
+import org.spdx.library.model.v3_0_1.SpdxConstantsV3;
import org.spdx.spdxRdfStore.OutputFormat;
import org.spdx.spdxRdfStore.RdfStore;
import org.spdx.spreadsheetstore.SpreadsheetStore;
@@ -41,6 +50,7 @@
import org.spdx.storage.ISerializableModelStore;
import org.spdx.storage.simple.InMemSpdxStore;
import org.spdx.tagvaluestore.TagValueStore;
+import org.spdx.v3jsonldstore.JsonLDStore;
/**
* Static helper methods for the various tools
@@ -51,7 +61,7 @@
public class SpdxToolsHelper {
public enum SerFileType {
- JSON, RDFXML, XML, XLS, XLSX, YAML, TAG, RDFTTL
+ JSON, RDFXML, XML, XLS, XLSX, YAML, TAG, RDFTTL, JSONLD
}
static final String XML_INPUT_FACTORY_PROPERTY_KEY = "javax.xml.stream.XMLInputFactory";
@@ -59,6 +69,8 @@ public enum SerFileType {
static Map EXT_TO_FILETYPE;
static {
HashMap temp = new HashMap<>();
+ temp.put("jsonld.json", SerFileType.JSONLD);
+ temp.put("jsonld", SerFileType.JSONLD);
temp.put("json", SerFileType.JSON);
temp.put("rdf.xml", SerFileType.RDFXML);
temp.put("rdf", SerFileType.RDFXML);
@@ -110,6 +122,8 @@ public static ISerializableModelStore fileTypeToStore(SerFileType fileType)
case YAML :
return new MultiFormatStore(new InMemSpdxStore(), Format.YAML,
Verbose.COMPACT);
+ case JSONLD :
+ return new JsonLDStore(new InMemSpdxStore());
default :
throw new InvalidSPDXAnalysisException("Unsupported file type: "
+ fileType + ". Check back later.");
@@ -139,8 +153,35 @@ public static SerFileType fileToFileType(File file)
if (fileName.endsWith("rdf.ttl")) {
ext = "rdf.ttl";
}
+ }if ("json".equals(ext)) {
+ if (fileName.endsWith("jsonld.json")) {
+ ext = "jsonld.json";
+ }
}
SerFileType retval = EXT_TO_FILETYPE.get(ext);
+ if (SerFileType.JSON.equals(retval)) {
+ // we need to check for a JSON-LD file type
+ try (Scanner scanner = new Scanner(file)) {
+ scanner.useDelimiter("\"");
+ boolean foundContext = false;
+ boolean foundRdfUri = false;
+ while (scanner.hasNext()) {
+ String line = scanner.next().toLowerCase();
+ if (line.contains("https://spdx.org/rdf/3.")) {
+ foundRdfUri = true;
+ }
+ if (line.contains("@context")) {
+ foundContext = true;
+ }
+ if (foundContext && foundRdfUri) {
+ retval = SerFileType.JSONLD;
+ break;
+ }
+ }
+ } catch (FileNotFoundException e) {
+ // We'll assume it is just a JSON file
+ }
+ }
if (Objects.isNull(retval)) {
throw new InvalidFileNameException(
"Unrecognized file extension: " + ext + " for file "+file.getPath());
@@ -166,11 +207,14 @@ public static SerFileType strToFileType(String str) {
* @throws IOException
* @throws InvalidFileNameException
*/
- public static SpdxDocument deserializeDocument(File file)
+ public static SpdxDocument deserializeDocumentCompatV2(File file)
throws InvalidSPDXAnalysisException, IOException,
InvalidFileNameException {
ISerializableModelStore store = fileTypeToStore(fileToFileType(file));
- return readDocumentFromFile(store, file);
+ if (!supportsV2(store)) {
+ throw new RuntimeException("Store does not support SPDX version 2");
+ }
+ return readDocumentFromFileCompatV2(store, file);
}
/**
* @param file
@@ -182,23 +226,63 @@ public static SpdxDocument deserializeDocument(File file)
* @throws InvalidSPDXAnalysisException
* @throws IOException
*/
- public static SpdxDocument deserializeDocument(File file,
+ public static SpdxDocument deserializeDocumentCompatV2(File file,
SerFileType fileType)
throws InvalidSPDXAnalysisException, IOException {
ISerializableModelStore store = fileTypeToStore(fileType);
- return readDocumentFromFile(store, file);
+ if (!supportsV2(store)) {
+ throw new RuntimeException("Store does not support SPDX version 2");
+ }
+ return readDocumentFromFileCompatV2(store, file);
}
/**
- * Reads an SPDX Document from a file
- * @param store Store where the document is to be stored
+ * @param file
+ * file containing an SPDX document with the standard file
+ * extension for the serialization formats
+ * @return the SPDX document stored in the file
+ * @throws InvalidSPDXAnalysisException
+ * @throws IOException
+ * @throws InvalidFileNameException
+ */
+ public static org.spdx.library.model.v3_0_1.core.SpdxDocument deserializeDocumentCompat(File file)
+ throws InvalidSPDXAnalysisException, IOException,
+ InvalidFileNameException {
+ ISerializableModelStore store = fileTypeToStore(fileToFileType(file));
+ if (!supportsV3(store)) {
+ throw new RuntimeException("Store does not support SPDX version 3");
+ }
+ return readDocumentFromFileV3(store, file);
+ }
+ /**
+ * @param file
+ * file containing an SPDX document in one of the supported
+ * SerFileTypes
+ * @param fileType
+ * serialization file type
+ * @return the SPDX document stored in the file
+ * @throws InvalidSPDXAnalysisException
+ * @throws IOException
+ */
+ public static org.spdx.library.model.v3_0_1.core.SpdxDocument deserializeDocument(File file,
+ SerFileType fileType)
+ throws InvalidSPDXAnalysisException, IOException {
+ ISerializableModelStore store = fileTypeToStore(fileType);
+ if (!supportsV3(store)) {
+ throw new RuntimeException("Store does not support SPDX version 3");
+ }
+ return readDocumentFromFileV3(store, file);
+ }
+
+ /**
+ * Reads SPDX data from a file and stores it in the store
+ * @param store Store where the SPDX data is to be stored
* @param file File to read the store from
- * @return SPDX Document from the store
* @throws FileNotFoundException If the file is not found
* @throws IOException If there is an error reading the file
* @throws InvalidSPDXAnalysisException If there is a problem in the SPDX document structure
*/
- public static SpdxDocument readDocumentFromFile(ISerializableModelStore store, File file) throws FileNotFoundException, IOException, InvalidSPDXAnalysisException {
+ public static void deserializeFile(ISerializableModelStore store, File file) throws FileNotFoundException, IOException, InvalidSPDXAnalysisException {
String oldXmlInputFactory = null;
boolean propertySet = false;
try (InputStream is = new FileInputStream(file)) {
@@ -213,8 +297,7 @@ public static SpdxDocument readDocumentFromFile(ISerializableModelStore store, F
propertySet = false; // we'll just deal with the extra error message
}
}
- String documentUri = store.deSerialize(is, false);
- return new SpdxDocument(store, documentUri, null, false);
+ store.deSerialize(is, false);
} finally {
if (propertySet) {
if (Objects.isNull(oldXmlInputFactory)) {
@@ -225,4 +308,117 @@ public static SpdxDocument readDocumentFromFile(ISerializableModelStore store, F
}
}
}
+
+ /**
+ * @param store model store
+ * @return true of the model store support SPDX spec version 3
+ */
+ public static boolean supportsV3(ISerializableModelStore store) {
+ return store instanceof JsonLDStore;
+ }
+
+ /**
+ * @param store model store
+ * @return true of the model store support SPDX spec version 2
+ */
+ public static boolean supportsV2(ISerializableModelStore store) {
+ return !(store instanceof JsonLDStore);
+ }
+
+ /**
+ * Reads an SPDX Document from a file
+ * @param store Store where the document is to be stored
+ * @param file File to read the store from
+ * @return SPDX Document from the store
+ * @throws FileNotFoundException If the file is not found
+ * @throws IOException If there is an error reading the file
+ * @throws InvalidSPDXAnalysisException If there is a problem in the SPDX document structure
+ */
+ public static org.spdx.library.model.v3_0_1.core.SpdxDocument readDocumentFromFileV3(ISerializableModelStore store, File file) throws FileNotFoundException, IOException, InvalidSPDXAnalysisException {
+ if (!supportsV3(store)) {
+ throw new RuntimeException("Store does not support SPDX version 3");
+ }
+ deserializeFile(store, file);
+ return getDocFromStore(store);
+ }
+
+ /**
+ * Reads an SPDX Document from a file
+ * @param store Store where the document is to be stored
+ * @param file File to read the store from
+ * @return SPDX Document from the store
+ * @throws FileNotFoundException If the file is not found
+ * @throws IOException If there is an error reading the file
+ * @throws InvalidSPDXAnalysisException If there is a problem in the SPDX document structure
+ */
+ public static CoreModelObject readDocumentFromFile(ISerializableModelStore store, File file) throws FileNotFoundException, IOException, InvalidSPDXAnalysisException {
+ if (store instanceof JsonLDStore) {
+ return readDocumentFromFileV3(store, file);
+ } else {
+ return readDocumentFromFileCompatV2(store, file);
+ }
+ }
+
+ /**
+ * Reads an SPDX Document from a file
+ * @param store Store where the document is to be stored
+ * @param file File to read the store from
+ * @return SPDX Document from the store
+ * @throws FileNotFoundException If the file is not found
+ * @throws IOException If there is an error reading the file
+ * @throws InvalidSPDXAnalysisException If there is a problem in the SPDX document structure
+ */
+ public static SpdxDocument readDocumentFromFileCompatV2(ISerializableModelStore store, File file) throws FileNotFoundException, IOException, InvalidSPDXAnalysisException {
+ if (!supportsV2(store)) {
+ throw new RuntimeException("Store does not support SPDX version 2");
+ }
+ deserializeFile(store, file);
+ return getDocFromStoreCompatV2(store);
+ }
+
+ /**
+ * @param store model store
+ * @return returns a document if a single document is found in the model store
+ * @throws InvalidSPDXAnalysisException
+ */
+ public static org.spdx.library.model.v3_0_1.core.SpdxDocument getDocFromStore(ISerializableModelStore store) throws InvalidSPDXAnalysisException {
+ @SuppressWarnings("unchecked")
+ List docs =
+ (List)SpdxModelFactory.getSpdxObjects(store, null, SpdxConstantsV3.CORE_SPDX_DOCUMENT, null, null)
+ .collect(Collectors.toList());
+ if (docs.isEmpty()) {
+ // TODO: We could construct an SPDX document just from the serialization information
+ throw new InvalidSPDXAnalysisException("No SPDX version 3 documents in model store");
+ }
+ if (docs.size() > 1) {
+ throw new InvalidSPDXAnalysisException("Multiple SPDX version 3 documents in modelSTore. There can only be one SPDX document.");
+ }
+ return docs.get(0);
+ }
+
+ /**
+ * @param store model store
+ * @return returns a document if a single document is found in the model store
+ * @throws InvalidSPDXAnalysisException
+ */
+ public static SpdxDocument getDocFromStoreCompatV2(ISerializableModelStore store) throws InvalidSPDXAnalysisException {
+ @SuppressWarnings("unchecked")
+ List docs = (List)SpdxModelFactory.getSpdxObjects(store, null, SpdxConstantsCompatV2.CLASS_SPDX_DOCUMENT, null, null)
+ .collect(Collectors.toList());
+ if (docs.isEmpty()) {
+ throw new InvalidSPDXAnalysisException("No SPDX version 2 documents in model store");
+ }
+ if (docs.size() > 1) {
+ throw new InvalidSPDXAnalysisException("Multiple SPDX version 2 documents in modelSTore. There can only be one SPDX document.");
+ }
+ return docs.get(0);
+ }
+
+ /**
+ * Initializes the model registry and default model stores
+ */
+ public static void initialize() {
+ SpdxModelFactory.init();
+ DefaultModelStore.initialize(new InMemSpdxStore(), "https://spdx.org/documents/default", new ModelCopyManager());
+ }
}
diff --git a/src/main/java/org/spdx/tools/SpdxVersion.java b/src/main/java/org/spdx/tools/SpdxVersion.java
index 7245374..b432b60 100644
--- a/src/main/java/org/spdx/tools/SpdxVersion.java
+++ b/src/main/java/org/spdx/tools/SpdxVersion.java
@@ -19,18 +19,41 @@
*/
package org.spdx.tools;
-import org.spdx.library.Version;
-import org.spdx.library.model.license.ListedLicenses;
-
import java.io.IOException;
+import java.util.Comparator;
import java.util.Properties;
+import org.spdx.library.ListedLicenses;
+import org.spdx.library.SpdxModelFactory;
+
/**
* Static helper methods for tools and library version information
*
* @author Hirumal Priyashan
*/
public class SpdxVersion {
+
+ static class SpdxVersionComparer implements Comparator {
+
+ /**
+ * @param version version to normalize - may be an SPDX 2.X style or a 3.X SemVer style
+ * @return version normalized to SemVer
+ */
+ private String normalizeVersion(String version) {
+ if (version.startsWith("SPDX-")) {
+ return version.substring("SPDX-".length());
+ } else {
+ return version;
+ }
+ }
+
+ @Override
+ public int compare(String versionA, String versionB) {
+ return normalizeVersion(versionA).compareTo(normalizeVersion(versionB));
+ }
+
+
+ }
/**
* Getter for the current tool Version
@@ -53,7 +76,14 @@ public static String getCurrentToolVersion() {
* @return The library specification version
*/
public static String getLibraryVersion() {
- return Version.CURRENT_SPDX_VERSION;
+ return SpdxModelFactory.IMPLEMENTATION_VERSION;
+ }
+
+ /**
+ * @return the latest spec version supported
+ */
+ public static String getLatestSpecVersion() {
+ return SpdxModelFactory.getLatestSpecVersion();
}
/**
diff --git a/src/main/java/org/spdx/tools/SpdxViewer.java b/src/main/java/org/spdx/tools/SpdxViewer.java
index 8451532..6510b30 100644
--- a/src/main/java/org/spdx/tools/SpdxViewer.java
+++ b/src/main/java/org/spdx/tools/SpdxViewer.java
@@ -23,8 +23,8 @@
import java.util.Objects;
import java.util.Properties;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxDocument;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.SpdxDocument;
import org.spdx.storage.ISerializableModelStore;
import org.spdx.tag.CommonCode;
import org.spdx.tools.SpdxToolsHelper.SerFileType;
@@ -63,6 +63,7 @@ public static void main(String[] args) {
if (args.length > MAX_ARGS) {
System.out.printf("Warning: Extra arguments will be ignored");
}
+ SpdxToolsHelper.initialize();
SpdxDocument doc = null;
ISerializableModelStore store = null;
PrintWriter writer = null;
@@ -92,7 +93,7 @@ public static void main(String[] args) {
}
try {
- doc = SpdxToolsHelper.readDocumentFromFile(store, file);
+ doc = SpdxToolsHelper.readDocumentFromFileCompatV2(store, file);
} catch (Exception ex) {
System.out
.print("Error creating SPDX Document: " + ex.getMessage());
diff --git a/src/main/java/org/spdx/tools/Verify.java b/src/main/java/org/spdx/tools/Verify.java
index 3f31228..1b4be91 100644
--- a/src/main/java/org/spdx/tools/Verify.java
+++ b/src/main/java/org/spdx/tools/Verify.java
@@ -17,26 +17,31 @@
package org.spdx.tools;
import java.io.File;
+import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
+import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.Set;
import com.fasterxml.jackson.core.JsonParseException;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.Version;
-import org.spdx.library.model.SpdxDocument;
+
+import org.spdx.core.CoreModelObject;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.Version;
import org.spdx.storage.ISerializableModelStore;
import org.spdx.tagvaluestore.TagValueStore;
import org.spdx.tools.SpdxToolsHelper.SerFileType;
import com.fasterxml.jackson.databind.JsonNode;
-import com.github.fge.jackson.JsonLoader;
-import com.github.fge.jsonschema.core.exceptions.ProcessingException;
-import com.github.fge.jsonschema.core.report.ProcessingReport;
-import com.github.fge.jsonschema.main.JsonSchema;
-import com.github.fge.jsonschema.main.JsonSchemaFactory;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.networknt.schema.JsonSchema;
+import com.networknt.schema.JsonSchemaFactory;
+import com.networknt.schema.SpecVersion.VersionFlag;
+import com.networknt.schema.ValidationMessage;
/**
* Verifies an SPDX document and lists any verification errors
@@ -48,8 +53,11 @@ public class Verify {
static final int MIN_ARGS = 1;
static final int MAX_ARGS = 2;
static final int ERROR_STATUS = 1;
- private static final String JSON_SCHEMA_RESOURCE_V2_3 = "/resources/spdx-schema-v2.3.json";
- private static final String JSON_SCHEMA_RESOURCE_V2_2 = "/resources/spdx-schema-v2.2.json";
+ private static final String JSON_SCHEMA_RESOURCE_V2_3 = "resources/spdx-schema-v2.3.json";
+ private static final String JSON_SCHEMA_RESOURCE_V2_2 = "resources/spdx-schema-v2.2.json";
+ private static final String JSON_SCHEMA_RESOURCE_V3 = "resources/spdx-schema-v3.0.1.json";
+
+ static final ObjectMapper JSON_MAPPER = new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT);
/**
* @param args args[0] SPDX file path; args[1] [RDFXML|JSON|XLS|XLSX|YAML|TAG] an optional file type - if not present, file type of the to file will be used
@@ -63,6 +71,7 @@ public static void main(String[] args) {
if (args.length > MAX_ARGS) {
System.out.printf("Warning: Extra arguments will be ignored");
}
+ SpdxToolsHelper.initialize();
List verify = null;
try {
SerFileType fileType = null;
@@ -141,7 +150,7 @@ public static List verify(String filePath, SerFileType fileType) throws
} catch (InvalidSPDXAnalysisException e) {
throw new SpdxVerificationException("Error converting fileType to store",e);
}
- SpdxDocument doc = null;
+ CoreModelObject doc = null;
try {
doc = SpdxToolsHelper.readDocumentFromFile(store, file);
} catch (FileNotFoundException e) {
@@ -158,34 +167,37 @@ public static List verify(String filePath, SerFileType fileType) throws
// add in any parser warnings
retval.addAll(((TagValueStore)store).getWarnings());
}
- if (SerFileType.JSON.equals(fileType)) {
+ if (SerFileType.JSON.equals(fileType) || SerFileType.JSONLD.equals(fileType)) {
try {
- String jsonSchemaResource = Version.versionLessThan(Version.TWO_POINT_THREE_VERSION, doc.getSpecVersion()) ?
+ String jsonSchemaResource;
+ if (SerFileType.JSON.equals(fileType)) {
+ jsonSchemaResource = Version.versionLessThan(Version.TWO_POINT_THREE_VERSION, doc.getSpecVersion()) ?
JSON_SCHEMA_RESOURCE_V2_2 : JSON_SCHEMA_RESOURCE_V2_3;
- JsonNode spdxJsonSchema = JsonLoader.fromResource(jsonSchemaResource);
- final JsonSchema schema = JsonSchemaFactory.byDefault().getJsonSchema(spdxJsonSchema);
- JsonNode spdxDocJson = JsonLoader.fromFile(file);
- ProcessingReport report = schema.validateUnchecked(spdxDocJson, true);
- report.spliterator().forEachRemaining(msg -> {
- JsonNode msgJson = msg.asJson();
- if (!msg.getMessage().contains("$id") && // Known warning - this is in the draft 7 spec - perhaps a bug in the validator?
- !msg.getMessage().contains("deprecated]")) { // We ignore deprecated warnings since the schema version is not supported
- JsonNode instance = msgJson.findValue("instance");
- String warningStr = msg.getMessage();
- if (Objects.nonNull(instance)) {
- warningStr = warningStr + " for " + instance.toString();
- }
- retval.add(warningStr);
- }
- });
+ } else {
+ jsonSchemaResource = JSON_SCHEMA_RESOURCE_V3;
+ }
+ JsonSchemaFactory jsonSchemaFactory = JsonSchemaFactory.getInstance(VersionFlag.V202012);
+ JsonSchema schema;
+ try (InputStream is = Verify.class.getResourceAsStream("/" + jsonSchemaResource)) {
+ schema = jsonSchemaFactory.getSchema(is);
+ }
+ JsonNode root;
+ try (InputStream is = new FileInputStream(file)) {
+ root = JSON_MAPPER.readTree(is);
+ }
+ Set messages = schema.validate(root);
+ for (ValidationMessage msg:messages) {
+ retval.add(msg.toString());
+ }
} catch (IOException e) {
retval.add("Unable to validate JSON file against schema due to I/O Error");
} catch (InvalidSPDXAnalysisException e) {
retval.add("Unable to validate JSON file against schema due to error in SPDX file");
- } catch (ProcessingException e) {
- retval.add("Unable to validate JSON file against schema due to processing exception");
}
}
+ if (SerFileType.JSONLD.equals(fileType)) {
+ //TODO: Implement verification against the OWL schema
+ }
List verify;
try {
verify = doc.verify(doc.getSpecVersion());
diff --git a/src/main/java/org/spdx/tools/compare/AbstractFileCompareSheet.java b/src/main/java/org/spdx/tools/compare/AbstractFileCompareSheet.java
index cd514e1..e42492f 100644
--- a/src/main/java/org/spdx/tools/compare/AbstractFileCompareSheet.java
+++ b/src/main/java/org/spdx/tools/compare/AbstractFileCompareSheet.java
@@ -24,8 +24,8 @@
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxFile;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.SpdxFile;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/CompareHelper.java b/src/main/java/org/spdx/tools/compare/CompareHelper.java
index 7943628..ad7121f 100644
--- a/src/main/java/org/spdx/tools/compare/CompareHelper.java
+++ b/src/main/java/org/spdx/tools/compare/CompareHelper.java
@@ -26,15 +26,15 @@
import java.util.Objects;
import java.util.Optional;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.Annotation;
-import org.spdx.library.model.Checksum;
-import org.spdx.library.model.ExternalRef;
-import org.spdx.library.model.ModelObject;
-import org.spdx.library.model.Relationship;
-import org.spdx.library.model.SpdxElement;
-import org.spdx.library.model.enumerations.FileType;
-import org.spdx.library.model.license.AnyLicenseInfo;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.Annotation;
+import org.spdx.library.model.v2.Checksum;
+import org.spdx.library.model.v2.ExternalRef;
+import org.spdx.library.model.v2.ModelObjectV2;
+import org.spdx.library.model.v2.Relationship;
+import org.spdx.library.model.v2.SpdxElement;
+import org.spdx.library.model.v2.enumerations.FileType;
+import org.spdx.library.model.v2.license.AnyLicenseInfo;
import org.spdx.library.referencetype.ListedReferenceTypes;
/**
@@ -367,7 +367,7 @@ public static String checksumToString(Optional checksum) throws Invali
}
}
- public static boolean equivalent(Optional extends ModelObject> c1, Optional extends ModelObject> c2) throws InvalidSPDXAnalysisException {
+ public static boolean equivalent(Optional extends ModelObjectV2> c1, Optional extends ModelObjectV2> c2) throws InvalidSPDXAnalysisException {
if (!c1.isPresent()) {
return !c2.isPresent();
}
@@ -378,7 +378,7 @@ public static boolean equivalent(Optional extends ModelObject> c1, Optional
}
}
- public static boolean equivalent(Collection extends ModelObject> collection1, Collection extends ModelObject> collection2) throws InvalidSPDXAnalysisException {
+ public static boolean equivalent(Collection extends ModelObjectV2> collection1, Collection extends ModelObjectV2> collection2) throws InvalidSPDXAnalysisException {
if (Objects.isNull(collection1)) {
return Objects.isNull(collection2);
}
@@ -388,9 +388,9 @@ public static boolean equivalent(Collection extends ModelObject> collection1,
if (collection1.size() != collection2.size()) {
return false;
}
- for (ModelObject o1:collection1) {
+ for (ModelObjectV2 o1:collection1) {
boolean found = false;
- for (ModelObject o2:collection2) {
+ for (ModelObjectV2 o2:collection2) {
if (o1.equivalent(o2)) {
found = true;
break;
diff --git a/src/main/java/org/spdx/tools/compare/CreatorSheet.java b/src/main/java/org/spdx/tools/compare/CreatorSheet.java
index 4f2bc7e..d67783c 100644
--- a/src/main/java/org/spdx/tools/compare/CreatorSheet.java
+++ b/src/main/java/org/spdx/tools/compare/CreatorSheet.java
@@ -25,7 +25,7 @@
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.InvalidSPDXAnalysisException;
+import org.spdx.core.InvalidSPDXAnalysisException;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/DocumentAnnotationSheet.java b/src/main/java/org/spdx/tools/compare/DocumentAnnotationSheet.java
index cddd798..28af862 100644
--- a/src/main/java/org/spdx/tools/compare/DocumentAnnotationSheet.java
+++ b/src/main/java/org/spdx/tools/compare/DocumentAnnotationSheet.java
@@ -27,8 +27,8 @@
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.Annotation;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.Annotation;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/DocumentRelationshipSheet.java b/src/main/java/org/spdx/tools/compare/DocumentRelationshipSheet.java
index 49b9e92..9237bd6 100644
--- a/src/main/java/org/spdx/tools/compare/DocumentRelationshipSheet.java
+++ b/src/main/java/org/spdx/tools/compare/DocumentRelationshipSheet.java
@@ -28,9 +28,9 @@
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.Relationship;
-import org.spdx.library.model.SpdxElement;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.Relationship;
+import org.spdx.library.model.v2.SpdxElement;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/DocumentSheet.java b/src/main/java/org/spdx/tools/compare/DocumentSheet.java
index a2e2846..8dc0e09 100644
--- a/src/main/java/org/spdx/tools/compare/DocumentSheet.java
+++ b/src/main/java/org/spdx/tools/compare/DocumentSheet.java
@@ -25,7 +25,7 @@
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.InvalidSPDXAnalysisException;
+import org.spdx.core.InvalidSPDXAnalysisException;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/ExternalReferencesSheet.java b/src/main/java/org/spdx/tools/compare/ExternalReferencesSheet.java
index 3f21c7c..7c3cb2f 100644
--- a/src/main/java/org/spdx/tools/compare/ExternalReferencesSheet.java
+++ b/src/main/java/org/spdx/tools/compare/ExternalReferencesSheet.java
@@ -28,9 +28,9 @@
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.Checksum;
-import org.spdx.library.model.ExternalDocumentRef;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.Checksum;
+import org.spdx.library.model.v2.ExternalDocumentRef;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/ExtractedLicenseSheet.java b/src/main/java/org/spdx/tools/compare/ExtractedLicenseSheet.java
index d18f7fe..0c23d7c 100644
--- a/src/main/java/org/spdx/tools/compare/ExtractedLicenseSheet.java
+++ b/src/main/java/org/spdx/tools/compare/ExtractedLicenseSheet.java
@@ -28,10 +28,10 @@
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.license.AnyLicenseInfo;
-import org.spdx.library.model.license.ExtractedLicenseInfo;
-import org.spdx.utility.compare.LicenseCompareHelper;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.license.AnyLicenseInfo;
+import org.spdx.library.model.v2.license.ExtractedLicenseInfo;
+import org.spdx.licenseTemplate.LicenseTextHelper;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
@@ -166,7 +166,7 @@ public void importCompareResults(SpdxComparer comparer, List docNames) t
if (extractedLicenses[i].length > licenseIndexes[i]) {
if (extractedLicenses[i][licenseIndexes[i]] instanceof ExtractedLicenseInfo) {
String compareExtractedText = ((ExtractedLicenseInfo)extractedLicenses[i][licenseIndexes[i]]).getExtractedText();
- if (LicenseCompareHelper.isLicenseTextEquivalent(extractedLicenseText,
+ if (LicenseTextHelper.isLicenseTextEquivalent(extractedLicenseText,
compareExtractedText)) {
Cell licenseIdCell = currentRow.createCell(FIRST_LIC_ID_COL+i);
licenseIdCell.setCellValue(formatLicenseInfo((ExtractedLicenseInfo)extractedLicenses[i][licenseIndexes[i]]));
diff --git a/src/main/java/org/spdx/tools/compare/FileAnnotationSheet.java b/src/main/java/org/spdx/tools/compare/FileAnnotationSheet.java
index 1b1f3f7..21b372f 100644
--- a/src/main/java/org/spdx/tools/compare/FileAnnotationSheet.java
+++ b/src/main/java/org/spdx/tools/compare/FileAnnotationSheet.java
@@ -17,8 +17,8 @@
package org.spdx.tools.compare;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxFile;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.SpdxFile;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/FileAttributionSheet.java b/src/main/java/org/spdx/tools/compare/FileAttributionSheet.java
index 1850612..36a9020 100644
--- a/src/main/java/org/spdx/tools/compare/FileAttributionSheet.java
+++ b/src/main/java/org/spdx/tools/compare/FileAttributionSheet.java
@@ -20,8 +20,8 @@
import java.util.Iterator;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxFile;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.SpdxFile;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/FileChecksumSheet.java b/src/main/java/org/spdx/tools/compare/FileChecksumSheet.java
index 1f0f248..f063b54 100644
--- a/src/main/java/org/spdx/tools/compare/FileChecksumSheet.java
+++ b/src/main/java/org/spdx/tools/compare/FileChecksumSheet.java
@@ -20,8 +20,8 @@
import java.util.Objects;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxFile;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.SpdxFile;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/FileCommentSheet.java b/src/main/java/org/spdx/tools/compare/FileCommentSheet.java
index a6ecef2..c809b24 100644
--- a/src/main/java/org/spdx/tools/compare/FileCommentSheet.java
+++ b/src/main/java/org/spdx/tools/compare/FileCommentSheet.java
@@ -19,8 +19,8 @@
import java.util.Optional;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxFile;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.SpdxFile;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/FileConcludedSheet.java b/src/main/java/org/spdx/tools/compare/FileConcludedSheet.java
index c1e96db..24f6cfb 100644
--- a/src/main/java/org/spdx/tools/compare/FileConcludedSheet.java
+++ b/src/main/java/org/spdx/tools/compare/FileConcludedSheet.java
@@ -18,8 +18,8 @@
package org.spdx.tools.compare;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxFile;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.SpdxFile;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/FileContributorsSheet.java b/src/main/java/org/spdx/tools/compare/FileContributorsSheet.java
index 165e812..5812a9a 100644
--- a/src/main/java/org/spdx/tools/compare/FileContributorsSheet.java
+++ b/src/main/java/org/spdx/tools/compare/FileContributorsSheet.java
@@ -20,7 +20,7 @@
import java.util.Iterator;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.model.SpdxFile;
+import org.spdx.library.model.v2.SpdxFile;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/FileCopyrightSheet.java b/src/main/java/org/spdx/tools/compare/FileCopyrightSheet.java
index d63e014..6de6819 100644
--- a/src/main/java/org/spdx/tools/compare/FileCopyrightSheet.java
+++ b/src/main/java/org/spdx/tools/compare/FileCopyrightSheet.java
@@ -17,8 +17,8 @@
package org.spdx.tools.compare;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxFile;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.SpdxFile;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/FileLicenseCommentsSheet.java b/src/main/java/org/spdx/tools/compare/FileLicenseCommentsSheet.java
index b813559..8c71fc7 100644
--- a/src/main/java/org/spdx/tools/compare/FileLicenseCommentsSheet.java
+++ b/src/main/java/org/spdx/tools/compare/FileLicenseCommentsSheet.java
@@ -20,8 +20,8 @@
import java.util.Optional;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxFile;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.SpdxFile;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/FileLicenseInfoSheet.java b/src/main/java/org/spdx/tools/compare/FileLicenseInfoSheet.java
index 7760f9c..7881578 100644
--- a/src/main/java/org/spdx/tools/compare/FileLicenseInfoSheet.java
+++ b/src/main/java/org/spdx/tools/compare/FileLicenseInfoSheet.java
@@ -21,9 +21,9 @@
import java.util.Iterator;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxFile;
-import org.spdx.library.model.license.AnyLicenseInfo;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.SpdxFile;
+import org.spdx.library.model.v2.license.AnyLicenseInfo;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/FileNoticeSheet.java b/src/main/java/org/spdx/tools/compare/FileNoticeSheet.java
index 03d1652..0832232 100644
--- a/src/main/java/org/spdx/tools/compare/FileNoticeSheet.java
+++ b/src/main/java/org/spdx/tools/compare/FileNoticeSheet.java
@@ -19,8 +19,8 @@
import java.util.Optional;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxFile;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.SpdxFile;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/FileRelationshipSheet.java b/src/main/java/org/spdx/tools/compare/FileRelationshipSheet.java
index e424286..c389860 100644
--- a/src/main/java/org/spdx/tools/compare/FileRelationshipSheet.java
+++ b/src/main/java/org/spdx/tools/compare/FileRelationshipSheet.java
@@ -17,8 +17,8 @@
package org.spdx.tools.compare;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxFile;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.SpdxFile;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/FileSpdxIdSheet.java b/src/main/java/org/spdx/tools/compare/FileSpdxIdSheet.java
index 1ca68bf..d870ebc 100644
--- a/src/main/java/org/spdx/tools/compare/FileSpdxIdSheet.java
+++ b/src/main/java/org/spdx/tools/compare/FileSpdxIdSheet.java
@@ -17,7 +17,7 @@
package org.spdx.tools.compare;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.model.SpdxFile;
+import org.spdx.library.model.v2.SpdxFile;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/FileTypeSheet.java b/src/main/java/org/spdx/tools/compare/FileTypeSheet.java
index c6fb446..0e8c954 100644
--- a/src/main/java/org/spdx/tools/compare/FileTypeSheet.java
+++ b/src/main/java/org/spdx/tools/compare/FileTypeSheet.java
@@ -20,9 +20,9 @@
import java.util.Arrays;
import org.apache.poi.ss.usermodel.Workbook;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxFile;
-import org.spdx.library.model.enumerations.FileType;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.SpdxFile;
+import org.spdx.library.model.v2.enumerations.FileType;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/MultiDocumentSpreadsheet.java b/src/main/java/org/spdx/tools/compare/MultiDocumentSpreadsheet.java
index bba8104..7aefc16 100644
--- a/src/main/java/org/spdx/tools/compare/MultiDocumentSpreadsheet.java
+++ b/src/main/java/org/spdx/tools/compare/MultiDocumentSpreadsheet.java
@@ -33,8 +33,8 @@
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxFile;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.SpdxFile;
import org.spdx.spreadsheetstore.SpreadsheetException;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
diff --git a/src/main/java/org/spdx/tools/compare/PackageSheet.java b/src/main/java/org/spdx/tools/compare/PackageSheet.java
index 83d8122..1fcdfb8 100644
--- a/src/main/java/org/spdx/tools/compare/PackageSheet.java
+++ b/src/main/java/org/spdx/tools/compare/PackageSheet.java
@@ -31,10 +31,10 @@
import org.apache.poi.ss.usermodel.Workbook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxDocument;
-import org.spdx.library.model.SpdxPackage;
-import org.spdx.library.model.SpdxPackageVerificationCode;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.SpdxDocument;
+import org.spdx.library.model.v2.SpdxPackage;
+import org.spdx.library.model.v2.SpdxPackageVerificationCode;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
import org.spdx.utility.compare.SpdxPackageComparer;
diff --git a/src/main/java/org/spdx/tools/compare/SnippetSheet.java b/src/main/java/org/spdx/tools/compare/SnippetSheet.java
index a94b620..ac0dbe7 100644
--- a/src/main/java/org/spdx/tools/compare/SnippetSheet.java
+++ b/src/main/java/org/spdx/tools/compare/SnippetSheet.java
@@ -28,11 +28,11 @@
import org.apache.poi.ss.usermodel.Workbook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxDocument;
-import org.spdx.library.model.SpdxFile;
-import org.spdx.library.model.SpdxSnippet;
-import org.spdx.library.model.pointer.StartEndPointer;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.model.v2.SpdxDocument;
+import org.spdx.library.model.v2.SpdxFile;
+import org.spdx.library.model.v2.SpdxSnippet;
+import org.spdx.library.model.v2.pointer.StartEndPointer;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
import org.spdx.utility.compare.SpdxSnippetComparer;
diff --git a/src/main/java/org/spdx/tools/schema/AbstractOwlRdfConverter.java b/src/main/java/org/spdx/tools/schema/AbstractOwlRdfConverter.java
index 1372010..af16822 100644
--- a/src/main/java/org/spdx/tools/schema/AbstractOwlRdfConverter.java
+++ b/src/main/java/org/spdx/tools/schema/AbstractOwlRdfConverter.java
@@ -44,8 +44,8 @@
import org.apache.jena.util.iterator.ExtendedIterator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.spdx.library.SpdxConstants;
-import org.spdx.library.model.enumerations.SpdxEnumFactory;
+import org.spdx.library.model.v2.SpdxConstantsCompatV2;
+import org.spdx.library.model.v2.enumerations.SpdxEnumFactoryCompatV2;
/**
* Abstract class for implementing classes which convert from RDF/XML OWL format to some other format
@@ -63,7 +63,7 @@ public class AbstractOwlRdfConverter {
skipped.add("http://www.w3.org/2002/07/owl#qualifiedCardinality");
skipped.add("http://www.w3.org/2002/07/owl#deprecatedProperty");
skipped.add("http://www.w3.org/2002/07/owl#deprecatedClass");
- skipped.add(SpdxConstants.SPDX_NAMESPACE + "describesPackage"); // This is an old deprecated field from 1.0 which should be ignored - it was only used in RDF format
+ skipped.add(SpdxConstantsCompatV2.SPDX_NAMESPACE + "describesPackage"); // This is an old deprecated field from 1.0 which should be ignored - it was only used in RDF format
SKIPPED_PROPERTIES = Collections.unmodifiableSet(skipped);
}
@@ -75,8 +75,8 @@ public class AbstractOwlRdfConverter {
static {
Map renamedToOwl = new HashMap<>();
Map owlToRenamed = new HashMap<>();
- renamedToOwl.put(SpdxConstants.PROP_SPDX_SPEC_VERSION, SpdxConstants.PROP_SPDX_VERSION);
- owlToRenamed.put(SpdxConstants.PROP_SPDX_VERSION, SpdxConstants.PROP_SPDX_SPEC_VERSION);
+ renamedToOwl.put(SpdxConstantsCompatV2.PROP_SPDX_SPEC_VERSION.getName(), SpdxConstantsCompatV2.PROP_SPDX_VERSION.getName());
+ owlToRenamed.put(SpdxConstantsCompatV2.PROP_SPDX_VERSION.getName(), SpdxConstantsCompatV2.PROP_SPDX_SPEC_VERSION.getName());
RENAMED_PROPERTY_TO_OWL_PROPERTY = Collections.unmodifiableMap(renamedToOwl);
OWL_PROPERTY_TO_RENAMED_PROPERTY = Collections.unmodifiableMap(owlToRenamed);
}
@@ -124,7 +124,7 @@ private void interpretRestrictions(List restrictions) {
while (individualIter.hasNext()) {
Individual individual = individualIter.next();
if (individual.isURIResource()) {
- Enum> e = SpdxEnumFactory.uriToEnum.get(individual.getURI());
+ Enum> e = SpdxEnumFactoryCompatV2.uriToEnum.get(individual.getURI());
if (Objects.nonNull(e)) {
this.enumValues.add(e.toString());
this.enumProperty = true;
@@ -140,7 +140,7 @@ private void interpretRestrictions(List restrictions) {
while (hasValueIter.hasNext()) {
RDFNode hasValue = hasValueIter.next();
if (hasValue.isURIResource()) {
- Enum> e = SpdxEnumFactory.uriToEnum.get(hasValue.asResource().getURI());
+ Enum> e = SpdxEnumFactoryCompatV2.uriToEnum.get(hasValue.asResource().getURI());
if (Objects.nonNull(e)) {
this.enumValues.add(e.toString());
this.enumProperty = true;
@@ -217,7 +217,7 @@ private void interpretRestrictions(List restrictions) {
}
if (Objects.isNull(typeUri) && ("comment".equals(property.getLocalName()) || "seeAlso".equals(property.getLocalName()))) {
// A bit of a hack, the schema file can not store the type of rdfs:comment, so we must override it to xsd:string
- typeUri = SpdxConstants.XML_SCHEMA_NAMESPACE + "string";
+ typeUri = SpdxConstantsCompatV2.XML_SCHEMA_NAMESPACE + "string";
}
}
diff --git a/src/main/java/org/spdx/tools/schema/OwlToJsonContext.java b/src/main/java/org/spdx/tools/schema/OwlToJsonContext.java
index ab0ec77..792fa37 100644
--- a/src/main/java/org/spdx/tools/schema/OwlToJsonContext.java
+++ b/src/main/java/org/spdx/tools/schema/OwlToJsonContext.java
@@ -28,7 +28,7 @@
import org.apache.jena.ontology.OntProperty;
import org.apache.jena.util.iterator.ExtendedIterator;
import org.spdx.jacksonstore.MultiFormatStore;
-import org.spdx.library.SpdxConstants;
+import org.spdx.library.model.v2.SpdxConstantsCompatV2;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
@@ -46,13 +46,13 @@ public class OwlToJsonContext extends AbstractOwlRdfConverter {
static {
Map namespaceMap = new HashMap<>();
- namespaceMap.put(SpdxConstants.SPDX_NAMESPACE, "spdx");
- namespaceMap.put(SpdxConstants.RDFS_NAMESPACE, "rdfs");
- namespaceMap.put(SpdxConstants.RDF_NAMESPACE, "rdf");
- namespaceMap.put(SpdxConstants.RDF_POINTER_NAMESPACE, "rdfpointer");
- namespaceMap.put(SpdxConstants.OWL_NAMESPACE, "owl");
- namespaceMap.put(SpdxConstants.DOAP_NAMESPACE, "doap");
- namespaceMap.put(SpdxConstants.XML_SCHEMA_NAMESPACE, "xs");
+ namespaceMap.put(SpdxConstantsCompatV2.SPDX_NAMESPACE, "spdx");
+ namespaceMap.put(SpdxConstantsCompatV2.RDFS_NAMESPACE, "rdfs");
+ namespaceMap.put(SpdxConstantsCompatV2.RDF_NAMESPACE, "rdf");
+ namespaceMap.put(SpdxConstantsCompatV2.RDF_POINTER_NAMESPACE, "rdfpointer");
+ namespaceMap.put(SpdxConstantsCompatV2.OWL_NAMESPACE, "owl");
+ namespaceMap.put(SpdxConstantsCompatV2.DOAP_NAMESPACE, "doap");
+ namespaceMap.put(SpdxConstantsCompatV2.XML_SCHEMA_NAMESPACE, "xs");
NAMESPACES = Collections.unmodifiableMap(namespaceMap);
}
@@ -76,8 +76,8 @@ public ObjectNode convertToContext() {
documentContext.put("@type", "spdx:SpdxDocument");
documentContext.put("@id", "spdx:spdxDocument");
contexts.set("Document", documentContext);
- contexts.put(SpdxConstants.SPDX_IDENTIFIER, "@id");
- contexts.put(SpdxConstants.EXTERNAL_DOCUMENT_REF_IDENTIFIER, "@id");
+ contexts.put(SpdxConstantsCompatV2.SPDX_IDENTIFIER, "@id");
+ contexts.put(SpdxConstantsCompatV2.EXTERNAL_DOCUMENT_REF_IDENTIFIER, "@id");
TreeMap sortedOntProperties = new TreeMap<>();
ExtendedIterator iter = model.listAllOntProperties();
while (iter.hasNext()) {
diff --git a/src/main/java/org/spdx/tools/schema/OwlToJsonSchema.java b/src/main/java/org/spdx/tools/schema/OwlToJsonSchema.java
index e645de4..790c87f 100644
--- a/src/main/java/org/spdx/tools/schema/OwlToJsonSchema.java
+++ b/src/main/java/org/spdx/tools/schema/OwlToJsonSchema.java
@@ -33,11 +33,11 @@
import org.apache.jena.util.iterator.ExtendedIterator;
import org.spdx.jacksonstore.MultiFormatStore;
import org.spdx.jacksonstore.SpdxJsonLDContext;
-import org.spdx.library.SpdxConstants;
-import org.spdx.library.model.ReferenceType;
-import org.spdx.library.model.SpdxElement;
-import org.spdx.library.model.SpdxModelFactory;
-import org.spdx.library.model.license.AnyLicenseInfo;
+import org.spdx.library.model.v2.ReferenceType;
+import org.spdx.library.model.v2.SpdxConstantsCompatV2;
+import org.spdx.library.model.v2.SpdxElement;
+import org.spdx.library.model.v2.SpdxModelFactoryCompatV2;
+import org.spdx.library.model.v2.license.AnyLicenseInfo;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -66,18 +66,18 @@ public class OwlToJsonSchema extends AbstractOwlRdfConverter {
private static final String JSON_RESTRICTION_MAXITEMS = "maxItems";
private static final String SCHEMA_VERSION_URI = "https://json-schema.org/draft/2019-09/schema#";
- private static final String RELATIONSHIP_TYPE = SpdxConstants.SPDX_NAMESPACE + SpdxConstants.CLASS_RELATIONSHIP;
+ private static final String RELATIONSHIP_TYPE = SpdxConstantsCompatV2.SPDX_NAMESPACE + SpdxConstantsCompatV2.CLASS_RELATIONSHIP;
static ObjectMapper jsonMapper = new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT);
private static final Set USES_SPDXIDS;
static {
Set spdxids = new HashSet<>();
- spdxids.add(SpdxConstants.CLASS_SPDX_DOCUMENT);
- spdxids.add(SpdxConstants.CLASS_SPDX_ELEMENT);
- spdxids.add(SpdxConstants.CLASS_SPDX_FILE);
- spdxids.add(SpdxConstants.CLASS_SPDX_ITEM);
- spdxids.add(SpdxConstants.CLASS_SPDX_PACKAGE);
- spdxids.add(SpdxConstants.CLASS_SPDX_SNIPPET);
+ spdxids.add(SpdxConstantsCompatV2.CLASS_SPDX_DOCUMENT);
+ spdxids.add(SpdxConstantsCompatV2.CLASS_SPDX_ELEMENT);
+ spdxids.add(SpdxConstantsCompatV2.CLASS_SPDX_FILE);
+ spdxids.add(SpdxConstantsCompatV2.CLASS_SPDX_ITEM);
+ spdxids.add(SpdxConstantsCompatV2.CLASS_SPDX_PACKAGE);
+ spdxids.add(SpdxConstantsCompatV2.CLASS_SPDX_SNIPPET);
USES_SPDXIDS = Collections.unmodifiableSet(spdxids);
}
@@ -119,29 +119,29 @@ public ObjectNode convertToJsonSchema() {
schemaProp.put("description", schemaRefDescription);
properties.set("$schema", schemaProp);
- OntClass docClass = model.getOntClass(SpdxConstants.SPDX_NAMESPACE + SpdxConstants.CLASS_SPDX_DOCUMENT);
+ OntClass docClass = model.getOntClass(SpdxConstantsCompatV2.SPDX_NAMESPACE + SpdxConstantsCompatV2.CLASS_SPDX_DOCUMENT);
Objects.requireNonNull(docClass, "Missing SpdxDocument class in OWL document");
addClassProperties(docClass, properties, required);
// Add in the extra properties
- properties.set(SpdxConstants.PROP_DOCUMENT_NAMESPACE, createSimpleTypeSchema(JSON_TYPE_STRING,
+ properties.set(SpdxConstantsCompatV2.PROP_DOCUMENT_NAMESPACE.getName(), createSimpleTypeSchema(JSON_TYPE_STRING,
"The URI provides an unambiguous mechanism for other SPDX documents to reference SPDX elements within this SPDX document."));
- required.add(SpdxConstants.PROP_DOCUMENT_NAMESPACE);
+ required.add(SpdxConstantsCompatV2.PROP_DOCUMENT_NAMESPACE.getName());
ObjectNode describesProperty = toArraySchema(createSimpleTypeSchema(JSON_TYPE_STRING, "SPDX ID for each Package, File, or Snippet."),
"DEPRECATED: use relationships instead of this field. Packages, files and/or Snippets described by this SPDX document", 0);
describesProperty.put("deprecated", true);
describesProperty.put("$comment", "This field has been deprecated as it is a duplicate of using the SPDXRef-DOCUMENT DESCRIBES relationship");
- properties.set(SpdxConstants.PROP_DOCUMENT_DESCRIBES, describesProperty);
+ properties.set(SpdxConstantsCompatV2.PROP_DOCUMENT_DESCRIBES.getName(), describesProperty);
- OntClass packageClass = model.getOntClass(SpdxConstants.SPDX_NAMESPACE + SpdxConstants.CLASS_SPDX_PACKAGE);
+ OntClass packageClass = model.getOntClass(SpdxConstantsCompatV2.SPDX_NAMESPACE + SpdxConstantsCompatV2.CLASS_SPDX_PACKAGE);
Objects.requireNonNull(packageClass, "Missing SPDX Package class in OWL document");
properties.set("packages", toArrayPropertySchema(packageClass, 0));
- OntClass fileClass = model.getOntClass(SpdxConstants.SPDX_NAMESPACE + SpdxConstants.CLASS_SPDX_FILE);
+ OntClass fileClass = model.getOntClass(SpdxConstantsCompatV2.SPDX_NAMESPACE + SpdxConstantsCompatV2.CLASS_SPDX_FILE);
Objects.requireNonNull(fileClass, "Missing SPDX File class in OWL document");
properties.set("files", toArrayPropertySchema(fileClass, 0));
- OntClass snippetClass = model.getOntClass(SpdxConstants.SPDX_NAMESPACE + SpdxConstants.CLASS_SPDX_SNIPPET);
+ OntClass snippetClass = model.getOntClass(SpdxConstantsCompatV2.SPDX_NAMESPACE + SpdxConstantsCompatV2.CLASS_SPDX_SNIPPET);
Objects.requireNonNull(snippetClass, "Missing SPDX Snippet class in OWL document");
properties.set("snippets", toArrayPropertySchema(snippetClass, 0));
- OntClass relationshipClass = model.getOntClass(SpdxConstants.SPDX_NAMESPACE + SpdxConstants.CLASS_RELATIONSHIP);
+ OntClass relationshipClass = model.getOntClass(SpdxConstantsCompatV2.SPDX_NAMESPACE + SpdxConstantsCompatV2.CLASS_RELATIONSHIP);
Objects.requireNonNull(relationshipClass, "Missing SPDX Relationship class in OWL document");
properties.set("relationships", toArrayPropertySchema(relationshipClass, 0));
root.set("properties", properties);
@@ -187,11 +187,11 @@ private ObjectNode ontClassToJsonSchema(OntClass ontClass) {
retval.put(JSON_RESTRICTION_TYPE, JSON_TYPE_OBJECT);
ObjectNode properties = jsonMapper.createObjectNode();
ArrayNode required = jsonMapper.createArrayNode();
- if (ontClass.getLocalName().equals(SpdxConstants.CLASS_RELATIONSHIP)) {
+ if (ontClass.getLocalName().equals(SpdxConstantsCompatV2.CLASS_RELATIONSHIP)) {
// Need to add the spdxElementId
- properties.set(SpdxConstants.PROP_SPDX_ELEMENTID, createSimpleTypeSchema(JSON_TYPE_STRING,
+ properties.set(SpdxConstantsCompatV2.PROP_SPDX_ELEMENTID.getName(), createSimpleTypeSchema(JSON_TYPE_STRING,
"Id to which the SPDX element is related"));
- required.add(SpdxConstants.PROP_SPDX_ELEMENTID);
+ required.add(SpdxConstantsCompatV2.PROP_SPDX_ELEMENTID.getName());
}
addClassProperties(ontClass, properties, required);
if (properties.size() > 0) {
@@ -230,8 +230,8 @@ private ObjectNode createSimpleTypeSchema(String type, @Nullable String descript
private void addClassProperties(OntClass spdxClass, ObjectNode jsonSchemaProperties,
ArrayNode required) {
if (USES_SPDXIDS.contains(spdxClass.getLocalName())) {
- required.add(SpdxConstants.SPDX_IDENTIFIER);
- jsonSchemaProperties.set(SpdxConstants.SPDX_IDENTIFIER,
+ required.add(SpdxConstantsCompatV2.SPDX_IDENTIFIER);
+ jsonSchemaProperties.set(SpdxConstantsCompatV2.SPDX_IDENTIFIER,
createSimpleTypeSchema(JSON_TYPE_STRING,
"Uniquely identify any element in an SPDX document which may be referenced by other elements."));
}
@@ -342,9 +342,9 @@ private ObjectNode derivePropertySchema(OntProperty property, PropertyRestrictio
propertySchema.set("enum", enums);
} else if (restrictions.getTypeUri().equals("http://www.w3.org/2000/01/rdf-schema#Literal")) {
propertySchema.put(JSON_RESTRICTION_TYPE, JSON_TYPE_STRING);
- } else if (restrictions.getTypeUri().startsWith(SpdxConstants.XML_SCHEMA_NAMESPACE)) {
+ } else if (restrictions.getTypeUri().startsWith(SpdxConstantsCompatV2.XML_SCHEMA_NAMESPACE)) {
// Primitive type
- String primitiveType = restrictions.getTypeUri().substring(SpdxConstants.XML_SCHEMA_NAMESPACE.length());
+ String primitiveType = restrictions.getTypeUri().substring(SpdxConstantsCompatV2.XML_SCHEMA_NAMESPACE.length());
Class extends Object> primitiveClass = SpdxJsonLDContext.XMLSCHEMA_TYPE_TO_JAVA_CLASS.get(primitiveType);
Objects.requireNonNull(primitiveClass, "No primitive class found for type "+restrictions.getTypeUri());
if (Boolean.class.equals(primitiveClass)) {
@@ -356,11 +356,11 @@ private ObjectNode derivePropertySchema(OntProperty property, PropertyRestrictio
} else {
throw new RuntimeException("Unknown primitive class "+primitiveType);
}
- } else if (restrictions.getTypeUri().startsWith(SpdxConstants.SPDX_NAMESPACE)) {
- String spdxType = restrictions.getTypeUri().substring(SpdxConstants.SPDX_NAMESPACE.length());
- Class extends Object> clazz = SpdxModelFactory.SPDX_TYPE_TO_CLASS.get(spdxType);
+ } else if (restrictions.getTypeUri().startsWith(SpdxConstantsCompatV2.SPDX_NAMESPACE)) {
+ String spdxType = restrictions.getTypeUri().substring(SpdxConstantsCompatV2.SPDX_NAMESPACE.length());
+ Class extends Object> clazz = SpdxModelFactoryCompatV2.SPDX_TYPE_TO_CLASS_V2.get(spdxType);
if (Objects.nonNull(clazz) && (AnyLicenseInfo.class.isAssignableFrom(clazz))
- && !SpdxConstants.PROP_SPDX_EXTRACTED_LICENSES.equals(checkConvertRenamedPropertyName(property.getLocalName()))) {
+ && !SpdxConstantsCompatV2.PROP_SPDX_EXTRACTED_LICENSES.getName().equals(checkConvertRenamedPropertyName(property.getLocalName()))) {
// check for AnyLicenseInfo - these are strings with the exception of the extractedLicensingInfos which are the actual license description
JsonNode description = propertySchema.get("description");
if (Objects.isNull(description)) {
diff --git a/src/main/java/org/spdx/tools/schema/OwlToXsd.java b/src/main/java/org/spdx/tools/schema/OwlToXsd.java
index 15815f8..24c4741 100644
--- a/src/main/java/org/spdx/tools/schema/OwlToXsd.java
+++ b/src/main/java/org/spdx/tools/schema/OwlToXsd.java
@@ -50,7 +50,7 @@
import org.apache.ws.commons.schema.XmlSchemaSimpleTypeRestriction;
import org.apache.ws.commons.schema.XmlSchemaType;
import org.apache.ws.commons.schema.utils.NamespaceMap;
-import org.spdx.library.SpdxConstants;
+import org.spdx.library.model.v2.SpdxConstantsCompatV2;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.Text;
@@ -95,7 +95,7 @@ public XmlSchema convertToXsd() throws XmlSchemaSerializerException, SchemaExcep
// Add the top level element
XmlSchemaElement documentElement = new XmlSchemaElement(schema, true);
documentElement.setName("Document");
- documentElement.setSchemaTypeName(new QName(SpdxConstants.SPDX_NAMESPACE.substring(0, SpdxConstants.SPDX_NAMESPACE.length()-1), "SpdxDocument"));
+ documentElement.setSchemaTypeName(new QName(SpdxConstantsCompatV2.SPDX_NAMESPACE.substring(0, SpdxConstantsCompatV2.SPDX_NAMESPACE.length()-1), "SpdxDocument"));
addDocumentation(schema, documentElement, "Top level element for the SPDX document");
return schema;
}
@@ -123,7 +123,7 @@ private XmlSchemaType addComplexTypeToSchema(XmlSchema schema, OntClass type) th
if (superClassIter.hasNext()) {
OntClass superClass = superClassIter.next();
schemaExtension = new XmlSchemaComplexContentExtension();
- schemaExtension.setBaseTypeName(new QName(SpdxConstants.SPDX_NAMESPACE.substring(0, SpdxConstants.SPDX_NAMESPACE.length()-1), superClass.getLocalName()));
+ schemaExtension.setBaseTypeName(new QName(SpdxConstantsCompatV2.SPDX_NAMESPACE.substring(0, SpdxConstantsCompatV2.SPDX_NAMESPACE.length()-1), superClass.getLocalName()));
}
if (superClassIter.hasNext()) {
throw new SchemaException("Ambiguous superclasses for "+type.getLocalName());
@@ -141,9 +141,9 @@ private XmlSchemaType addComplexTypeToSchema(XmlSchema schema, OntClass type) th
Optional rdfType = getPropertyType(property);
if (rdfType.isPresent()) {
String typeNamespace;
- if (rdfType.get().getNameSpace().equals(SpdxConstants.RDF_POINTER_NAMESPACE) ||
- rdfType.get().getNameSpace().equals(SpdxConstants.DOAP_NAMESPACE)) {
- typeNamespace = SpdxConstants.SPDX_NAMESPACE.substring(0, SpdxConstants.SPDX_NAMESPACE.length()-1);
+ if (rdfType.get().getNameSpace().equals(SpdxConstantsCompatV2.RDF_POINTER_NAMESPACE) ||
+ rdfType.get().getNameSpace().equals(SpdxConstantsCompatV2.DOAP_NAMESPACE)) {
+ typeNamespace = SpdxConstantsCompatV2.SPDX_NAMESPACE.substring(0, SpdxConstantsCompatV2.SPDX_NAMESPACE.length()-1);
} else {
typeNamespace = rdfType.get().getNameSpace().substring(0, rdfType.get().getNameSpace().length()-1);
}
@@ -171,7 +171,7 @@ private XmlSchemaType addComplexTypeToSchema(XmlSchema schema, OntClass type) th
//TODO: Change the propertyMember to ref=
sequence.getItems().add(propertyMember);
}
- if (type.getLocalName().equals(SpdxConstants.CLASS_SPDX_ELEMENT)) {
+ if (type.getLocalName().equals(SpdxConstantsCompatV2.CLASS_SPDX_ELEMENT)) {
// Manually add in SPDXID
XmlSchemaElement propertyMember = new XmlSchemaElement(schema, false);
propertyMember.setName("SPDXID");
diff --git a/src/test/java/org/spdx/tools/CompareSpdxDocsTest.java b/src/test/java/org/spdx/tools/CompareSpdxDocsTest.java
index 4f4dcf1..b0d8407 100644
--- a/src/test/java/org/spdx/tools/CompareSpdxDocsTest.java
+++ b/src/test/java/org/spdx/tools/CompareSpdxDocsTest.java
@@ -27,8 +27,14 @@
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
-import org.spdx.library.InvalidSPDXAnalysisException;
+import org.spdx.core.DefaultModelStore;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.core.ModelRegistry;
+import org.spdx.library.ModelCopyManager;
+import org.spdx.library.model.v2.SpdxModelInfoV2_X;
+import org.spdx.library.model.v3_0_1.SpdxModelInfoV3_0;
import org.spdx.spreadsheetstore.SpreadsheetException;
+import org.spdx.storage.simple.InMemSpdxStore;
import org.spdx.tools.compare.DocumentSheet;
import org.spdx.tools.compare.MultiDocumentSpreadsheet;
@@ -69,6 +75,9 @@ public class CompareSpdxDocsTest extends TestCase {
*/
protected void setUp() throws Exception {
super.setUp();
+ ModelRegistry.getModelRegistry().registerModel(new SpdxModelInfoV3_0());
+ ModelRegistry.getModelRegistry().registerModel(new SpdxModelInfoV2_X());
+ DefaultModelStore.initialize(new InMemSpdxStore(), "http://default/namespace", new ModelCopyManager());
tempDirPath = Files.createTempDirectory("spdx-tools-test-");
}
@@ -77,7 +86,7 @@ protected void setUp() throws Exception {
*/
protected void tearDown() throws Exception {
super.tearDown();
- SpdxConverterTest.deleteDirAndFiles(tempDirPath);
+ SpdxConverterTestV2.deleteDirAndFiles(tempDirPath);
}
public void testCompareDocumentsv23() throws OnlineToolException, InvalidSPDXAnalysisException, IOException, InvalidFileNameException {
diff --git a/src/test/java/org/spdx/tools/GenerateVerificationCodeTest.java b/src/test/java/org/spdx/tools/GenerateVerificationCodeTest.java
index c9b49d3..5c437a7 100644
--- a/src/test/java/org/spdx/tools/GenerateVerificationCodeTest.java
+++ b/src/test/java/org/spdx/tools/GenerateVerificationCodeTest.java
@@ -2,8 +2,14 @@
import java.io.File;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxPackageVerificationCode;
+import org.spdx.core.DefaultModelStore;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.core.ModelRegistry;
+import org.spdx.library.ModelCopyManager;
+import org.spdx.library.model.v2.SpdxModelInfoV2_X;
+import org.spdx.library.model.v2.SpdxPackageVerificationCode;
+import org.spdx.library.model.v3_0_1.SpdxModelInfoV3_0;
+import org.spdx.storage.simple.InMemSpdxStore;
import junit.framework.TestCase;
@@ -14,6 +20,9 @@ public class GenerateVerificationCodeTest extends TestCase {
protected void setUp() throws Exception {
super.setUp();
+ ModelRegistry.getModelRegistry().registerModel(new SpdxModelInfoV3_0());
+ ModelRegistry.getModelRegistry().registerModel(new SpdxModelInfoV2_X());
+ DefaultModelStore.initialize(new InMemSpdxStore(), "http://default/namespace", new ModelCopyManager());
}
protected void tearDown() throws Exception {
diff --git a/src/test/java/org/spdx/tools/SpdxConverterTest.java b/src/test/java/org/spdx/tools/SpdxConverterTestV2.java
similarity index 80%
rename from src/test/java/org/spdx/tools/SpdxConverterTest.java
rename to src/test/java/org/spdx/tools/SpdxConverterTestV2.java
index bb02dcb..547ff58 100644
--- a/src/test/java/org/spdx/tools/SpdxConverterTest.java
+++ b/src/test/java/org/spdx/tools/SpdxConverterTestV2.java
@@ -32,8 +32,14 @@
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.rdf.model.Property;
import org.apache.jena.rdf.model.Resource;
-import org.spdx.library.InvalidSPDXAnalysisException;
-import org.spdx.library.model.SpdxDocument;
+import org.spdx.core.DefaultModelStore;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.core.ModelRegistry;
+import org.spdx.library.ModelCopyManager;
+import org.spdx.library.model.v2.SpdxDocument;
+import org.spdx.library.model.v2.SpdxModelInfoV2_X;
+import org.spdx.library.model.v3_0_1.SpdxModelInfoV3_0;
+import org.spdx.storage.simple.InMemSpdxStore;
import org.spdx.tools.SpdxToolsHelper.SerFileType;
import org.spdx.utility.compare.SpdxCompareException;
import org.spdx.utility.compare.SpdxComparer;
@@ -44,7 +50,7 @@
* @author gary
*
*/
-public class SpdxConverterTest extends TestCase {
+public class SpdxConverterTestV2 extends TestCase {
static final String TEST_DIR = "testResources";
static final String TEST_JSON_FILE_PATH = TEST_DIR + File.separator + "SPDXJSONExample-v2.3.spdx.json";
@@ -62,6 +68,9 @@ public class SpdxConverterTest extends TestCase {
*/
protected void setUp() throws Exception {
super.setUp();
+ ModelRegistry.getModelRegistry().registerModel(new SpdxModelInfoV3_0());
+ ModelRegistry.getModelRegistry().registerModel(new SpdxModelInfoV2_X());
+ DefaultModelStore.initialize(new InMemSpdxStore(), "http://default/namespace", new ModelCopyManager());
tempDirPath = Files.createTempDirectory("spdx-tools-test-");
}
@@ -105,8 +114,8 @@ public void testXlsxToRDFXML() throws SpdxConverterException, InvalidSPDXAnalysi
File result = new File(outFilePath.toString());
File source = new File(TEST_SPREADSHEET_XLSX_FILE_PATH);
assertTrue(result.exists());
- SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocument(source, SerFileType.XLSX);
- SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.RDFXML);
+ SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocumentCompatV2(source, SerFileType.XLSX);
+ SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.RDFXML);
SpdxComparer comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -116,7 +125,7 @@ public void testXlsxToRDFXML() throws SpdxConverterException, InvalidSPDXAnalysi
SpdxConverter.convert(TEST_SPREADSHEET_XLSX_FILE_PATH, outFilePath.toString());
result = new File(outFilePath.toString());
assertTrue(result.exists());
- resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.RDFXML);
+ resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.RDFXML);
comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -129,8 +138,8 @@ public void testTagToRDFXML() throws SpdxConverterException, InvalidSPDXAnalysis
File result = new File(outFilePath.toString());
File source = new File(TEST_TAG_FILE_PATH);
assertTrue(result.exists());
- SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocument(source, SerFileType.TAG);
- SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.RDFXML);
+ SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocumentCompatV2(source, SerFileType.TAG);
+ SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.RDFXML);
SpdxComparer comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -140,7 +149,7 @@ public void testTagToRDFXML() throws SpdxConverterException, InvalidSPDXAnalysis
SpdxConverter.convert(TEST_TAG_FILE_PATH, outFilePath.toString());
result = new File(outFilePath.toString());
assertTrue(result.exists());
- resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.RDFXML);
+ resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.RDFXML);
comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -153,8 +162,8 @@ public void testYamlToRDFXML() throws SpdxConverterException, InvalidSPDXAnalysi
File result = new File(outFilePath.toString());
File source = new File(TEST_YAML_FILE_PATH);
assertTrue(result.exists());
- SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocument(source, SerFileType.YAML);
- SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.RDFXML);
+ SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocumentCompatV2(source, SerFileType.YAML);
+ SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.RDFXML);
SpdxComparer comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -164,7 +173,7 @@ public void testYamlToRDFXML() throws SpdxConverterException, InvalidSPDXAnalysi
SpdxConverter.convert(TEST_YAML_FILE_PATH, outFilePath.toString());
result = new File(outFilePath.toString());
assertTrue(result.exists());
- resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.RDFXML);
+ resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.RDFXML);
comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -177,8 +186,8 @@ public void testXmlToRDFXML() throws SpdxConverterException, InvalidSPDXAnalysis
File result = new File(outFilePath.toString());
File source = new File(TEST_XML_FILE_PATH);
assertTrue(result.exists());
- SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocument(source, SerFileType.XML);
- SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.RDFXML);
+ SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocumentCompatV2(source, SerFileType.XML);
+ SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.RDFXML);
SpdxComparer comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -188,7 +197,7 @@ public void testXmlToRDFXML() throws SpdxConverterException, InvalidSPDXAnalysis
SpdxConverter.convert(TEST_XML_FILE_PATH, outFilePath.toString());
result = new File(outFilePath.toString());
assertTrue(result.exists());
- resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.RDFXML);
+ resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.RDFXML);
comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -201,8 +210,8 @@ public void testXlsToRDFXML() throws SpdxConverterException, InvalidSPDXAnalysis
File result = new File(outFilePath.toString());
File source = new File(TEST_SPREADSHEET_XLS_FILE_PATH);
assertTrue(result.exists());
- SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocument(source, SerFileType.XLS);
- SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.RDFXML);
+ SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocumentCompatV2(source, SerFileType.XLS);
+ SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.RDFXML);
SpdxComparer comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -212,7 +221,7 @@ public void testXlsToRDFXML() throws SpdxConverterException, InvalidSPDXAnalysis
SpdxConverter.convert(TEST_SPREADSHEET_XLS_FILE_PATH, outFilePath.toString());
result = new File(outFilePath.toString());
assertTrue(result.exists());
- resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.RDFXML);
+ resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.RDFXML);
comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -225,8 +234,8 @@ public void testJsonToXls() throws SpdxConverterException, InvalidSPDXAnalysisEx
File result = new File(outFilePath.toString());
File source = new File(TEST_JSON_FILE_PATH);
assertTrue(result.exists());
- SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocument(source, SerFileType.JSON);
- SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.XLS);
+ SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocumentCompatV2(source, SerFileType.JSON);
+ SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.XLS);
SpdxComparer comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -236,7 +245,7 @@ public void testJsonToXls() throws SpdxConverterException, InvalidSPDXAnalysisEx
SpdxConverter.convert(TEST_JSON_FILE_PATH, outFilePath.toString());
result = new File(outFilePath.toString());
assertTrue(result.exists());
- resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.XLS);
+ resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.XLS);
comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -249,8 +258,8 @@ public void testJsonToXlsx() throws SpdxConverterException, InvalidSPDXAnalysisE
File result = new File(outFilePath.toString());
File source = new File(TEST_JSON_FILE_PATH);
assertTrue(result.exists());
- SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocument(source, SerFileType.JSON);
- SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.XLSX);
+ SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocumentCompatV2(source, SerFileType.JSON);
+ SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.XLSX);
SpdxComparer comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -260,7 +269,7 @@ public void testJsonToXlsx() throws SpdxConverterException, InvalidSPDXAnalysisE
SpdxConverter.convert(TEST_JSON_FILE_PATH, outFilePath.toString());
result = new File(outFilePath.toString());
assertTrue(result.exists());
- resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.XLSX);
+ resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.XLSX);
comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -273,8 +282,9 @@ public void testJsonToTag() throws SpdxConverterException, InvalidSPDXAnalysisEx
File result = new File(outFilePath.toString());
File source = new File(TEST_JSON_FILE_PATH);
assertTrue(result.exists());
- SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocument(source, SerFileType.JSON);
- SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.TAG);
+ SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocumentCompatV2(source, SerFileType.JSON);
+ SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.TAG);
+
SpdxComparer comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -284,7 +294,7 @@ public void testJsonToTag() throws SpdxConverterException, InvalidSPDXAnalysisEx
SpdxConverter.convert(TEST_JSON_FILE_PATH, outFilePath.toString());
result = new File(outFilePath.toString());
assertTrue(result.exists());
- resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.TAG);
+ resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.TAG);
comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -297,8 +307,8 @@ public void testJsonToRdfXml() throws SpdxConverterException, InvalidSPDXAnalysi
File result = new File(outFilePath.toString());
File source = new File(TEST_JSON_FILE_PATH);
assertTrue(result.exists());
- SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocument(source, SerFileType.JSON);
- SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.RDFXML);
+ SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocumentCompatV2(source, SerFileType.JSON);
+ SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.RDFXML);
SpdxComparer comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -308,7 +318,7 @@ public void testJsonToRdfXml() throws SpdxConverterException, InvalidSPDXAnalysi
SpdxConverter.convert(TEST_JSON_FILE_PATH, outFilePath.toString());
result = new File(outFilePath.toString());
assertTrue(result.exists());
- resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.RDFXML);
+ resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.RDFXML);
comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -321,8 +331,8 @@ public void testJsonToYaml() throws SpdxConverterException, InvalidSPDXAnalysisE
File result = new File(outFilePath.toString());
File source = new File(TEST_JSON_FILE_PATH);
assertTrue(result.exists());
- SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocument(source, SerFileType.JSON);
- SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.YAML);
+ SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocumentCompatV2(source, SerFileType.JSON);
+ SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.YAML);
SpdxComparer comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -332,7 +342,7 @@ public void testJsonToYaml() throws SpdxConverterException, InvalidSPDXAnalysisE
SpdxConverter.convert(TEST_JSON_FILE_PATH, outFilePath.toString());
result = new File(outFilePath.toString());
assertTrue(result.exists());
- resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.YAML);
+ resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.YAML);
comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -345,8 +355,8 @@ public void testJsonToXml() throws SpdxConverterException, InvalidSPDXAnalysisEx
File result = new File(outFilePath.toString());
File source = new File(TEST_JSON_FILE_PATH);
assertTrue(result.exists());
- SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocument(source, SerFileType.JSON);
- SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.XML);
+ SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocumentCompatV2(source, SerFileType.JSON);
+ SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.XML);
SpdxComparer comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -356,7 +366,7 @@ public void testJsonToXml() throws SpdxConverterException, InvalidSPDXAnalysisEx
SpdxConverter.convert(TEST_JSON_FILE_PATH, outFilePath.toString());
result = new File(outFilePath.toString());
assertTrue(result.exists());
- resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.XML);
+ resultDoc = SpdxToolsHelper.deserializeDocumentCompatV2(result, SerFileType.XML);
comparer = new SpdxComparer();
comparer.compare(sourceDoc, resultDoc);
assertFalse(comparer.isDifferenceFound());
@@ -372,9 +382,9 @@ public void testLicenseDetailsRdf() throws SpdxConverterException, InvalidSPDXAn
File detailsFile = new File(detailsRdfFilePath);
assertTrue(detailsFile.exists());
File source = new File(TEST_WITH_EXCEPTION_FILE_PATH);
- SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocument(source, SerFileType.JSON);
- SpdxDocument detailsDoc = SpdxToolsHelper.deserializeDocument(detailsFile, SerFileType.RDFXML);
- SpdxDocument noDetailsDoc = SpdxToolsHelper.deserializeDocument(noDetailsFile, SerFileType.RDFXML);
+ SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocumentCompatV2(source, SerFileType.JSON);
+ SpdxDocument detailsDoc = SpdxToolsHelper.deserializeDocumentCompatV2(detailsFile, SerFileType.RDFXML);
+ SpdxDocument noDetailsDoc = SpdxToolsHelper.deserializeDocumentCompatV2(noDetailsFile, SerFileType.RDFXML);
// Make sure they compare - the inclusion of the details should not impact of the 2 documents match
SpdxComparer comparer = new SpdxComparer();
@@ -404,5 +414,4 @@ public void testLicenseDetailsRdf() throws SpdxConverterException, InvalidSPDXAn
Resource noDetailException = noDetailModel.createResource(exceptionUri);
assertFalse(noDetailModel.contains(noDetailException, detailExceptionTextProperty));
}
-
}
diff --git a/src/test/java/org/spdx/tools/SpdxConverterTestV3.java b/src/test/java/org/spdx/tools/SpdxConverterTestV3.java
new file mode 100644
index 0000000..5a55663
--- /dev/null
+++ b/src/test/java/org/spdx/tools/SpdxConverterTestV3.java
@@ -0,0 +1,112 @@
+/**
+ * SPDX-License-Identifier: Apache-2.0
+ * Copyright (c) 2024 Source Auditor Inc.
+ */
+package org.spdx.tools;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.DirectoryStream;
+import java.nio.file.Files;
+import java.nio.file.LinkOption;
+import java.nio.file.Path;
+import java.util.List;
+import java.util.Objects;
+
+import org.junit.After;
+import org.junit.Before;
+import org.spdx.core.DefaultModelStore;
+import org.spdx.core.InvalidSPDXAnalysisException;
+import org.spdx.library.ModelCopyManager;
+import org.spdx.library.SpdxModelFactory;
+import org.spdx.library.model.v3_0_1.core.Element;
+import org.spdx.library.model.v3_0_1.core.SpdxDocument;
+import org.spdx.library.model.v3_0_1.software.SpdxFile;
+import org.spdx.library.model.v3_0_1.software.SpdxPackage;
+import org.spdx.storage.simple.InMemSpdxStore;
+import org.spdx.tools.SpdxToolsHelper.SerFileType;
+import org.spdx.utility.compare.SpdxCompareException;
+
+import junit.framework.TestCase;
+
+/**
+ * @author gary
+ *
+ */
+public class SpdxConverterTestV3 extends TestCase {
+
+ static final String TEST_DIR = "testResources";
+ static final String TEST_JSON_FILE_PATH = TEST_DIR + File.separator + "SPDXJSONExample-v2.3.spdx.json";
+
+ Path tempDirPath;
+ /**
+ * @throws java.lang.Exception
+ */
+ @Before
+ public void setUp() throws Exception {
+ SpdxModelFactory.init();
+ DefaultModelStore.initialize(new InMemSpdxStore(), "http://default/namespace", new ModelCopyManager());
+ tempDirPath = Files.createTempDirectory("spdx-tools-test-");
+ }
+
+ /**
+ * @throws java.lang.Exception
+ */
+ @After
+ public void tearDown() throws Exception {
+ super.tearDown();
+ deleteDirAndFiles(tempDirPath);
+ }
+
+ public static void deleteDirAndFiles(Path dirOrFile) {
+ if (Objects.isNull(dirOrFile)) {
+ return;
+ }
+ if (!Files.exists(dirOrFile, LinkOption.NOFOLLOW_LINKS)) {
+ return;
+ }
+ if (Files.isDirectory(dirOrFile, LinkOption.NOFOLLOW_LINKS)) {
+ try (DirectoryStream files = Files.newDirectoryStream(dirOrFile)) {
+ for (Path file : files) {
+ deleteDirAndFiles(file);
+ }
+ } catch (IOException e) {
+ System.err.println("IO error deleting directory or file "+e.getMessage());
+ }
+ }
+ try {
+ Files.delete(dirOrFile);
+ } catch (IOException e) {
+ System.err.println("IO error deleting directory or file "+e.getMessage());
+ }
+ }
+
+ public void testV2JsonToV3JsonLD() throws SpdxConverterException, InvalidSPDXAnalysisException, IOException, SpdxCompareException {
+ String jsonLdFileName = "result.jsonld";
+ Path outFilePath = tempDirPath.resolve(jsonLdFileName);
+ SpdxConverter.convert(TEST_JSON_FILE_PATH, outFilePath.toString(), SerFileType.JSON, SerFileType.JSONLD);
+ File result = new File(outFilePath.toString());
+ File source = new File(TEST_JSON_FILE_PATH);
+ assertTrue(result.exists());
+ org.spdx.library.model.v2.SpdxDocument sourceDoc = SpdxToolsHelper.deserializeDocumentCompatV2(source, SerFileType.JSON);
+ SpdxDocument resultDoc = SpdxToolsHelper.deserializeDocument(result, SerFileType.JSONLD);
+ List verify = resultDoc.verify();
+ assertEquals(0, verify.size());
+ org.spdx.library.model.v2.SpdxElement[] sourceRoots = sourceDoc.getDocumentDescribes().toArray(
+ new org.spdx.library.model.v2.SpdxElement[sourceDoc.getDocumentDescribes().size()]);
+ assertEquals(2, sourceRoots.length);
+ org.spdx.library.model.v2.SpdxPackage sourcePackage = (org.spdx.library.model.v2.SpdxPackage)(
+ sourceRoots[0] instanceof org.spdx.library.model.v2.SpdxPackage ? sourceRoots[0] : sourceRoots[1]);
+ org.spdx.library.model.v2.SpdxFile sourceFile = (org.spdx.library.model.v2.SpdxFile)(
+ sourceRoots[0] instanceof org.spdx.library.model.v2.SpdxFile ? sourceRoots[0] : sourceRoots[1]);
+ Element[] resultRoots = resultDoc.getRootElements().toArray(new Element[resultDoc.getRootElements().size()]);
+ assertEquals(2, resultRoots.length);
+ SpdxPackage resultPackage = (SpdxPackage)(resultRoots[0] instanceof SpdxPackage ? resultRoots[0] : resultRoots[1]);
+ SpdxFile resultFile = (SpdxFile)(resultRoots[0] instanceof SpdxFile ? resultRoots[0] : resultRoots[1]);
+
+ assertEquals(sourcePackage.getName().get(), resultPackage.getName().get());
+ assertEquals(sourceFile.getName().get(), resultFile.getName().get());
+ // TODO: create a more extensive set of checks
+ }
+
+}
diff --git a/src/test/java/org/spdx/tools/VerifyTest.java b/src/test/java/org/spdx/tools/VerifyTest.java
index be15f52..aa11ba0 100644
--- a/src/test/java/org/spdx/tools/VerifyTest.java
+++ b/src/test/java/org/spdx/tools/VerifyTest.java
@@ -3,6 +3,12 @@
import java.io.File;
import java.util.List;
+import org.spdx.core.DefaultModelStore;
+import org.spdx.core.ModelRegistry;
+import org.spdx.library.ModelCopyManager;
+import org.spdx.library.model.v2.SpdxModelInfoV2_X;
+import org.spdx.library.model.v3_0_1.SpdxModelInfoV3_0;
+import org.spdx.storage.simple.InMemSpdxStore;
import org.spdx.tools.SpdxToolsHelper.SerFileType;
import junit.framework.TestCase;
@@ -10,6 +16,7 @@
public class VerifyTest extends TestCase {
static final String TEST_DIR = "testResources";
+ static final String TEST_JSONLD_FILE_PATH = TEST_DIR + File.separator + "SPDXJsonLDExample-v3.0.1.json";
static final String TEST_JSON_FILE_PATH = TEST_DIR + File.separator + "SPDXJSONExample-v2.3.spdx.json";
static final String JSON_V2_3_FILE_PATH = TEST_DIR + File.separator + "SPDXJSONExample-v2.3.spdx.json";
static final String JSON_V2_2_FILE_PATH = TEST_DIR + File.separator + "SPDXJSONExample-v2.2.spdx.json";
@@ -26,6 +33,9 @@ public class VerifyTest extends TestCase {
protected void setUp() throws Exception {
super.setUp();
+ ModelRegistry.getModelRegistry().registerModel(new SpdxModelInfoV3_0());
+ ModelRegistry.getModelRegistry().registerModel(new SpdxModelInfoV2_X());
+ DefaultModelStore.initialize(new InMemSpdxStore(), "http://default/namespace", new ModelCopyManager());
}
protected void tearDown() throws Exception {
@@ -71,6 +81,11 @@ public void testVerifyBadJSON() throws SpdxVerificationException {
assertTrue(result.size() == 4);
}
+ public void testVerifyJsonLD() throws SpdxVerificationException {
+ List result = Verify.verify(TEST_JSONLD_FILE_PATH, SerFileType.JSONLD);
+ assertTrue(result.isEmpty());
+ }
+
// Test specific spec versions for the JSON format
public void testVerifyJSONVersion() throws SpdxVerificationException {
List result = Verify.verify(JSON_V2_2_FILE_PATH, SerFileType.JSON);
diff --git a/testResources/SPDXJsonLDExample-v3.0.1.json b/testResources/SPDXJsonLDExample-v3.0.1.json
new file mode 100644
index 0000000..7af7e9a
--- /dev/null
+++ b/testResources/SPDXJsonLDExample-v3.0.1.json
@@ -0,0 +1,98 @@
+{
+ "@context": "https://spdx.org/rdf/3.0.1/spdx-context.jsonld",
+ "@graph": [
+ {
+ "type": "CreationInfo",
+ "@id": "_:creationinfo",
+ "createdBy": [
+ "http://spdx.example.com/Agent/JoshuaWatt"
+ ],
+ "specVersion": "3.0.1",
+ "created": "2024-03-06T00:00:00Z"
+ },
+ {
+ "type": "Person",
+ "spdxId": "http://spdx.example.com/Agent/JoshuaWatt",
+ "name": "Joshua Watt",
+ "creationInfo": "_:creationinfo",
+ "externalIdentifier": [
+ {
+ "type": "ExternalIdentifier",
+ "externalIdentifierType": "email",
+ "identifier": "JPEWhacker@gmail.com"
+ }
+ ]
+ },
+ {
+ "type": "SpdxDocument",
+ "spdxId": "http://spdx.example.com/Document1",
+ "creationInfo": "_:creationinfo",
+ "rootElement": [
+ "http://spdx.example.com/BOM1"
+ ],
+ "element": [
+ "http://spdx.example.com/BOM1",
+ "http://spdx.example.com/Agent/JoshuaWatt",
+ "http://spdx.example.com/Package1/myprogram",
+ "http://spdx.example.com/Relationship/1"
+ ],
+ "profileConformance": [
+ "core",
+ "software"
+ ]
+ },
+ {
+ "type": "software_Sbom",
+ "spdxId": "http://spdx.example.com/BOM1",
+ "creationInfo": "_:creationinfo",
+ "rootElement": [
+ "http://spdx.example.com/Package1"
+ ],
+ "element": [
+ "http://spdx.example.com/Package1/myprogram",
+ "http://spdx.example.com/Package1"
+ ],
+ "software_sbomType": [
+ "build"
+ ]
+ },
+ {
+ "type": "software_Package",
+ "spdxId": "http://spdx.example.com/Package1",
+ "creationInfo": "_:creationinfo",
+ "name": "my-package",
+ "software_packageVersion": "1.0",
+ "software_downloadLocation": "http://dl.example.com/my-package_1.0.0.tar",
+ "builtTime": "2024-03-06T00:00:00Z",
+ "originatedBy": [
+ "http://spdx.example.com/Agent/JoshuaWatt"
+ ]
+ },
+ {
+ "type": "software_File",
+ "spdxId": "http://spdx.example.com/Package1/myprogram",
+ "creationInfo": "_:creationinfo",
+ "name": "myprogram",
+ "software_primaryPurpose": "executable",
+ "software_additionalPurpose": [
+ "application"
+ ],
+ "software_copyrightText": "Copyright 2024, Joshua Watt",
+ "builtTime": "2024-03-06T00:00:00Z",
+ "originatedBy": [
+ "http://spdx.example.com/Agent/JoshuaWatt"
+ ]
+ },
+ {
+ "type": "Relationship",
+ "spdxId": "http://spdx.example.com/Relationship/1",
+ "creationInfo": "_:creationinfo",
+ "from": "http://spdx.example.com/Package1",
+ "relationshipType": "contains",
+ "to": [
+ "http://spdx.example.com/Package1/myprogram"
+ ],
+ "completeness": "complete"
+ }
+ ]
+}