Option of using SPDX ID/URI when converting files (tools-java) #spdx


Info@ Clear Byte
 

I am converting tag files to RDF/XML by using the converter in tools-java version 1.1.1. When converting a small example file (example1.spdx etc.) the SpdxConverter class includes the full text of the license. This makes the RDF file verbose when inserting it into a RDF4J repository where I store relational data. I can exclude the text by parsing the RDF file but then I have to build my own logic by providing SPDX-License-Identifier or URI for the license.


Is there another way to convert tag files by including SPDX-License-Identifier or URI (using the https://spdx.org/licenses/ or https://github.com/spdx/license-list-data) and generating a full license text file when needed. Or could this be an enhancement for future versions if the use-case is valid?


Regards Chris. 


Gary O'Neall
 

Hi Chris,

 

I think this is a valid use case and one I’ve thought about as well.  Using the URI’s for listed licenses in RDF format would still be a valid SPDX document and much more compact.

 

The changes would involve changes to the tools-java and spdx-rdf-store projects.

 

Feel free to add an issue to the tools-java project.  If you have any ideas on what the command line option should be, feel free to propose in the issue.

 

Regards,

Gary

 

From: Spdx-tech@... <Spdx-tech@...> On Behalf Of info@...
Sent: Tuesday, November 22, 2022 4:47 AM
To: Spdx-tech@...
Subject: [spdx-tech] Option of using SPDX ID/URI when converting files (tools-java) #spdx

 

I am converting tag files to RDF/XML by using the converter in tools-java version 1.1.1. When converting a small example file (example1.spdx etc.) the SpdxConverter class includes the full text of the license. This makes the RDF file verbose when inserting it into a RDF4J repository where I store relational data. I can exclude the text by parsing the RDF file but then I have to build my own logic by providing SPDX-License-Identifier or URI for the license.

 

Is there another way to convert tag files by including SPDX-License-Identifier or URI (using the https://spdx.org/licenses/ or https://github.com/spdx/license-list-data) and generating a full license text file when needed. Or could this be an enhancement for future versions if the use-case is valid?

 

Regards Chris. 


Info@ Clear Byte
 

Hi Gary,


sure I’ll post a change request/enhancement to the tools-java project. I am using the Java API when doing conversion, which is more or less the same as the command line interface. 

Are there ways to generate a licence URI / SPDX-License-Identifier today to get some idea for a function/input parameters?


Greetings Chris.



On 22/11/2022 15:50, Gary O'Neall wrote:

Hi Chris,

 

I think this is a valid use case and one I’ve thought about as well.  Using the URI’s for listed licenses in RDF format would still be a valid SPDX document and much more compact.

 

The changes would involve changes to the tools-java and spdx-rdf-store projects.

 

Feel free to add an issue to the tools-java project.  If you have any ideas on what the command line option should be, feel free to propose in the issue.

 

Regards,

Gary

 

From: Spdx-tech@... <Spdx-tech@...> On Behalf Of info@...
Sent: Tuesday, November 22, 2022 4:47 AM
To: Spdx-tech@...
Subject: [spdx-tech] Option of using SPDX ID/URI when converting files (tools-java) #spdx

 

I am converting tag files to RDF/XML by using the converter in tools-java version 1.1.1. When converting a small example file (example1.spdx etc.) the SpdxConverter class includes the full text of the license. This makes the RDF file verbose when inserting it into a RDF4J repository where I store relational data. I can exclude the text by parsing the RDF file but then I have to build my own logic by providing SPDX-License-Identifier or URI for the license.

 

Is there another way to convert tag files by including SPDX-License-Identifier or URI (using the https://spdx.org/licenses/ or https://github.com/spdx/license-list-data) and generating a full license text file when needed. Or could this be an enhancement for future versions if the use-case is valid?

 

Regards Chris. 



Gary O'Neall
 

Hi Chris,

 

The listed license URI’s just add a standard namespace / prefix of “http://spdx.org/licenses/” before the license ID (e.g. GPL-2.0-or-later -> http://spdx.org/licenses/GPL-2.0-or-later). 

 

For RDF conversions, we’re basically saying that we exclude the full license definitions for listed licenses from the RDF files, so maybe an option name like “--excludeLicenseDetails” would make sense.

 

Regards,
Gary

 

 

 

From: Spdx-tech@... <Spdx-tech@...> On Behalf Of Info@ Clear Byte
Sent: Wednesday, November 23, 2022 7:01 AM
To: Gary O'Neall <gary@...>; Spdx-tech@...
Subject: Re: [spdx-tech] Option of using SPDX ID/URI when converting files (tools-java) #spdx

 

Hi Gary,

 

sure I’ll post a change request/enhancement to the tools-java project. I am using the Java API when doing conversion, which is more or less the same as the command line interface. 

Are there ways to generate a licence URI / SPDX-License-Identifier today to get some idea for a function/input parameters?

 

Greetings Chris.

 

On 22/11/2022 15:50, Gary O'Neall wrote:

Hi Chris,

 

I think this is a valid use case and one I’ve thought about as well.  Using the URI’s for listed licenses in RDF format would still be a valid SPDX document and much more compact.

 

The changes would involve changes to the tools-java and spdx-rdf-store projects.

 

Feel free to add an issue to the tools-java project.  If you have any ideas on what the command line option should be, feel free to propose in the issue.

 

Regards,

Gary

 

From: Spdx-tech@... <Spdx-tech@...> On Behalf Of info@...
Sent: Tuesday, November 22, 2022 4:47 AM
To: Spdx-tech@...
Subject: [spdx-tech] Option of using SPDX ID/URI when converting files (tools-java) #spdx

 

I am converting tag files to RDF/XML by using the converter in tools-java version 1.1.1. When converting a small example file (example1.spdx etc.) the SpdxConverter class includes the full text of the license. This makes the RDF file verbose when inserting it into a RDF4J repository where I store relational data. I can exclude the text by parsing the RDF file but then I have to build my own logic by providing SPDX-License-Identifier or URI for the license.

 

Is there another way to convert tag files by including SPDX-License-Identifier or URI (using the https://spdx.org/licenses/ or https://github.com/spdx/license-list-data) and generating a full license text file when needed. Or could this be an enhancement for future versions if the use-case is valid?

 

Regards Chris.