Description
I thought I knew JSON-LD.
But then I saw this DOAP example at https://github.com/common-workflow-language/common-workflow-language/wiki/Related-ontologies. Compare to an actual Turtle of a Debian package: https://packages.qa.debian.org/b/bowtie.ttl
"@context":
"foaf": "http://xmlns.com/foaf/0.1/"
"doap": "http://usefulinc.com/ns/doap"
"adms": "http://purl.org/adms/"
"admssw": "http://purl.org/adms/sw/"
adms:Asset
admssw:SoftwareProject
doap:name: "STAR"
doap:description: >
Aligns RNA-seq reads to a reference genome using uncompressed suffix arrays.
STAR has a potential for accurately aligning long (several kilobases) reads that are
emerging from the third-generation sequencing technologies.
doap:homepage: "https://github.com/alexdobin/STAR"
doap:repository:
- doap:GitRepository:
doap:location: "https://github.com/alexdobin/STAR.git"
doap:release:
- doap:revision: "2.5.0a"
doap:license: "GPL"
doap:category: "commandline tool"
doap:programming-language: "C++"
foaf:Organization:
- foaf:name: "Cold Spring Harbor Laboratory, Cold Spring Harbor, NY, USA"
- foaf:name: "2Pacific Biosciences, Menlo Park, CA, USA"
foaf:publications:
- foaf:title: "(Dobin et al., 2013) STAR: ultrafast universal RNA-seq aligner. Bioinformatics."
foaf:homepage: "http://www.ncbi.nlm.nih.gov/pubmed/23104886"
doap:developer:
- foaf:Person:
foaf:name: "Alexander Dobin"
foaf:mbox: "mailto:dobin at cshl.edu"
foaf:fundedBy: "This work was funded by NHGRI (NIH) grant U54HG004557"
adms:AssetDistribution
doap:name: "STAR.cwl"
doap:specification: "http://common-workflow-language.github.io/draft-3/"
doap:release: "cwl:draft-3.dev2"
doap:homepage: "https://github.com/common-workflow-language/workflows/blob/master/tools/STAR.cwl"
And I'm like WHAT MAGIC is this?
- Ok, a key with empty value is taken to be the
rdf:type
(@type
) - But it seems to me that the properties connecting sub-objects are often missing.
@stain @mr-c can you shed some light?
Googled YAML-LD
and only saw a brief discussion again by the CWL people: https://lists.w3.org/Archives/Public/public-linked-json/2015Jan/0035.html
The JSON-LD spec says
Although not discussed in this specification, parallel work using YAML could be used to map into the internal representation, allowing the JSON-LD 1.1 API to operate as if the source was a JSON document.
Despite no official support in the spec, the gazillion JSON-LD conformance tests are written in YAML: https://github.com/w3c/json-ld-syntax/tree/main/yaml .
I know that YAML can be trivially converted to JSON and thereon to JSONLD. But as per the above discussion, it would be nice to get rid of the need to write those pesky @
.
@gkellogg is there some convention for that, or the CWL example is not widely adopted?