Implicit and conditional statements

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?

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 11:25:05 UTC