Re: schema.org action status type

On Tue, Nov 4, 2014 at 12:55 PM, ☮ elf Pavlik ☮ <
perpetual-tripper@wwelves.org> wrote:

> On 11/04/2014 07:55 PM, Sam Goto wrote:
> >
> >
> > On Sat, Nov 1, 2014 at 1:19 PM, ☮ elf Pavlik ☮
> > <perpetual-tripper@wwelves.org <mailto:perpetual-tripper@wwelves.org>>
> > wrote:
> >
> >     On 11/01/2014 09:09 PM, Jason Douglas wrote:
> >     > Yes, potential actions are a "template" for future action
> instances and
> >     > therefore a bit different.  For example, it doesn't make much
> sense to
> >     > use the *-input stuff on completed actions.
> >     >
> >     > We did try several iterations of the proposal where action
> templates
> >     > were a distinct class hierarchy, but discarded them as unusable.
> >     could you please provide links to those discarded proposals and
> relevant
> >     discussions?
> >
> >
> > I can probably dig into some old docs and clean them up to make them
> > presentable. Give me a sec, I'll share them with you in a bit.
> Thanks a lot Sam!
>
> For the future I would propose trying to minimise use of pdf documents.
>

Ugh, the document where I collected these options is full of things that I
can't share broadly, so I'll have to send you a few code snippets. I'll try
to compile them into something easier to read, but here goes a few of the
options we explored.

[1-5] shows a list of options, and I know it is hard to understand the
distinction between them out of context (it will take me some time to wrap
them around their context, e.g. research papers that we based our research
on).

This is possibly also relevant, because it was part of the alternatives
that we looked at (including hydra), although more biased towards
RESTful/Hypermedia HTTP services than markup on web pages.

http://blog.sgo.to/2014/03/rows-and-idls.html

You can also find one of the early proposals where we use SupportedClass
and SupportedProperty from Hydra, via expects and returns, which I think is
fairly close to what you are landing too:

https://www.w3.org/wiki/images/2/25/Schemaorg-actions-draft5.pdf

We eventually moved back to subclassing/annotating properties, which is
descibred here:

https://www.w3.org/wiki/images/7/7e/Actions-draft6.pdf

You can also look at what gmail launched with a couple of years ago, which
was the earliest of the iterations:

https://developers.google.com/gmail/markup/reference/review-action

I know these are hard to follow and I didn't document well enough the trade
offs that were made, but hopefully with the raw materials you can reach at
the same conclusions :) If not, I'd be certainly interested in hearing the
thinking process :) Otherwise, I'll try to get them organized for future
reference (e.g. the datashape data group that is starting to form).

I just learned about this, and might be relevant too:

http://www.w3.org/2001/sw/wiki/images/0/00/SimpleApplication-SpecificConstraintsforRDFModels.pdf

One more time, apologies for the rough material, I hope this helps your
research for activitystreams,

Sam

[1]

<script type="application/ld+json">

{

 "@context": "http://schema.org",

 "@type": "WatchAction"

 “status”: “proposed”,

 "object/restriction" : {

   "@type": "DataTypeRestriction",

   "describes": "http://schema.org/Movie",

   "property" : {

     "property": "http://schema.org/url",

     "pattern": "http://movies.netflix.com/Movie/",

   }

   "property" : {

     "property": "http://schema.org/streameable",

     "allowedValue": "true",

   }

 },

 "handler" : {

   "@type": "ActionHandler",

   "url": "http://www.netflix.com/watch <http://schema.org/Movie>",

 }

}
</script>

[2]

<script type="application/ld+json">

{

 "@context": "http://schema.org",

 "@type": "SearchAction"

 “status”: “proposed”,

 "instrument" : {

   "@type": "Store?",

   “company”: “walmart”,

   "name/occurs": “Exactly-One”,

   "location/usage": “Exactly-One”,

   "location": {

       "@type": "PostalAddress?",

       "addressLocality/usage": "optional"

     }

   }

   "pickup/occurs": “Zero-or-Many”,

   "pickup/allowedValue": “Free site to Store”,

   "service/occurs": “Zero-or-Many-Ands†”,

   "service/allowedValue": [“Open 24h”, “Pharmany”, “Grocery”,]

 }

 "result" : {

   "@type": "Store?",

   “company”: “walmart”,

 }

}
</script>

[3]

<script type="application/ld+json">

{

 "@context": "http://schema.org",

 "@type": "ReserveAction"

 "object/shape" : {

   "@type": "ResourceShape",

   "describes":  "Reservation",

   "property": [{

     "@type": "Property",

     "name": "name",

     "occurs": "Exactly-one"

   },{

     "@type": "Property",

     "name": "location",

     "occurs": "Exactly-one",

     "allowedValue": {

       "@type": "ResourceShape",

       "describes":  "Place",

       "property": [{

         "@type": "Property",

         "name": "addressLocation",

         "occurs": "Exactly-one"

       }

     }

   }]

 }

}

</script>


[4]

<script type="application/ld+json">

{

 "@context": "http://schema.org",

 "@type": "EmailMessage",

 "action": {

   "@type": "ReviewAction",

   "review": {

     "@type": "Review",

     "itemReviewed": {

       "@type": "FoodEstablishment",

       "name": "Joe's Diner"

     },

     "reviewRating": {

       "@type": "Rating",

       "bestRating": "5",

       "worstRating": "1"

     }

   },

   "handler": {

     "@type": "HttpActionHandler",

     "url": "http://reviews.com/review?id=123",

     "shape": {

       "@type": "ResourceShape",

       "describes": "ReviewAction",

       "property": {

         "@type": "Property",

         "path": "review.reviewRating.ratingValue"

         "occurs": "Exactly-One"

       }

     },

     "method": "http://schema.org/HttpRequestMethod/POST"

   }

 }

}
</script>

[5]

<script type="application/ld+json">

{

 "@context": "http://schema.org",

 "@id": "SFRestaurant"

 "@type": "Type",

 "name": "SF Restaurant",

 "restriction": {

     "@type": "DatatypeRestriction" {

       "sparql": "SELECT ?r WHERE {?r <http://schema.org/address> [<
http://schema.org/addressLocality> 'SF']}"

     }

   }

}
</script>

[6]



http://schema.org/DataTypeRestriction <http://schema.org/ResourceShape>


Property

Type

describes

Class

property

Property


http://schema.org/DataPropertyRestriction <http://schema.org/ResourceShape>

Property

Type

domainIncludes

Class

rangeIncludes

Class

valueShape

ResourceShape

allowedValue

DataType, Thing

defaultValue

maxSize

int

occurs

Exactly-One, Zero-or-One, Zero-or-Many, One-or-Many

readOnly



I made an example of using flavored markdown, where i converted one of
> the pdf documents shared on this list:
> https://github.com/rvguha/schemaorg/issues/125
>
> You could create dedicated github repository for actions and keep fine
> tuning conversation in dedicated issues while circulating major design
> choices with this list. Examples worth looking at:
>
> * https://github.com/converspace/webmention/blob/master/README.md
> * https://github.com/jasnell/w3c-socialwg-activitystreams/issues (i also
> work on automating tests of examples included in this spec)
>
> This way we also can use git to make tags and have clear history of
> changes with commit messages.
>
> Sorry for side tracking but I really think workflow which automates
> saving clear history of development process can help everyone interested
> understand better all the rationale behind various design choices!
>

Received on Friday, 7 November 2014 23:34:56 UTC