draft-polli-restapi-ld-keywords
draft-polli-restapi-ld-keywords copied to clipboard
Controlled Vocabulary modeling hints
I expect
- [ ] controlled vocabularies modeling hints
Notes
How should I model controlled vocabularies like codelist or taxonomies?
What's the difference between using @base and @vocab?
Examples
Non-composable vocabs (support fragment)
"@context":
"@vocab": "https://example.com/"
country:
# This field is associated with a vocab
"@type": "@vocab"
"@context":
"@vocab": "https://example.com/vocab#"
"@type": Country
country: ITA
results in
[]
a <https://example.com/Country>;
<https://example.com/country> <https://example.com/vocab#ITA>
Composable vocab (does not support fragment)
"@context":
"@vocab": "https://example.com/"
"@base": "https://example.com/vocab/"
country: "@id"
"@type": Country
country: ITA
<https://example.com/vocab/ITA> a <https://example.com/Country>
Composable vocab (mangled to support fragment)
"@context":
"@vocab": "https://example.com/"
"@base": "https://example.com/vocab"
country: "@id"
"@type": Country
country: "#ITA"
<https://example.com/vocab#ITA> a <https://example.com/Country>
Composable vocab (mangled to support fragment, usng a prefix)
"@context":
"@vocab": "https://example.com/"
"c": "https://example.com/vocab#"
country: "@id"
"@type": Country
country: "c:ITA"
<https://example.com/vocab#ITA> a <https://example.com/Country>