Skip to content

Fields with JsonldPredicate ID "@type" are not resolved to rdf:type in RDF #277

Open
@stmbaier

Description

@stmbaier

In the CWL schema definition files (like CommandLineTool.yml, Process.yml, etc.) multiple times fields are declared as having the predicate ID rdf:type like so:

fields:
    - name: class
      jsonldPredicate:
        "_id": "@type"
        "_type": "@vocab"

For CWL files, which are instances of the CWL schema, this works totally fine and leads to the desired instance-of relation in RDF, e.g. class: CommandLineTool in CWL YAML gets transformed to a cwl:CommandLineTool in RDF.

But if the CWL schema itself is transformed to RDF with SALAD and the metaschema.yml the ID of JsonldPredicate object of the field is tranformed to sld:_id <file:///LOCAL/PATH/TO/CWL-SCHEMA-DIRECTORY/@type>, which is clearly ill-formed and should instead also lead to rdf:type.
According to the SALAD schema definition the _id of JsonldPredicate is resolved according to vocabulary resolution, which starts with link resolution. And as the link resolution rules do not state any special cases for URIs starting with @ the interpretation as relative reference seems legit and leads to the ill-formed predicate IRI.
So in my eyes the CWL schema files must not use '@type' for _id of JsonldPredicates, but instead should use rdf:type (+ rdf namespace definition).

Is this analysis correct and its a bug or have I missed anything from the definitions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions