Re: edge attributes in JSON-LD

At Schema.org we can't really claim Role has worked out well. I wouldn't
advocate it for this.

It would be very interesting if a syntax could be found in JSON-LD 1.1,
alongwith an optional named graphs view of the data. This would help close
the gap wth Property Graphs too.

Dan

On Sat, 31 Mar 2018, 00:06 karlg, <karl.geog@gmail.com> wrote:

> Sub-classing schema.org Role, e.g. with SettingRole seems promising,
> thanks
>
>
>
> kg
>
>
>
> {
>
>   "@context": "http://linkedpasts.org/lp-context.jsonld",
>
>   "@type": "Place",
>
>   "name": "Abingdon",
>
>   “properties”: {“p1”: “___”, ...}
>
>   "setting": [
>
>     {
>
>       "@type": "SettingRole",
>
>       "setting": {
>
>         "@type": "Place",
>
>         "name": "Berkshire"
>
>       },
>
>       "startDate": "1600",
>
>       "endYear": "1974"
>
>     },
>
>     {
>
>       "@type": "SettingRole",
>
>       "setting": {
>
>         "@type": "Place",
>
>         "name": "Oxfordshire"
>
>       },
>
>       "startDate": "1974",
>
>       "endYear": "2018"
>
>     }
>
>   ]
>
> }
>
>
>
> On 3/30/18, 4:36 PM, "Gregg Kellogg" <gregg@greggkellogg.net> wrote:
>
>
>
> On Mar 30, 2018, at 3:09 PM, Karl Grossner <karl.geog@gmail.com> wrote:
>
>
>
> Reopening this thread, as my current challenge relates closely:
>
> I'm modeling historical Place attestations for gazetteer applications, and
> a potential linked.places JSON-LD modeling standard (a la linked.art). The
> idea is to build upon GeoJSON-LD.
>
> Several attributes of Places are temporally indexed; i.e. may have a
> 'valid period', but are not amenable to event models in the same way as
> linked.art provenance is.
>
>
>
> From what I can tell, three options are @graph, n-ary relations, and
> rdf:Statement reification. I've rendered some sample records below. My
> question is whether there has emerged a best practice for this general
> problem of edge attributes. Any comments welcome at this stage. I have been
> having a conversation with @gklyne on this, here, which may (?) shed
> further light. https://github.com/LinkedPasts/lp-network/issues/1
>
>
>
> While we could probably add something to perform reification on expansion,
> or transformation to RDF, it’s not clear how that would allow you to make
> statements about the statement, and it’s widely considered an archaic
> mechanism. And, it would substantially complicate the already complex API
> algorithms.
>
>
>
> The issue of edge attributes in JSON-LD is really no different than for
> RDF in general. While there is no syntax for automatic reification of
> statements, they can of course be represented in JSON-LD.
>
>
>
> The RDF 1.1 position is more likely that named graphs can be used for this
> purpose, although there are no built-in semantics. (Basically, put the
> statement in a named graph, and then make other meta-statements with the
> graph name as a subject). Your approach 01 is essentially this.
>
>
>
> Schema.org takes another approach using the Role class (and sub-classes)
> [1], and this can be used in JSON-LD to describe information about
> relationships. This is what I’ve used in some of my own projects.
>
>
>
> Gregg
>
>
>
> [1] http://schema.org/Role
>
>
>
>
>
> thanks
>
> --------
>
> approach 01 (@graph; playground <https://tinyurl.com/y74p3pov> )
>
> {
>   "@context": "http://linkedpasts.org/assets/place-v4-context.jsonld",
>   "related": [
>     { "@id": "http://linkedpasts.org/graphs/01",
>       "@graph": {"@id":"myplace:Abingdon","part_of":"myplace:Berkshire"},
>       "when": {
>         "timespans":
>             {
>                       "earliestYear": "1600",
>                       "latestYear": "1974",
>                       "label": "from 17c. to 1974"
>                     }
>       }
>     },
>     { "@id": "http://linkedpasts.org/graphs/02",
>       "@graph": {"@id":"myplace:Abingdon",
> "part_of":"myplace:Oxfordshire"},
>       "when": {
>         "timespans":
>             {
>                       "earliestYear": "1974",
>                       "latestYear": "2018",
>                       "label": "from 1974"
>                     }
>       }
>     },
>     { "@id": "http://linkedpasts.org/graphs/03",
>       "@graph": {"@id":"myplace:Oxford", "part_of":"myplace:Oxfordshire"},
>       "when": {
>           "timespans":
>             {
>                       "earliestYear": "1000",
>                       "latestYear": "2018",
>                       "label": "from 11c."
>                     }
>             }
>     }
>   ]
> }
>
> approach 02 (per property graph example given in this thread)
>
> [
>     {"@id": "", "@type": "rdf:BoundDataset"},
>     {"@id": "p1", "name": "Abingdon", "type": "settlement",
> "_:parent_p1p3":"p3", "_:parent_p1p4":"p4"},
>     {"@id": "p2", "name": "Oxford", "type": "settlement", "_:parent_p2p4":
> "p4"},
>     {"@id": "p3", "name": "Berkshire", "type": "county"},
>     {"@id": "p4", "name": "Oxfordshire", "type": "county"},
>     {    "@id": "_:parent_p1p3",
>         "rdfs:subPropertyOf": "hasParent",
>         "earliestYear": 1600,
>         "latestYear": 1974,
>         "label": "from 17c. until 1974"},
>     {    "@id": "_:parent_p1p4",
>         "rdfs:subPropertyOf": "hasPparent",
>         "earliestYear": 1974,
>         "latestYear": 2018,
>         "label": "from 1974"},
>     {    "@id": "_:parent_p2p4",
>         "rdfs:subPropertyOf": "hasParent",
>         "earliestYear": 1000,
>         "latestYear": 2018,
>         "label": "from 11c."}
> ]
>
>
> ----
>
> Karl Grossner
>
> Technical Director,
> World-Historical Gazetteer project for the
>
> University of Pittsburgh World History Center
>
> @kgeographer
>
> Denver, CO
>
>
>
>

Received on Friday, 30 March 2018 23:17:51 UTC