There are no descriptions of how to behave in the case of `"_id": "@type"`
tom-tan opened this issue · comments
The schema of CWL uses the following jsonldPredicate
but there are no descriptions how "_id": "@type"
field must be used for preprocessing.
jsonldPredicate:
"_id": "@type"
"_type": "@vocab"
It would be nice if it is clarified in the spec.
These are defined in reference to JSON-LD.
{"@id": "@type"}
https://www.w3.org/TR/json-ld/#aliasing-keywords
This means the class
is an alias for json-ld @type
https://www.w3.org/TR/json-ld/#specifying-the-type
Which, if you go full RDF triples, becomes rdf:type
:
https://www.w3.org/TR/rdf-schema/#ch_type
Although to be honest I am finding the JSON-LD specification to be a little bit obtuse and I can't find where it comes out and actually states that @type
is an alias for rdf:type
in this situation (unfortunately the @type
keyword also has overloaded meaning in JSON-LD).
{"@type": "@vocab"}
https://www.w3.org/TR/json-ld/#type-coercion
"@vocab
first tries to expand the value by interpreting it as term"
"A term is a short word defined in a context that may be expanded to an IRI."
The main effect this has on Schema salad preprocessing is to normalize IRIs to short, in-vocabulary terms. In other words, if
{"class": "https://w3id.org/cwl/cwl#InlineJavascriptRequirement"}
appears, it should be recognized and normalized to
{"class": "InlineJavascriptRequirement"}