-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
spdx-java-v3jsonld-store/src/main/java/org/spdx/v3jsonldstore/JsonLDDeserializer.java
Line 107 in f3b4619
| String id = graphNode.has(SPDX_ID_PROP) ? graphNode.get(SPDX_ID_PROP).asText() : graphNode.get("@id").asText(); |
Prefixes from @context seem to be ignored, e.g.:
{
"@context": {
"xsd": "http://www.w3.org/2001/XMLSchema#",
"spdx": "https://spdx.org/rdf/3.0.1/terms/Core/",
# ...
},
# ...
"spdx:spdxId": {
"@type": "xsd:anyURI",
"@value": "urn:uuid:01973600-280e-7e13-b035-87a63695cf3d"
},
# ...
}
does not work. spdxId only works with:
{
"@context": {
"xsd": "http://www.w3.org/2001/XMLSchema#",
"@vocab": "https://spdx.org/rdf/3.0.1/terms/Core/",
# ...
},
# ...
"spdxId": {
"@type": "xsd:anyURI",
"@value": "urn:uuid:01973600-280e-7e13-b035-87a63695cf3d"
},
# ...
}
Here, it seems not specifying "@vocab": "https://spdx.org/rdf/3.0.1/terms/Core/", is also fine.
This leaves me also with the following questions:
Is this really a general purpose SPDX v3 JSON-LD store, or is it rather built to digest files from exactly one source that always structures them the same way? In RDF, I would expect an application to accept my files if the graph matches the necessary structure independent of the exact serialization i use. This seems not to be the case with this store.
Metadata
Metadata
Assignees
Labels
No labels