spdx-spec icon indicating copy to clipboard operation
spdx-spec copied to clipboard

Is there code/a software that converts an SPDX license expression into valid OWL/RDF?

Open hoijui opened this issue 1 year ago • 4 comments

SPDX license expressions are strings that might look like "MIT OR LicenseRef-MyOwnLicense". As much as I figured, this would have to be represented differently in RDF, using multiple triples, including at least one disjunctive license set individual.

Is there already open source code/a tool that can do this conversion?

hoijui avatar Jun 25 '24 16:06 hoijui

Is there already open source code/a tool that can do this conversion?

Somewhat - the SPDX Java tools and the SPDX Online tools can convert from a JSON, Tag/Value or spreadsheet containing the string representation of a license expression to RDF format (RDF/XML or RDF/TTL).

The tools won't translate just the license expression string, but that would not be too difficult to add.

goneall avatar Jun 25 '24 17:06 goneall

Ahh nice, thank you! :-) I'll have a look at the CLI tool and converting from JSON to RDF ...

hoijui avatar Jun 25 '24 18:06 hoijui

I got the tool running .. do you maybe have an example JSON file?

hoijui avatar Jun 25 '24 20:06 hoijui

I got the tool running .. do you maybe have an example JSON file?

The official examples are in the spec repo - since we're working with SPDX version 2.3, you should use these examples.

goneall avatar Jun 25 '24 21:06 goneall

Cloasing this as I think the answers have resolved. Please reopen if I've missed something.

kestewart avatar Aug 11 '24 22:08 kestewart