Re: Issue-14: as:Link complexity

On Wed, Apr 22, 2015 at 3:36 AM, henry.story@bblfish.net <
henry.story@bblfish.net> wrote:

> ​[snip]​
>
> Now I suppose the Link type is needed for clients that know a lot more
> about the browser they are working in and that can choose the specific
> representation. If as a AS2.0 publisher I want to use the pull 100 proposed
> spec to also cater to those client I'd have to do the following:
>
> </application/image> a as:Link;
>    as:href </application/image.png>;
>    as:mediaType "image/png" ;
>    as:href </application/image.jpeg> ;
>    as:mediaType "image/jpeg" .
>
> But since RDF triples are not ordered that would be equivalent to the
> following:
>
> </application/image> a as:Link;
>    as:href </application/image.png>;
>    as:mediaType "image/jpeg" .
>
> </application/image> a as:Link;
>    as:mediaType "image/png" ;
>    as:href </application/image.jpeg> ;
>
> ​[snip]​

​That's not how it currently works. One, href and mediaType are defined as
functional properties of as:Link. ​Two, it would be more like:

{
  "@id": "http://example.org/application",
  "@type": "Application",
  "image": [
    {
      "@type": "as:Link",
      "mediaType": "image/jpeg",
      "href": "http://example.org/application/image.jpeg"
    },
    {
      "@type": "as:Link",
      "mediaType": "image/png",
      "href": "http://example.org/application/image.png"
    }
  ]
}

​Which translates down to:

​<http://example.org/application> a as:Application ;
  as:image _:b0, _:b1 .

_:b0 a as:Link ;
  as:mediaType "image/jpeg",
  as:href <http://example.org/application/image.jpeg> .

_:b1 a as:Link ;
  as:mediaType "image/png",
  as:href <http://example.org/application/image.png> .

​Which is exactly what one would expect.

- James​

Received on Wednesday, 22 April 2015 15:02:21 UTC