Re: **PROPOSED** AS2 spec update

On 11/07/2014 06:35 PM, James M Snell wrote:
>> We still don't have clear way to provide information about multiple
>> encodings available. This could offer one of possible ways to do it:
>>
> 
> Sure we do. I've illustrated this several times already. Using this
> slightly revised model it would be:
> 
> {
>   "@context": "http://www.w3.org/ns/activitystreams",
>   "@type": "urn:example:video",
>   "displayName": "A Video",
>   "url": [
>     {
>       "@type": "as:Link",
>       "mediaType": "video/mpeg",
>       "href": "http://example.org/video.mpg"
>     },
>     {
>       "@type": "as:Link",
>       "mediaType": "video/mkv",
>       "href": "http://example.org/video.mkv"
>     }
>   ]
> }
> 
1. we get 3 blank nodes, first main 'social object' (which would need
@id for social interaction anyways), next two for *links* to .mpg and
.mkv encodings 'media objects' (which obviously have distinct HTTP URI
that we use for href of that link).

2. we state that a blank node of "@type": "as:Link" has property
mediaType, while it actually applies to its 'target'.

3. with 'as:url rdfs:range as:Link' we can *not* directly use:
  "url": "http://example.org/sth.jpg"
  but need to introduce blank node:
  "url": { "href": "http://example.sth.jpg" }

4.
http://rawgit.com/jasnell/w3c-socialwg-activitystreams/refactor2/activitystreams2-vocabulary.html#dfn-url
   "The url property is typically used to point to a displayable
representation of an object (usually an HTML page)."

BTW
https://github.com/jasnell/w3c-socialwg-activitystreams/blob/refactor2/activitystreams2-context.jsonld#L1036

   {
     "@id": "as:url",
     "@type": "owl:FunctionalProperty",
     "rdfs:domain": "as:Object",
     "rdfs:range": "as:Link"
   }
http://www.w3.org/TR/2012/REC-owl2-primer-20121211/#a_FunctionalObjectProperty
to my understanding it would 'almost' allow (require?) us to merge those
blank nodes into single one (here violating as:href a
owl:FunctionalProperty)

   "url": {
       "@type": "as:Link",
       "mediaType": [
         "video/mpeg",
         "video/mkv"
       ],
       "href": [
         "http://example.org/video.mpg",
         "http://example.org/video.mkv"
       ]
     }

I guess that you just missed updating @type of as:url to support
multiple different values!


Now to compare, another approach (similar to schema.org but not using
its namespace or contentUrl)

{
  "@context": "http://www.w3.org/ns/activitystreams",
  "@type": "urn:example:Video",
  "@id": "http://example.org/video1",
  "displayName": "A Video",
  "encoding": [
    "http://example.org/video1.mp4",
    {
      "@type": "as:MediaObject",
      "@id": "http://example.org/video1.mpg",
      "mediaType": "video/mpeg"
    },
    {
      "@type": "as:MediaObject",
      "@id": "http://example.org/video1.mkv",
      "mediaType": "video/mkv"
    }
  ]
}

1. no blank nodes!
2. we state that /video1.mkv has property mediaType
3. we can directly use:
   "encoding": "http://example.org/video1.mp4"
4. http://schema.org/encoding
   "A media object that encodes this CreativeWork. This property is a
synonym for associatedMedia."


IMO need to distinguish Book, Photo, Video, Recording from it various
encodings pdf/epub/html, jpeg/gif/png, mp4/ovg/mkv, mp3/ogg/wav deserves
some special attention. Maybe we could even find cleaner solution based
on Content Negotiation?

Received on Friday, 7 November 2014 19:32:45 UTC