Re: [admin] Agenda - teleconference 15 April 2015

Also, do we want to slug suggest ids for body and target references in a POST?

On Wed, Apr 15, 2015 at 6:05 PM, Robert Sanderson <azaroth42@gmail.com> wrote:
>
>
> Hi TB,
>
> I guess your question is about the last POST?
>
> It seems to me like that should be two separate annotations. One noting that
> it's spring, and the other noting that where it was taken, as there's no way
> to link individual bodies with individual targets.  Otherwise, according to
> the spec at the moment, each body is about each target.
>
> Rob
>
>
> On Wed, Apr 15, 2015 at 7:57 AM, TB Dinesh <dinesh@servelots.com> wrote:
>>
>> Late to send to the telcon for discussion but trying to make an example
>> case.
>> The problems here are in identifying ids in body and target of POST.
>> Will do another version after the telcon maybe
>> ----------------------------------------------
>>
>> Image Annotation by 2 persons
>> Protocol headers included
>>
>> Description of the annotations in this example
>>
>> We have a picture (http://example.com/petek1.jpg) that includes a tree
>> at Petek at B University. Owner wants to share the image of the tree
>> (and ask info about the tree)
>> Identify the Judas tree. Someone else says something about the shape
>> of the Judas tree.
>> Say something about where it is. Say something about season the
>> picture was taken.
>>
>> Scenario: foaf:person1 on example.com requests annotation from example.org
>>
>> GET /annotations/ HTTP/1.1
>> Host: example.org
>> Accept: application/ld+json
>>
>> RESPONSE
>>
>> HTTP/1.1 200 OK
>>
>> Content-Type: application/ld+json
>> ETag: "_87e52ce123123"
>> Link: <http://www.w3.org/ns/ldp#BasicContainer>; rel="type"
>>      <http://www.w3.org/TR/annotation-protocol/constraints>;
>> rel="http://www.w3.org/ns/ldp#constrainedBy"
>>
>> Allow: POST,GET,OPTIONS,HEAD
>> Vary: Accept
>> Content-Length: 221
>>
>> {
>>  "@context": "http://www.w3.org/ns/oa",
>>  "@id": "http://example.org/annotations/",
>>  "@type": "ldp:BasicContainer",
>>  "label": "A Container for Open Annotations",
>>  "alternate": ["http://example.org/annotations2/",
>> "http://example.org/moreAnnotations/"],
>>  "contains": ["87459petek"]
>> }
>>
>> {   "@id": "87459petek",
>>     "@type": "oa:Annotation",
>>     "target": {
>>     "@id": "http://example.com/petek1.jpg",
>>     "@type": "dctypes:Image",
>>     "format": "image/jpeg"
>>     },
>>
>>  "body": { #asks about a tree in the image
>>     "@id": "947ask",
>>     "@type": "dctypes:Sound",
>>     "format": "audio/mpeg",
>>     "language": "tr"
>>     }
>>  "annotatedBy":    "http://example.org/person1",
>>  "annotatedAt": "2015-04-14T12:00:00Z"
>> },
>>
>> {"@id": "947ask",
>> "@type": "oa:SpecificResource",
>> "source": "http://audio.example.org/sound1"}
>>
>>
>> 2.
>> #Identify tree as Judas tree.
>> #Says something about the shape of the Judas tree.
>>
>>
>> POST /annotations/ HTTP/1.1
>> Host: example.org
>> Accept: application/ld+json
>> Content-Type: application/ld+json
>> Content-Length: __
>> Slug: "87554petek"
>>
>> {    "@context": "http://www.w3.org/ns/oa",
>>     "@type": "oa:Annotation",
>>     "target": {
>>     "@type": "dctypes:Image",
>>     "format": "image/jpeg",
>> "selector": {
>>          "@type": ["oa:SvgSelector", "oa:EmbeddedContent"],
>>          "value": "<svg:svg> [(120,123)(127,135)(160,135)(160,123)]
>> </svg:svg>",
>>          "format": "image/svg+xml"
>>     }
>>   },
>>  "body": {
>> "value": “It is Judas. They are like intricate umbrellas”,
>>     "@type": {"dctypes:text","oa:EmbeddedContent"},
>>     "format": "text/plain",
>>     "language": "en"
>>     },
>>   }
>>
>> RESPONSE
>>
>>
>> HTTP/1.1 201 CREATED
>> Content-Type: application/ld+json
>> ETag: "_87e52ce126126petek1"
>> Allow: PUT,GET,OPTIONS,HEAD,DELETE,PATCH
>> Link: <http://www.w3.org/ns/ldp#Resource>; rel="type"
>> Vary: Accept
>> Content-Length: ___
>>
>> {    "@context": "http://www.w3.org/ns/oa",
>>     "@type": "oa:Annotation",
>>     "@id": "87554petek",
>>     "target": {
>>     "@id": "http://example.org/petek1fgr",
>>     "@type": "dctypes:Image",
>>     "format": "image/jpeg",
>> "selector": {
>>          "@type": ["oa:SvgSelector", "oa:EmbeddedContent"],
>>          "value": "<svg:svg> [(120,123)(127,135)(160,135)(160,123)]
>> </svg:svg>",
>>          "format": "image/svg+xml"
>>     }
>>   },
>>  "body": {
>>     "@id": "947ans",
>> "value": “It is Judas. They are like intricate umbrellas”,
>>     "@type": {"dctypes:text","oa:EmbeddedContent"},
>>     "format": "text/plain",
>>     "language": "en"
>>     },
>>  "annotatedBy": "foaf:person2",
>>  "annotatedAt": "2015-04-15T15:50:00Z"
>> }
>>
>> Then further annotates again with multiple bodies and targets
>>
>>
>> POST /annotations/ HTTP/1.1
>> Host: example.org
>> Accept: application/ld+json
>> Content-Type: application/ld+json
>> Content-Length: __
>>
>> {
>> "@type": "oa:Annotation",
>> "target": [    {"@id": "http://example.org/petek1fgr"}, {"@id":
>> "http://example.org/petek1"}  ],
>> "body":
>> [{ #for target.2
>> "value": “It is early spring”
>> "@type": {"dctypes:text","oa:EmbeddedContent"},
>> "format": "text/plain",
>>  "language": "en"
>> },
>> { #for target.1
>> "value": “Looks like it is taken at Petek in South Campus”
>> "@type": {"dctypes:text","oa:EmbeddedContent"},
>> "format": "text/plain",
>> "language": "en"
>> }
>> ],
>>
>> }
>>
>
>
>
> --
> Rob Sanderson
> Information Standards Advocate
> Digital Library Systems and Services
> Stanford, CA 94305

Received on Wednesday, 15 April 2015 15:08:31 UTC