Skip to content

Prefixes from @context are ignored #28

@bigerl

Description

@bigerl

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions