Re: Implicit and conditional statements

> On Feb 15, 2017, at 3:24 AM, Jakob Voß <Jakob.Voss@gbv.de> wrote:
> 
> Hi,
> 
> I am trying to map an existing JSON format [1] to JSON-LD and stumbled upon two issues that cannot be expressed in JSON-LD. Before giving up
> on this, I'd like to know your opinion.
> 
> 
> First, a JSON object contains two fields "document" and "organization" that are connected by an RDF properties. This minimal example:
> 
> {
>  "@context": { "id": "@id" },
>  "document": { "id": "a:document" },
>  "organization": { "id": "an:organization" }
> }
> 
> Should result in at least one of these RDF statements:
> 
> <a:document> holding:collectedBy <an:organization> .
> <an:organization> holding:collects <a:document> .
> 
> 
> Second, another JSON field "item" changes meaning depending on another field. The first example is easy to map from JSON-LD to an RDF statement:
> 
> {
>  "id": "a:document",
>  "item": { "id": "an:item" }
> }
> 
> <a:document> holding:examplar <an:item> .
> 
> 
> But if an additional subfield "part" is given, the property changes into
> 
> {
>  "id": "a:document",
>  "item": { "id": "an:item", "part": "narrower" }
> }
> 
> <a:document> holding:narrowerExamplar <an:item> .
> 
> or into
> 
> {
>  "id": "a:document",
>  "item": { "id": "an:item", "part": "broader" }
> }
> 
> <a:document> holding:broaderExamplar <an:item> .
> 
> 
> Could these cases be handled in JSON-LD 1.1?

The mechanisms JSON-LD 1.1 provides that might be useful are scoped contexts. You can scope either by a property (e.g., “Item”) or a type. To provide a different interpretation of “item” would require that the “@type” for “a:document” provide a context that defines a different interpretation of “item”. Otherwise, there is no reasonable hook to try to differentiate between uses.

Gregg

> For the first issue (which might be more common in other people's data) I have not found a workaround yet.
> 
> A workaround for the second issue with some oss of semantic could be to ignore the additional field "part" and use a more fuzzy super-property of holding:examplar, holding:narrowerExamplar, and holding:broaderExamplar.
> 
> 
> Thanks!
> Jakob
> 
> 
> [1] If curious see http://gbv.github.io/daia/ and my current draft
> of a context document at https://github.com/gbv/daia/issues/34
> 
> -- 
> Jakob Voß <jakob.voss@gbv.de>
> Verbundzentrale des GBV (VZG) / Common Library Network
> Platz der Goettinger Sieben 1, 37073 Göttingen, Germany
> +49 (0)551 39-10242, http://www.gbv.de/
> 

Received on Wednesday, 15 February 2017 19:58:57 UTC