Add an example showing how availability of a Book at a Library is modelled #733

Closed
danbri opened this Issue Aug 12, 2015 · 13 comments

Projects

None yet

3 participants

@dbs
Contributor
dbs commented Aug 12, 2015

I'm (perhaps obviously) happy to take responsibility for this task...

@danbri
Contributor
danbri commented Aug 12, 2015

@dbs :) I've just talked Eric Miller through installing AppEngine on his laptop, but if you can take a lead here that would be great.

AFAIK "seller" is still the best practice for relating the Offer to the Library, rather than say "provider". Nobody has shouted about this being terrible but I'm open to trying to find less $-oriented language if it is proving an obstacle.

Let's work out some ideal examples here in the issue tracker to make sure they're capturing the use cases everyone cares about, rather than getting distracted by redesigning vocab.

@danbri
Contributor
danbri commented Sep 8, 2015

@dbs - did you get a chance to look at this yet?

@dbs
Contributor
dbs commented Sep 8, 2015

@danbri My apologies, this slipped off my radar; I'll pull some examples together tonight.

@danbri
Contributor
danbri commented Sep 8, 2015

Thanks @dbs!

@dbs
Contributor
dbs commented Sep 9, 2015

So let's start with a simplified example of the offer made of a DVD from the Music Resource Centre (MRC), which is part of the Laurentian University system. This is based on https://laurentian.concat.ca/eg/opac/record/2845929:

<https://laurentian.concat.ca/eg/opac/record/2845929#schemarecord> a schema:Movie,
        schema:Product;
    schema:about "Composers > Austria > Biography."@en-ca,
        "Documentary films."@en-ca,
        "Haydn, Joseph, 1732-1809."@en-ca;
    schema:datePublished "[2011]"@en-ca;
    schema:name "In search of Haydn [videorecording] / Phil Grabsky Films.com & Seventh Art Productions in association with Sky Art HD ; filmed, written and directed by Phil Grabsky."@en-ca;
    schema:offers [ a schema:Offer;
            schema:availability schema:InStock;
            schema:availableAtOrFrom "Circulation"@en-ca;
            schema:businessFunction <http://purl.org/goodrelations/v1#LeaseOut>;
            schema:price "0.00"@en-ca;
            schema:seller <https://laurentian.concat.ca/eg/opac/library/MRC>;
            schema:serialNumber "30007008812793"@en-ca;
            schema:sku "ML 410 H4 I5 2011"@en-ca ];
    schema:publisher [ a schema:Organization;
            schema:location "[Brighton, UK] :"@en-ca;
            schema:name "Seventh Art Productions,"@en-ca ] .

<https://laurentian.concat.ca/eg/opac/library/MRC> a schema:Library;
    schema:name "Music Resource Centre"@en-ca .

So we're mapping the shelving location to schema:availableAtOrFrom, the barcode to schema:serialNumber, and the call number to schema:sku. And to answer @danbri , yes, schema:seller is still the best option for us; we had kicked around the idea of an alternate, less commercial term a couple of times, but eventually came to the conclusion that tooling that was already built to expect schema:seller would be unlikely to be revised to support a parallel term.

Note that we include a little inline description of the library (it's name) in case the agents won't follow their nose and retrieve the data at the assigned URL. If they do resolve that, however, there they will find:

[] a schema:Library;
    schema:address _:_b07daa1d-92a5-4285-b2d5-ea1b322729de;
    schema:parentOrganization <https://laurentian.concat.ca/eg/opac/library/LUSYS>;
    schema:email <mailto:dscott@laurentian.ca>;
    schema:location _:_b07daa1d-92a5-4285-b2d5-ea1b322729de;
    schema:name "Music Resource Centre"@en-ca;
    schema:openingHoursSpecification [ a schema:OpeningHoursSpecification;
            schema:closes "17:00:00"@en-ca;
            schema:dayOfWeek <http://purl.org/goodrelations/v1#Tuesday>;
            schema:opens "09:00:00"@en-ca ],
        [ a schema:OpeningHoursSpecification;
            schema:closes "17:00:00"@en-ca;
            schema:dayOfWeek <http://purl.org/goodrelations/v1#Wednesday>;
            schema:opens "09:00:00"@en-ca ],
        [ a schema:OpeningHoursSpecification;
            schema:closes "17:00:00"@en-ca;
            schema:dayOfWeek <http://purl.org/goodrelations/v1#Saturday>;
            schema:opens "09:00:00"@en-ca ],
        [ a schema:OpeningHoursSpecification;
            schema:closes "17:00:00"@en-ca;
            schema:dayOfWeek <http://purl.org/goodrelations/v1#Friday>;
            schema:opens "09:00:00"@en-ca ],
        [ a schema:OpeningHoursSpecification;
            schema:closes "17:00:00"@en-ca;
            schema:dayOfWeek <http://purl.org/goodrelations/v1#Monday>;
            schema:opens "09:00:00"@en-ca ],
        [ a schema:OpeningHoursSpecification;
            schema:closes "17:00:00"@en-ca;
            schema:dayOfWeek <http://purl.org/goodrelations/v1#Sunday>;
            schema:opens "09:00:00"@en-ca ],
        [ a schema:OpeningHoursSpecification;
            schema:closes "17:00:00"@en-ca;
            schema:dayOfWeek <http://purl.org/goodrelations/v1#Thursday>;
            schema:opens "09:00:00"@en-ca ] .

_:_b07daa1d-92a5-4285-b2d5-ea1b322729de a schema:PostalAddress;
    schema:addressCountry "Canada"@en-ca;
    schema:addressLocality "Sudbury"@en-ca;
    schema:addressRegion "ON"@en-ca;
    schema:contactType "Mailing address"@en-ca;
    schema:postalCode "P3E 2C6"@en-ca;
    schema:streetAddress "School of Education - Music Resource Centre Laurentian University"@en-ca .

Well, okay, you would actually get the deprecated schema:branchOf instead of schema:parentOrganization, but you get the idea.

I suppose one could model the same sort of relationships using schema:department instead of schema:parentOrganization if you wanted to reflect that the items were held in a particular section of an insitution (for example, the Children's Annex, or the Media Centre), particularly if they were under the same room. Given that we're technically abusing the range of schema:availableAtOrFrom by giving it text when it expects only schema:Place, modelling locations as departments of the overall organization would make sense, especially if those locations had separate opening hours or contact information. (This is also tickling at memories of discussions held on schema-bibex in the past year and a bit.)

How is that for a start--relatively clear so far?

@danbri
Contributor
danbri commented Sep 11, 2015

Thanks @dbs! Let's try this in JSON-LD next. Whoever gets their first let's keep things in this issue for now...

@dbs
Contributor
dbs commented Sep 11, 2015

So something like:

<script type="application/ld+json" >
[
  {
    "@id": "https://laurentian.concat.ca/eg/opac/library/MRC",
    "@type": "Library",
    "name": "Music Resource Centre"
  },
  {
    "@id": "https://laurentian.concat.ca/eg/opac/record/2845929#schemarecord",
    "@type": [
      "Product",
      "Movie"
    ],
    "about": [
        "Composers > Austria > Biography.",
        "Haydn, Joseph, 1732-1809.",
        "Documentary films."
    ],
    "datePublished": "[2011]",
    "name": "In search of Haydn [videorecording] / Phil Grabsky Films.com & Seventh Art Productions in association with Sky Art HD ; filmed, written and directed by Phil Grabsky.",
    "offers": {
      "@type": "Offer",
      "availability": {
        "@id": "InStock"
      },
      "availableAtOrFrom": "Circulation",
      "businessFunction": {
        "@id": "gr:LeaseOut"
      },
      "price": "0.00",
      "seller": {
        "@id": "https://laurentian.concat.ca/eg/opac/library/MRC"
      },
      "serialNumber":  "30007008812793",
      "sku": "ML 410 H4 I5 2011"
    },
    "publisher": {
      "@type": "Organization",
      "location": "[Brighton, UK] :",
      "name": "Seventh Art Productions,"
    }
  }
]
</script>
@danbri
Contributor
danbri commented Oct 1, 2015

Rather related (and motivated), we now have offeredBy queued up pending review and inclusion in next release - http://sdo-phobos.appspot.com/offeredBy

should we stick this example in too, with s/seller/offeredBy/ ? /cc @RichardWallis

@RichardWallis
Contributor

+1 put it in - replacing seller with offeredBy.

Also the Library example would useful.

@danbri
Contributor
danbri commented Oct 2, 2015

One example still needed converting to JSON-LD from Turtle. I tried it automatically but result is ugly:

https://gist.github.com/danbri/fddf70b010e4c0fb9c95

@danbri
Contributor
danbri commented Oct 2, 2015

Fixed that Turtle to JSON-LD snag, see http://sdo-phobos.appspot.com/Library

@mfhepp mfhepp referenced this issue Oct 2, 2015
Closed

Meta bug for sdo-phobos release (as v2.2) #827

5 of 5 tasks complete
@RichardWallis
Contributor

In Phobos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment