Skip to content

Commit

Permalink
add CreationInfo to all Elements in json-ld examples
Browse files Browse the repository at this point in the history
CreationInfo has been made mandatory again in #401, so the examples have to be updated.

Signed-off-by: Armin Tänzer <armin.taenzer@tngtech.com>
  • Loading branch information
armintaenzertng committed Jul 11, 2023
1 parent e8f47ab commit 7ac5766
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 80 deletions.
124 changes: 78 additions & 46 deletions serialization/json_ld/examples/converted_from_spdx_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,7 @@
],
"@graph": [
{
"type": "Tool",
"spdxId": "spdx-example:SPDXRef-Actor-LicenseFind-1.0",
"name": "LicenseFind-1.0"
},
{
"type": "Organization",
"spdxId": "spdx-example:SPDXRef-Actor-ExampleCodeInspect",
"name": "ExampleCodeInspect"
},
{
"type": "Person",
"spdxId": "spdx-example:SPDXRef-Actor-JaneDoe",
"name": "Jane Doe"
},
{
"type": "SpdxDocument",
"spdxId": "spdx-example:SPDXRef-DOCUMENT",
"creationInfo": {
"@id": "_:creationInfo1",
"type": "CreationInfo",
"specVersion": "3.0.0",
"created": "2010-01-29T18:30:22Z",
Expand All @@ -42,7 +25,29 @@
],
"dataLicense": "https://spdx.org/licenses/CC0-1.0",
"comment": "This is the SPDX-2.3 JSON example converted to SPDX-3.0. As there is currently no closure on how to treat licenses, they are omitted here for now."
},
},
{
"type": "Tool",
"spdxId": "spdx-example:SPDXRef-Actor-LicenseFind-1.0",
"name": "LicenseFind-1.0",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Organization",
"spdxId": "spdx-example:SPDXRef-Actor-ExampleCodeInspect",
"name": "ExampleCodeInspect",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Person",
"spdxId": "spdx-example:SPDXRef-Actor-JaneDoe",
"name": "Jane Doe",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "SpdxDocument",
"spdxId": "spdx-example:SPDXRef-DOCUMENT",
"creationInfo": {"@id": "_:creationInfo1"},
"name": "SPDX-Tools-v2.0",
"comment": "This document was created using SPDX 2.0 using licenses from the web site.",
"element": [
Expand Down Expand Up @@ -114,7 +119,8 @@
"externalIdentifierType": "email",
"identifier": "jane.doe@example.com"
}
]
],
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Organization",
Expand All @@ -126,7 +132,8 @@
"externalIdentifierType": "email",
"identifier": "contact@example.com"
}
]
],
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Package",
Expand Down Expand Up @@ -180,13 +187,15 @@
"packageVersion": "2.11.1",
"downloadLocation": "http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz",
"homepage": "http://ftp.gnu.org/gnu/glibc",
"sourceInfo": "uses glibc-2_11-branch from git://sourceware.org/git/glibc.git."
"sourceInfo": "uses glibc-2_11-branch from git://sourceware.org/git/glibc.git.",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Package",
"spdxId": "spdx-example:SPDXRef-fromDoap-1",
"name": "Apache Commons Lang",
"homepage": "http://commons.apache.org/proper/commons-lang/"
"homepage": "http://commons.apache.org/proper/commons-lang/",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Package",
Expand All @@ -195,7 +204,8 @@
"packageVersion": "3.12.0",
"downloadLocation": "https://search.maven.org/remotecontent?filepath=org/apache/jena/apache-jena/3.12.0/apache-jena-3.12.0.tar.gz",
"packageUrl": "pkg:maven/org.apache.jena/apache-jena@3.12.0",
"homepage": "http://www.openjena.org/"
"homepage": "http://www.openjena.org/",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Package",
Expand All @@ -212,7 +222,8 @@
"copyrightText": "Copyright Saxonica Ltd",
"packageVersion": "8.8",
"downloadLocation": "https://sourceforge.net/projects/saxon/files/Saxon-B/8.8.0.7/saxonb8-8-0-7j.zip/download",
"homepage": "http://saxon.sourceforge.net/"
"homepage": "http://saxon.sourceforge.net/",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "File",
Expand All @@ -239,7 +250,8 @@
"hashValue": "c2b4e1c67a2d28fced849ee1bb76e7391b93f125"
}
],
"copyrightText": "Copyright 2001-2011 The Apache Software Foundation"
"copyrightText": "Copyright 2001-2011 The Apache Software Foundation",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "File",
Expand All @@ -266,7 +278,8 @@
"algorithm": "sha1",
"hashValue": "fff4e1c67a2d28fced849ee1bb76e7391b93f125"
}
]
],
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "File",
Expand All @@ -285,7 +298,8 @@
"hashValue": "624c1abb3664f4b35547e7c73864ad24"
}
],
"copyrightText": "Copyright 2008-2010 John Smith"
"copyrightText": "Copyright 2008-2010 John Smith",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Snippet",
Expand All @@ -300,7 +314,8 @@
"lineRange": {
"begin": 5,
"end": 23
}
},
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Relationship",
Expand All @@ -309,7 +324,8 @@
"to": [
"spdx-example:SPDXRef-Package"
],
"relationshipType": "contains"
"relationshipType": "contains",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Relationship",
Expand All @@ -318,7 +334,8 @@
"to": [
"spdx-example:DocumentRef-spdx-tool-1.2:SPDXRef-ToolsElement"
],
"relationshipType": "copy"
"relationshipType": "copy",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "SoftwareDependencyRelationship",
Expand All @@ -328,7 +345,8 @@
"spdx-example:SPDXRef-Saxon"
],
"relationshipType": "dependsOn",
"softwareLinkage": "dynamic"
"softwareLinkage": "dynamic",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Relationship",
Expand All @@ -337,7 +355,8 @@
"to": [
"spdx-example:SPDXRef-Package"
],
"relationshipType": "contains"
"relationshipType": "contains",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Relationship",
Expand All @@ -346,7 +365,8 @@
"to": [
"spdx-example:SPDXRef-fromDoap-0"
],
"relationshipType": "specificationFor"
"relationshipType": "specificationFor",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Relationship",
Expand All @@ -355,7 +375,8 @@
"to": [
"spdx-example:SPDXRef-File"
],
"relationshipType": "generates"
"relationshipType": "generates",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Relationship",
Expand All @@ -365,7 +386,8 @@
"spdx-example:SPDXRef-File",
"spdx-example:SPDXRef-Package"
],
"relationshipType": "describes"
"relationshipType": "describes",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Relationship",
Expand All @@ -377,62 +399,72 @@
"spdx-example:SPDXRef-JenaLib",
"spdx-example:SPDXRef-DoapSource"
],
"relationshipType": "contains"
"relationshipType": "contains",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Annotation",
"spdxId": "spdx-example:SPDXRef-Annotation-0",
"annotationType": "other",
"subject": "spdx-example:SPDXRef-DOCUMENT",
"statement": "Document level annotation"
"statement": "Document level annotation",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Person",
"spdxId": "spdx-example:SPDXRef-Actor-JoeReviewer",
"name": "Joe Reviewer"
"name": "Joe Reviewer",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Annotation",
"spdxId": "spdx-example:SPDXRef-Annotation-1",
"annotationType": "review",
"subject": "spdx-example:SPDXRef-DOCUMENT",
"statement": "This is just an example. Some of the non-standard licenses look like they are actually BSD 3 clause licenses"
"statement": "This is just an example. Some of the non-standard licenses look like they are actually BSD 3 clause licenses",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Person",
"spdxId": "spdx-example:SPDXRef-Actor-SuzanneReviewer",
"name": "Suzanne Reviewer"
"name": "Suzanne Reviewer",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Annotation",
"spdxId": "spdx-example:SPDXRef-Annotation-2",
"annotationType": "review",
"subject": "spdx-example:SPDXRef-DOCUMENT",
"statement": "Another example reviewer."
"statement": "Another example reviewer.",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Person",
"spdxId": "spdx-example:SPDXRef-Actor-PackageCommenter",
"name": "Package Commenter"
"name": "Package Commenter",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Annotation",
"spdxId": "spdx-example:SPDXRef-Annotation-3",
"annotationType": "other",
"subject": "spdx-example:SPDXRef-Package",
"statement": "Package level annotation"
"statement": "Package level annotation",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Person",
"spdxId": "spdx-example:SPDXRef-Actor-FileCommenter",
"name": "File Commenter"
"name": "File Commenter",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "Annotation",
"spdxId": "spdx-example:SPDXRef-Annotation-4",
"annotationType": "other",
"subject": "spdx-example:SPDXRef-File",
"statement": "File level annotation"
"statement": "File level annotation",
"creationInfo": {"@id": "_:creationInfo1"}
}
]
}
24 changes: 14 additions & 10 deletions serialization/json_ld/examples/spdx_document2.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{
"@context": "https://spdx.github.io/spdx-3-model/rdf/context.json",
"@graph": [
{
"@id": "_:creationInfo1",
"type": "CreationInfo",
"specVersion": "3.0.0",
"created": "2022-12-01T00:00:00",
"createdBy": ["https://spdx.dev/elements/3F26391C#spdx-dev"],
"profile": ["core", "software"],
"dataLicense": "https://spdx.org/licenses/CC0-1.0"
},
{
"type": "SpdxDocument",
"spdxId": "http://spdx.acme.org/3FA9CB25#spdxdocument159",
"creationInfo": {
"type": "CreationInfo",
"specVersion": "3.0.0",
"created": "2022-12-01T00:00:00",
"createdBy": ["https://spdx.dev/elements/3F26391C#spdx-dev"],
"profile": ["core", "software"],
"dataLicense": "https://spdx.org/licenses/CC0-1.0"
},
"creationInfo": {"@id": "_:creationInfo1"},
"name": "Doc 159 - two File elements",
"element": [
"https://some.namespace#File1",
Expand All @@ -27,15 +29,17 @@
"name": "model.png",
"contentType": "image/png",
"purpose": ["documentation"],
"contentIdentifier": "https://github.com/spdx/spdx-3-model/blob/main/model.png"
"contentIdentifier": "https://github.com/spdx/spdx-3-model/blob/main/model.png",
"creationInfo": {"@id": "_:creationInfo1"}
},
{
"type": "File",
"spdxId": "https://spdx.dev/elements/3F26391C#spdx-spec-v2.3",
"name": "The Software Package Data Exchange® (SPDX®) Specification Version 2.3",
"contentType": "text/html",
"purpose": ["documentation"],
"contentIdentifier": "https://spdx.github.io/spdx-spec/v2.3/"
"contentIdentifier": "https://spdx.github.io/spdx-spec/v2.3/",
"creationInfo": {"@id": "_:creationInfo1"}
}
]
}
Loading

0 comments on commit 7ac5766

Please sign in to comment.