W3C home > Mailing lists > Public > public-linked-json@w3.org > July 2014

Re: how does a term definition include all of : type, id, and alias

From: james anderson <james@dydra.com>
Date: Sun, 20 Jul 2014 16:19:36 +0200
Message-Id: <B5FBF2A1-8BD2-4A22-B373-BAF575DDEE50@dydra.com>
To: public-linked-json@w3.org
good afternoon,

On 20 Jul 2014, at 16:02, Markus Lanthaler <markus.lanthaler@gmx.net> wrote:

>>> […]
>> 
>> how would one declare how to frame
>> 

> 
> I assume you meant this instead, otherwise the JSON snippet below doesn't
> make much sense as the two blank nodes aren't connected to each other (at
> least not directly):

correct. my error.

i had intended something more like

_:thing1 <http://example.com/id> <http://example.com/thing#1> .
_:thing1 <http://example.com/type> <http://example.com/ImportantThing> .
_:thing1 <http://example.com/feature> _:thing2 .
_:thing2 <http://example.com/id> <http://example.com/thing#2> .
_:thing2 <http://example.com/type> <http://example.com/Feature> .
_:thing2 <http://example.com/characteristic> "low power consumption” .

> 
> <http://example.com/thing#1> <http://example.com/type>
> <http://example.com/ImportantThing> .
> <http://example.com/thing#1> <http://example.com/feature>
> <http://example.com/thing#2> .
> <http://example.com/thing#2> <http://example.com/type>
> <http://example.com/Feature> .
> <http://example.com/thing#2> <http://example.com/characteristic> "low power
> consumption" .
> 
>> into
>> 
>> [ { "key" : <http://example.com/thing#1>,
>>    "class":  <http://example.com/ImportantThing>,
>>    "features" : [ { "key" : <http://example.com/thing#2>, "class":
>> <http://example.com/Feature>, "detail": "low power consumption" } ]  } ]
> 
> You can use the following frame
> 
>  {
>    "@context": {
>      "key": "@id",
>      "class": { "@id": "http://example.com/type", "@type": "@id" },
>      "features": "http://example.com/feature",
>      "detail": "http://example.com/characteristic"
>    },
>    "features": {}
>  }
> 
> http://tinyurl.com/maezvet

your playground example works on the prepared json, but it is not clear how it applies to the given graph.
that is, the “json-ld input” requires an initial transformation from the original rdf graph which i do not yet follow as a consequence of the frame declaration.

the frame also appears to rely on not having specified a type.

?



---
james anderson | james@dydra.com | http://dydra.com
Received on Sunday, 20 July 2014 14:20:08 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:18:42 UTC