Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect RDF for NOASSERTION related SPDX element #234

Open
goneall opened this issue Jun 11, 2020 · 7 comments
Open

Incorrect RDF for NOASSERTION related SPDX element #234

goneall opened this issue Jun 11, 2020 · 7 comments

Comments

@goneall
Copy link
Member

goneall commented Jun 11, 2020

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"/>
@Gautime
Copy link
Contributor

Gautime commented Jun 16, 2020

@goneall Can you please point to the files that need to be changed or looked into?

@goneall
Copy link
Member Author

goneall commented Jun 16, 2020

@Gautime This one is bit complex. The starting point would be the SpdxNoAssertionElement class and the SpdxNoneElement class.

@goneall
Copy link
Member Author

goneall commented Jun 16, 2020

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"/>

@Gautime
Copy link
Contributor

Gautime commented Jun 17, 2020

@goneall How can I reproduce the output? It seems we dont have No assertion related elements in example rdf file.

@goneall
Copy link
Member Author

goneall commented Jun 17, 2020

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.

@Gautime
Copy link
Contributor

Gautime commented Jun 18, 2020

@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?

@goneall
Copy link
Member Author

goneall commented Jun 18, 2020

@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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants