Re: Intent to close ISSUE-221

On Mar 11, 2013, at 4:34 PM, Markus Lanthaler <markus.lanthaler@gmx.net> wrote:

> On Monday, March 11, 2013 10:32 PM, Andy Seaborne wrote:
> 
>> What's the coverage of the toRdf/fromRdf tests?
>> 
>> (comment triggered by the fact I don't see a change to reflect @reverse
>> yet - the input files for all toRdf and fromRdf appear to be 11 months
>> old)
> 
> I think the coverage of RDF conversion is quite good (based on my code
> coverage) but Gregg and Dave Longley will know more as they have written
> most tests.

fromRDF is unaffected by most of the formatting changes we've made, as it writes to expanded form.

toRDF depends on flattening, so it also deals with a quite normalized form of JSON-LD, so it is also not affected by most of the work that's been centered around annotation formats and term selection. I think we're in pretty good shape with both these sets of tests.

Gregg

> RDF conversion is trivial as it is based on flattened JSON-LD. So e.g.,
> @reverse doesn't have any effect on because it doesn't appear in flattened
> JSON-LD.
> 
> For example:
> 
> {
>  "@context": {
>    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
>    "defines": { "@reverse": "rdfs:definedBy" },
>    "label": "rdfs:label"
>  },
>  "@id": "http://example.com/vocab",
>  "label": "My vocabulary",
>  "defines": [
>    {
>      "@id": "http://example.com/vocab#property",
>      "label": "A property"
>    }
>  ]
> }
> 
> Is expanded & flattened to
> 
> [
>  {
>    "@id": "http://example.com/vocab",
>    "http://www.w3.org/2000/01/rdf-schema#label": [
>      { "@value": "My vocabulary" }
>    ]
>  },
>  {
>    "@id": "http://example.com/vocab#property",
>    "http://www.w3.org/2000/01/rdf-schema#definedBy": [
>      { "@id": "http://example.com/vocab" }
>    ],
>    "http://www.w3.org/2000/01/rdf-schema#label": [
>      { "@value": "A property" }
>    ]
>  }
> ]
> 
> Which results in the following triples:
> 
> <http://example.com/vocab>
>  <http://www.w3.org/2000/01/rdf-schema#label> "My vocabulary" .
> <http://example.com/vocab#property>
>  <http://www.w3.org/2000/01/rdf-schema#definedBy>
>    <http://example.com/vocab> .
> <http://example.com/vocab#property>
>  <http://www.w3.org/2000/01/rdf-schema#label> "A property" .
> 
> 
> I've just added this test to the test suite [1].
> 
> 
> Cheers,
> Markus
> 
> 
> [1]
> https://github.com/json-ld/json-ld.org/commit/22531ccea3aa8adc36162c4721cf57
> 906a7f82c2
> 
> 
> 
> --
> Markus Lanthaler
> @markuslanthaler
> 
> 

Received on Tuesday, 12 March 2013 00:32:40 UTC