- From: David Booth <david@dbooth.org>
- Date: Fri, 13 Mar 2015 16:56:24 -0400
- To: public-linked-json@w3.org
- CC: Manu Sporny <msporny@digitalbazaar.com>, markus.lanthaler@gmx.net, Jim McCusker <mccusj@rpi.edu>
I'm experimenting with @type and @id in the @context to generate an
object node. AFAICT, when I convert to Turtle, the URI for the object
node is generated using the @base URI. Is there some other way to
specify it in the @context? FHIR has a "resourceType" property, and I'd
like to treat the value of that property as an rdf:type in the fhir:
namespace. So given JSON-LD like this:
{
"@context": ...
"resourceType": "Observation",
"@id": "obs123",
...
}
I would like it to generate RDF like this (assuming the base URI
corresponds to the b: prefix):
b:obs123 rdf:type fhir:Observation .
However, what I'm getting so far is something like:
b:obs123 rdf:type b:Observation .
Here is the actual JSON-LD that I am trying so far:
{
"@context":
{
"@base": "http://example/base/",
"@vocab": "http://example/vocab#",
"fhir": "http://example/fhir#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"resourceType":
{
"@id": "rdf:type",
"@type": "@id"
}
},
"@id": "obs123",
"resourceType": "Observation",
"text": {
"@id": "text456",
"status": "generated",
"div": "<div>...</div>"
}
}
and here is the RDF that I'm getting as a result:
@prefix fhir: <http://example/fhir#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix b: <http://example/base/> .
b:obs123
<http://example/vocab#text> b:text456 ;
rdf:type b:Observation .
b:text456
<http://example/vocab#div> "<div>...</div>" ;
<http://example/vocab#status> "generated" .
Is it possible to use @context to generate the type of b:obs123 as
fhir:Observation instead of b:Observation?
Thanks,
David Booth
Received on Friday, 13 March 2015 20:56:51 UTC