tools
tools copied to clipboard
Incorrect RDF for NOASSERTION related SPDX element
Related SPDX elements which have a value of no-assertion is currently generated as:
<spdx:relatedSpdxElement>
<spdx:noassertion rdf:about="http://spdx.org/rdf/terms#noassertion"/>
</spdx:relatedSpdxElement>
It should be represented as:
<spdx:relatedSpdxElement rdf:resource="http://spdx.org/rdf/terms#noassertion"/>
@goneall Can you please point to the files that need to be changed or looked into?
@Gautime This one is bit complex. The starting point would be the SpdxNoAssertionElement class and the SpdxNoneElement class.
The same issue occurs for the SpdxNoneElement.
Related SPDX elements which have a value of none is currently generated as:
<spdx:relatedSpdxElement>
<spdx:none rdf:about="http://spdx.org/rdf/terms#none"/>
</spdx:relatedSpdxElement>
It should be represented as:
<spdx:relatedSpdxElement rdf:resource="http://spdx.org/rdf/terms#none"/>
@goneall How can I reproduce the output? It seems we dont have No assertion related elements in example rdf file.
How can I reproduce the output? It seems we don't have No assertion related elements in example rdf file.
You can run the utility tag to RDF on the 2.2.1 tag/value example file
Note that the 2.2.1 rdf example is correct. The RDF generated by the tool will be incorrect.
@goneall Just to clarify, printRelationship is the function being used to print all the relationships (including noassertions), and we need to change the output for relationships with id noassertion, correct?
@Gautime The problem is just a bit deeper in the design. The SpdxNoAssertionElement class and the SpdxNoneElement would need to be changed (most likely). printRelationship
isn't used to produce the RDF files. The code to produce the RDF serialization is in the Jena library (see the Tag to RDF code for an example).