-
-
Save bblfish/7d7bc62c0c5612649b8bc2135633226e to your computer and use it in GitHub Desktop.
Yaml version of EricP's json https://twitter.com/bblfish/status/1533823391148425216
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# <-- S is a fresh BNode (or steal @id conventions from JSON-LD) | |
type: record # <-- emit { S rdf:type <record> .} (outer-most frame only) | |
namespace: example.avro # <- no effect; used for avro resultion | |
name: array_union # <- no effect (i don't even know what this is for) | |
fields: # <-- implies a list of nested statements with subject S | |
- name: study i # <-- V for a complex type is a fresh BNode | |
"@id": http:...name # <-- emit { S <http:...study> V . } | |
type: # <-- S := V | |
name: study # <- no effect | |
type: record # <-- no effect | |
fields: # <-- implies a list of nested statements with subject V | |
- name: name # <-- validates a value V | |
type: string # <-- with DT := xsd:string | |
"@id": http:...name # <-- emit { S <http:...name> V^^DT . } | |
- name: corpus # <-- V is a fresh BNode | |
"@id": http:...corpus # <-- P := | |
type: | |
- null # <-- No triple emitted if null (at least, that was the DirectMapping choice) | |
- type: array # <-- in a type 'array', so keep track of tail of list: TAIL := { | |
# S <http:...corpus> @TBD . }' | |
name: corpus_name_0 | |
items: # <-- for each item | |
name: _name_0 # <-- no effect | |
type: record # <-- LI := fresh BNode; | |
# emit TAIL with LI substituted in for @TBD | |
# emit { LI rdf:first foaf:name S }; | |
# TAIL := { LI rdf:rest @TBD . } | |
fields: # <-- S is a fresh BNode | |
- name: name # <-- validates a value V | |
type: string # <-- with DT := xsd:string | |
"@id": foaf:name # <-- emit { S foaf:name V^^DT }; | |
- name: status # <-- validates a value V | |
"@id": http:...status | |
type: | |
name: StatusType | |
type: enum # <-- with termType := iri | |
symbols: | |
- enrolled # <-- if matched, emit { S <http:...status> <enrolled> . } | |
- initiated # <-- if matched, emit { S <http:...status> <initiated> . } | |
- completed # <-- if matched, emit { S <http:...status> <completed> . } | |
# at end of items, emit TAIL with rdf:nill substituted in for @TBD.' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment