Re: Enumeration values

Am 10.01.2015 um 14:17 schrieb Thomas Hoppe:
> Hi,
>
> I don't see why we would need `hydra:allowedIndividual`. I have 
> something easier in mind:
> I would just enumerate the allowed individuals inline as they are.
> The API client knows only from the fact that the individuals are 
> declared as `hydra:allowedIndividuals`
> that they make up the range of selection items from which it (or a 
> user) can choose.

Yep, that was my first attempt, too. However, if you put it into the 
jsonld playground, you will see that this doesn't quite say what we need 
to say. The "@id" values are interpreted against the document base, not 
the @vocab (see below). That is the whole point why I needed a separate 
property for individuals which I can use to say "@type":"@vocab".

"http://www.w3.org/ns/hydra/core#allowedIndividuals": [
                   {
                     "@id": "http://json-ld.org/playground/EventCancelled",
                     "http://www.w3.org/ns/hydra/core#title": [
                       {
                         "@value": "manifestazione annullata"
                       }
                     ]
                   },

Cheers,
Dietrich

Received on Saturday, 10 January 2015 15:09:58 UTC