RE: Another pass at as:Link

On 4 Nov 2014 at 21:00, James M Snell wrote:
> Based on the discussion, it seems we definitely need another pass at
> as:Link. The qualified relationship model appears to be the most
> agreed upon model so far. Basically, the only material change that

Is it? From reading all the discussions on the mailing list it appears your proposal A below actually has more support.. but I might be wrong. Should we do a straw-poll to find out?

What exactly do you mean by

> Both are allowed.

Does every consumer of AS have to understand both forms?


> would be required is the introduction of a new term (as:href ?) that
> would point to the linked resource rather than using @id. We would
> keep "as:rel"
> 
> So looking at the options,
> 
> A. {
>   "image": "http://www.example.org/foo.jpg"
> }
> 
> B. {
>   "image": {
>     "@type": "as:Link",
>     "href": "http://www.example.org/foo.jpg",
>     "mediaType": "image/jpeg"
>   }
> }
> 
> In A, we have a direct, unqualified relationship.
> In B, we have an indirect, qualified relationship.
> 
> Both are allowed.
> 
> In A, the normalized output would be:
> 
> _:c14n0 <as:image> <http://www.example.org/foo.jpg> .
> 
> In B, the normalized output would be:
> 
> _:c14n0 <as:image> _:c14n1 .
> _:c14n1 <rdf:type> <as:Link> .
> _:c14n1 <as:href> "http://www.example.org/foo.jpg" .
> _:c14n1 <as:mediaType> "image/jpeg" .
> 
> This treats as:Link more like the Activity Streams 1.0 MediaLink as
> opposed to some hybrid object and avoids overloading @id. It allows us
> to keep "as:rel".
> 
> A more detailed example:
> 
> {
>   "@id": "urn:example:movies:1",
>   "@type": "urn:example:types:Video",
>   "displayName": "A Video",
>   "url": [
>     {
>       "@type": "as:Link",
>       "href": "http://example.org/movie.mpg",
>       "mediaType": "video/mpeg"
>     },
>     {
>       "@type": "as:Link",
>       "href": "http://example.org/movie.mkv",
>       "mediaType": "video/mkv"
>     }
>   ],
>   "image": {
>     "@type": "as:Link",
>     "href": "http://example.org/img/movie.jpg",
>     "mediaType": "image/jpeg",
>     "rel": "preview"
>   }
> }


--
Markus Lanthaler
@markuslanthaler

Received on Tuesday, 4 November 2014 21:19:18 UTC