Re: Reference @context via URL with something with type @id

On Mon, Jun 8, 2015 at 6:08 PM, David Janes <davidjanes@davidjanes.com> wrote:
> Yes - live. It's https://iotdb.org/pub/iot#model expanded.
>
> D.
>
> On Mon, Jun 8, 2015 at 5:42 PM, David I. Lehn <dil@lehn.org> wrote:
>>
>> On Mon, Jun 8, 2015 at 4:11 PM, David Janes <davidjanes@davidjanes.com>
>> wrote:
>> > ...
>> > BUT the fact that
>> >
>> > "model": { "@type": "@id" }
>> >
>> >  is _already_ defined in "https://iotdb.org/pub/iot" (go look at
>> > "https://iotdb.org/pub/iot.jsonld). So my understanding is we shouldn't
>> > have
>> > to explicitly spell that out here. But when I do:
>> >
>>
>> I don't see "model" in the context at that URL.  Is the live site
>> up-to-date?
>>

https://iotdb.org/pub/iot.jsonld has this @context:
{
  "@context": {
    "iot": "https://iotdb.org/pub/iot#",
    "iot-attribute": "https://iotdb.org/pub/iot-attribute#",
    "iot-facet": "https://iotdb.org/pub/iot-facet#",
    "iot-unit": "https://iotdb.org/pub/iot-unit#",
    "iot:cf": {
      "@type": "@id"
    },
    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
    "schema": "https://schema.org/",
    "xs": "http://www.w3.org/2001/XMLSchema/#"
  },
  ...
}

A JSON-LD processor will only look at the @context data not other
vocabulary data.  iot:model is described later in the doc but that
won't be used during processing.  Adding '"model": { "@type": "@id" }'
(and anything else similar) to the @context should do what you want.

-dave

Received on Monday, 8 June 2015 22:32:00 UTC