- From: Gregg Kellogg <gregg@greggkellogg.net>
- Date: Tue, 7 Mar 2017 08:15:25 -0800
- To: Robert Sanderson <azaroth42@gmail.com>
- Cc: Linked JSON <public-linked-json@w3.org>
- Message-Id: <71B0B509-31C2-440B-817B-EE19D7665493@greggkellogg.net>
> On Mar 6, 2017, at 5:56 PM, Robert Sanderson <azaroth42@gmail.com> wrote: > > Fantastic, thank you Gregg! > > And yes, I forgot the mapping to crm:E22_Man-Made_Object. (Note the horrible `-` character :( ) but yes that is the expected output given the missing mapping :) > > Other than your ruby implementation, are there any others yet? Once work is completed on the update, I’m hopeful that other implementations will come along. There also has been some interest in using this as the basis for a fast-track WG to push it to REC, which may be discussed at TPAC. Changes are actually pretty localized, at least in my implementation, so updates should be straightforward. Gregg > Thanks again, > > Rob > > > > On Mon, Mar 6, 2017 at 5:42 PM, Gregg Kellogg <gregg@greggkellogg.net <mailto:gregg@greggkellogg.net>> wrote: >> On Mar 6, 2017, at 5:02 PM, Robert Sanderson <azaroth42@gmail.com <mailto:azaroth42@gmail.com>> wrote: >> >> >> Another scoping question ... is it possible to use scoped contexts for URI expansion within specific relationships? >> >> For example, if I have an external classification system (say http://vocab.gett.edu/aat/ <http://vocab.gett.edu/aat/>) and a predicate that refers to it (crm:P2_has_type) which I map to `classified_as`, would an embedded/scoped context be resolved for the vocabulary terms only when used with that predicate? > > I believe so, but you can try it with the latest version of the Ruby json-ld gem to be sure. > > The way the expansion algorithm reads is in 8.5, if key has a local context (scoped context), to use that to set term context. Later, in 8.8, term context is used to expand the value of the property (“Painting”, in your case). > >> For example, in the below, I would want Painting to resolve to aat:300033618 only when used with `classified_as`: >> >> ``` >> { >> "@context": { >> "id": "@id", >> "type": "@type", >> "classified_as": { >> "@id": "crm:P2_has_type", >> "@type": "@vocab", >> "@context": { >> "aat": "http://vocab.gett.edu/aat/ <http://vocab.gett.edu/aat/>", >> "Painting": "aat:300033618" >> } >> } >> }, >> "id": "http://example.org/object/1 <http://example.org/object/1>", >> "type": "ManMadeObject", >> "classified_as": "Painting" >> } >> ``` > > > I get the following expanded JSON-LD: > > ``` > [ > { > "@id": "http://example.org/object/1 <http://example.org/object/1>", > "@type": [ > "ManMadeObject" > ], > "crm:P2_has_type": [ > { > "@id": "http://vocab.gett.edu/aat/300033618 <http://vocab.gett.edu/aat/300033618>" > } > ] > } > ] > ``` > > Looks like what you want, note that ManMadeObject isn’t expanded, as it’s not defined anywhere. > > Gregg > >> Thoughts? >> >> Rob >> >> -- >> Rob Sanderson >> Semantic Architect >> The Getty Trust >> Los Angeles, CA 90049 > > > > > -- > Rob Sanderson > Semantic Architect > The Getty Trust > Los Angeles, CA 90049
Received on Tuesday, 7 March 2017 16:15:59 UTC