Using JSON-LD context aliases for values #3097
Unanswered
aemnathanclinton
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As far as I can tell, I should be able to use context aliases in JSON-LD values and have them translated properly. The ontology we're using (Common Education Data Standard) implements opaque identifiers for all IRIs. I am working on a global context JSON file that can be used by the CEDS community that translates those opaque IDs into human readable aliases, making the JSON-LD human readable. When I parse JSON-LD, the class and property aliases all translate properly. When I use aliases for values, however, specifically to Named Individuals in the CEDS ontology that identify standardized value set options, e.g. the "Asian" federal race code, these aliases are not translated into their proper IRIs.
Here is a section of the context JSON. This is just my most recent iteration:
And here is the associated usage:
"hasTelephoneNumberType": "TelephoneNumberType_Work"
This parses into this triple:
(rdflib.term.BNode('N05934b70aea44169973da5994b9ff7ea'), rdflib.term.URIRef('http://ceds.ed.gov/terms#P000280Shape'), rdflib.term.Literal('TelephoneNumberType_Work'))
I want it to parse out to:
(rdflib.term.BNode('N05934b70aea44169973da5994b9ff7ea'), rdflib.term.URIRef('http://ceds.ed.gov/terms#P000280Shape'), rdflib.term.URIRef('http://ceds.ed.gov/terms#NI000280117202'))
I've tried several ways of configuring the context in my JSON-LD file, but I haven't had any luck yet. Am I misunderstanding the scope to which context aliasing is meant to be used, or is this an enhancement we could contribute to the library? Or, preferably, can someone show me how to do this properly?
Thanks, all!
Beta Was this translation helpful? Give feedback.
All reactions