Skip to content

Commit

Permalink
Change packagePurpse to primaryPackagePurpose
Browse files Browse the repository at this point in the history
Updates the schema to match spec changes from PR #721
Also updates the licenseId description based on review
comments.

Signed-off-by: Gary O'Neall <gary@sourceauditor.com>
  • Loading branch information
goneall committed Jun 23, 2022
1 parent 2175124 commit 9f95e5f
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 48 deletions.
9 changes: 4 additions & 5 deletions ontology/spdx-ontology.context.json
Expand Up @@ -323,11 +323,6 @@
"@id" : "spdx:packageFileName",
"@type" : "xs:string"
},
"packagePurposes" : {
"@id" : "spdx:packagePurposes",
"@type" : "spdx:Purpose",
"@container" : "@set"
},
"packageVerificationCode" : {
"@id" : "spdx:packageVerificationCode",
"@type" : "spdx:PackageVerificationCode"
Expand All @@ -341,6 +336,10 @@
"@id" : "spdx:packageVerificationCodeValue",
"@type" : "xs:hexBinary"
},
"primaryPackagePurpose" : {
"@id" : "spdx:primaryPackagePurpose",
"@type" : "spdx:Purpose"
},
"ranges" : {
"@id" : "spdx:ranges",
"@type" : "rdfpointer:StartEndPointer",
Expand Down
26 changes: 13 additions & 13 deletions ontology/spdx-ontology.owl.ttl
Expand Up @@ -319,13 +319,6 @@ If the licenseInfoInSnippet field is not present for a snippet, it implies an eq
ns:term_status "stable"@en .


### http://spdx.org/rdf/terms#packagePurpose
:packagePurpose rdf:type owl:ObjectProperty ;
rdfs:domain :Package ;
rdfs:comment "This field provides information about the purpose of the identified package. Package Purpose is intrinsic to how the package is being used rather than the content of the package."@en ;
ns:term_status "stable"@en .


### http://spdx.org/rdf/terms#packageVerificationCode
:packageVerificationCode rdf:type owl:ObjectProperty ;
rdfs:domain :Package ;
Expand All @@ -334,6 +327,13 @@ If the licenseInfoInSnippet field is not present for a snippet, it implies an eq
ns:term_status "stable"@en .


### http://spdx.org/rdf/terms#primaryPackagePurpose
:primaryPackagePurpose rdf:type owl:ObjectProperty ;
rdfs:domain :Package ;
rdfs:comment "This field provides information about the primary purpose of the identified package. Package Purpose is intrinsic to how the package is being used rather than the content of the package."@en ;
ns:term_status "stable"@en .


### http://spdx.org/rdf/terms#range
:range rdf:type owl:ObjectProperty ;
rdfs:domain :Snippet ;
Expand Down Expand Up @@ -836,7 +836,7 @@ If the copyrightText field is not present, it implies an equivalent meaning to N
:licenseId rdf:type owl:DatatypeProperty ;
rdfs:domain :SimpleLicensingInfo ;
rdfs:range xsd:string ;
rdfs:comment "A human readable short form license identifier for a license. The license ID is either on the standard license list or the form \"LicenseRef-\"[idString] where [idString] is a unique string containing letters, numbers, \".\", \"-\" or \"+\"."@en ;
rdfs:comment "A human readable short form license identifier for a license. The license ID is either on the standard license list or the form \"LicenseRef-[idString]\" where [idString] is a unique string containing letters, numbers, \".\" or \"-\". When used within a license expression, the license ID can optionally include a reference to an external document in the form \"DocumentRef-[docrefIdString]:LicenseRef-[idString]\" where docRefIdString is an ID for an external document reference."@en ;
ns:term_status "stable"@en .


Expand Down Expand Up @@ -1540,16 +1540,16 @@ rdfs:seeAlso rdf:type owl:DatatypeProperty .
owl:minQualifiedCardinality "0"^^xsd:nonNegativeInteger ;
owl:onClass :File
] ,
[ rdf:type owl:Restriction ;
owl:onProperty :packagePurpose ;
owl:minQualifiedCardinality "0"^^xsd:nonNegativeInteger ;
owl:onClass :Purpose
] ,
[ rdf:type owl:Restriction ;
owl:onProperty :packageVerificationCode ;
owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
owl:onClass :PackageVerificationCode
] ,
[ rdf:type owl:Restriction ;
owl:onProperty :primaryPackagePurpose ;
owl:maxQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
owl:onClass :Purpose
] ,
[ rdf:type owl:Restriction ;
owl:onProperty :downloadLocation ;
owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger ;
Expand Down
26 changes: 13 additions & 13 deletions ontology/spdx-ontology.owl.xml
Expand Up @@ -444,22 +444,22 @@ If the licenseInfoInSnippet field is not present for a snippet, it implies an eq



<!-- http://spdx.org/rdf/terms#packagePurpose -->
<!-- http://spdx.org/rdf/terms#packageVerificationCode -->

<owl:ObjectProperty rdf:about="http://spdx.org/rdf/terms#packagePurpose">
<owl:ObjectProperty rdf:about="http://spdx.org/rdf/terms#packageVerificationCode">
<rdfs:domain rdf:resource="http://spdx.org/rdf/terms#Package"/>
<rdfs:comment xml:lang="en">This field provides information about the purpose of the identified package. Package Purpose is intrinsic to how the package is being used rather than the content of the package.</rdfs:comment>
<rdfs:range rdf:resource="http://spdx.org/rdf/terms#PackageVerificationCode"/>
<rdfs:comment xml:lang="en">A manifest based verification code (the algorithm is defined in section 3.9.4 of the full specification) of the package. This allows consumers of this data and/or database to determine if a package they have in hand is identical to the package from which the data was produced. This algorithm works even if the SPDX document is included in the package.</rdfs:comment>
<ns:term_status xml:lang="en">stable</ns:term_status>
</owl:ObjectProperty>



<!-- http://spdx.org/rdf/terms#packageVerificationCode -->
<!-- http://spdx.org/rdf/terms#primaryPackagePurpose -->

<owl:ObjectProperty rdf:about="http://spdx.org/rdf/terms#packageVerificationCode">
<owl:ObjectProperty rdf:about="http://spdx.org/rdf/terms#primaryPackagePurpose">
<rdfs:domain rdf:resource="http://spdx.org/rdf/terms#Package"/>
<rdfs:range rdf:resource="http://spdx.org/rdf/terms#PackageVerificationCode"/>
<rdfs:comment xml:lang="en">A manifest based verification code (the algorithm is defined in section 3.9.4 of the full specification) of the package. This allows consumers of this data and/or database to determine if a package they have in hand is identical to the package from which the data was produced. This algorithm works even if the SPDX document is included in the package.</rdfs:comment>
<rdfs:comment xml:lang="en">This field provides information about the primary purpose of the identified package. Package Purpose is intrinsic to how the package is being used rather than the content of the package.</rdfs:comment>
<ns:term_status xml:lang="en">stable</ns:term_status>
</owl:ObjectProperty>

Expand Down Expand Up @@ -1121,7 +1121,7 @@ If the copyrightText field is not present, it implies an equivalent meaning to N
<owl:DatatypeProperty rdf:about="http://spdx.org/rdf/terms#licenseId">
<rdfs:domain rdf:resource="http://spdx.org/rdf/terms#SimpleLicensingInfo"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
<rdfs:comment xml:lang="en">A human readable short form license identifier for a license. The license ID is either on the standard license list or the form &quot;LicenseRef-&quot;[idString] where [idString] is a unique string containing letters, numbers, &quot;.&quot;, &quot;-&quot; or &quot;+&quot;.</rdfs:comment>
<rdfs:comment xml:lang="en">A human readable short form license identifier for a license. The license ID is either on the standard license list or the form &quot;LicenseRef-[idString]&quot; where [idString] is a unique string containing letters, numbers, &quot;.&quot; or &quot;-&quot;. When used within a license expression, the license ID can optionally include a reference to an external document in the form &quot;DocumentRef-[docrefIdString]:LicenseRef-[idString]&quot; where docRefIdString is an ID for an external document reference.</rdfs:comment>
<ns:term_status xml:lang="en">stable</ns:term_status>
</owl:DatatypeProperty>

Expand Down Expand Up @@ -2113,16 +2113,16 @@ If the copyrightText field is not present, it implies an equivalent meaning to N
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="http://spdx.org/rdf/terms#packagePurpose"/>
<owl:minQualifiedCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">0</owl:minQualifiedCardinality>
<owl:onClass rdf:resource="http://spdx.org/rdf/terms#Purpose"/>
<owl:onProperty rdf:resource="http://spdx.org/rdf/terms#packageVerificationCode"/>
<owl:maxQualifiedCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:maxQualifiedCardinality>
<owl:onClass rdf:resource="http://spdx.org/rdf/terms#PackageVerificationCode"/>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="http://spdx.org/rdf/terms#packageVerificationCode"/>
<owl:onProperty rdf:resource="http://spdx.org/rdf/terms#primaryPackagePurpose"/>
<owl:maxQualifiedCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:maxQualifiedCardinality>
<owl:onClass rdf:resource="http://spdx.org/rdf/terms#PackageVerificationCode"/>
<owl:onClass rdf:resource="http://spdx.org/rdf/terms#Purpose"/>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
Expand Down

0 comments on commit 9f95e5f

Please sign in to comment.