RE: poe-ACTION-48: Create json-ld version of each turtle test case

Hi Victor,
the JSON-LD people have replied: our problem of "undefined" uids comes from an error in the ODRL context resource, see https://github.com/w3c/poe/issues/277

That the JSON-LD Playground does not replace uids by "undefined" comes from using an old jsonld library there ... = don't trust online systems.

Best,
Michael

-----Original Message-----
From: Michael Steidl (IPTC) [mailto:mdirector@iptc.org] 
Sent: Friday, October 6, 2017 10:01 AM
To: 'Víctor Rodríguez Doncel' <vrodriguez@fi.upm.es>; public-poe-wg@w3.org
Subject: RE: poe-ACTION-48: Create json-ld version of each turtle test case

Quick follow up: the JSON-LD people behind the jsonld.js module with check that issue.

Best,
Michael

-----Original Message-----
From: Michael Steidl (IPTC) [mailto:mdirector@iptc.org]
Sent: Thursday, October 5, 2017 9:28 PM
To: 'Víctor Rodríguez Doncel' <vrodriguez@fi.upm.es>; public-poe-wg@w3.org
Subject: RE: poe-ACTION-48: Create json-ld version of each turtle test case

Hi Victor,
this attempt didn't work very well.

I've created a super-simple Node.js project https://github.com/nitmws/rdf-jsonld-transformation-test1
(it uses the jsonld node module at https://github.com/digitalbazaar/jsonld.js)
... and the files of interest are in https://github.com/nitmws/rdf-jsonld-transformation-test1/tree/master/testdata
- sample069x.ttl = a copy of the Turtle from your Validator page
- sample069x=nquads.txt = the same as nquads
- sample069x.json = the Turtle/NQuads transformed to an expandes JSON-LD. That looks quite nice - but is verbose.
- sample069x=compact.json = the compacted version of the JSON-LD, as done by the jsonld modue. BUT: the "uid" properties are named "undefined" there.

Did I something wrong? Ok, let's check that at the JSON-LD Playground: used the same files (the ODRL context is saved in the root folder of my project) and threw them into the Playground: the compacted JSON-LD has "uid" and not "undefined" properties, great: 
See https://json-ld.org/playground/#startTab=tab-compacted&json-ld=https%3A%2F%2Fraw.githubusercontent.com%2Fnitmws%2Frdf-jsonld-transformation-test1%2Fmaster%2Ftestdata%2Fsample069x.json&context=https%3A%2F%2Fraw.githubusercontent.com%2Fnitmws%2Frdf-jsonld-transformation-test1%2Fmaster%2Ftestdata%2Fsample069x%253Dcompact.json

Ok, I opened a Github issue in the jsonld.js repository: https://github.com/digitalbazaar/jsonld.js/issues/201

Let's see what happens.

But: does the use of use blank nodes look ok for you in https://github.com/nitmws/rdf-jsonld-transformation-test1/blob/master/testdata/sample069x%3Dcompact.json ? (Ignore the "default"s)

Best,
Michael

-----Original Message-----
From: Víctor Rodríguez Doncel [mailto:vrodriguez@fi.upm.es]
Sent: Thursday, October 5, 2017 6:33 PM
To: Michael Steidl (IPTC) <mdirector@iptc.org>; public-poe-wg@w3.org
Subject: Re: poe-ACTION-48: Create json-ld version of each turtle test case

Hi Michael,

Thanks for your review.
I wait for your feedback on the reverse transformation you make.

I think the jsonld-java code is also from the Manu Spornu from DigitalBazaar.

Regards,
Víctor

El 05/10/2017 a las 18:27, Michael Steidl (IPTC) escribió:
> Victor,
> ok, I see all example Policies on the Validator page have an identifier which can be used on the odrlapi.appspot.com site.
> It would help to provide an explanation for that on the Validator page.
>
> Going randomly across the examples I noticed that some JSON-LD samples like 066 return an error:
> <html><head>
> <meta http-equiv="content-type" content="text/html;charset=utf-8">
> <title>404 Could not find resource for relative : 
> /samples/sample066.json of full path: 
> http://odrlapi.appspot.com/samples/sample066.json</title>
> </head>
> <body text=#000000 bgcolor=#ffffff>
> <h1>Error: Could not find resource for relative : 
> /samples/sample066.json of full path: 
> http://odrlapi.appspot.com/samples/sample066.json</h1>
> </body></html>
>
> Comes that from your work on the libraries?
>
> Then I had a look at shown JSON-LDs: sample054 or sample015 and noticed it has  blank-node ids for e.g. a refinement - but no object with this id.
> Also a result from your work on the libraries?
>
> In my ODRL implementation I have only transformed from JSON-LD to 
> Turtle or Triples but I will setup a test scenario for the other 
> direction - results, I hope, tomorrow morning. (I'm using the jsonld 
> Javascript library from the JSON-LD guys a the Digital Bazaar -
> https://github.com/digitalbazaar/jsonld.js)
>
>
> Best,
> Michael
>
>
> -----Original Message-----
> From: Víctor Rodríguez Doncel [mailto:vrodriguez@fi.upm.es]
> Sent: Thursday, October 5, 2017 2:59 PM
> To: public-poe-wg@w3.org
> Subject: Re: poe-ACTION-48: Create json-ld version of each turtle test 
> case
>
> Michael,
>
> I have updated http://odrlapi.appspot.com/ so that JSON examples can be automatically loaded.
> Examples have an URI like
> http://odrlapi.appspot.com/samples/sample005.json
>
> But for the last few hours I have been facing an important problem 
> with
> blanknodes:
> Neither the online converters nor the libraries I have tried (like
> jsonld-java) are able to collapse the blank nodes, resulting in equivalent but uglier examples. So the current examples are correct but ugly (with explicit ids for the blank nodes).
>
> Any clue?
>
> Regards,
> Víctor
>
> El 05/10/2017 a las 13:10, Michael Steidl (IPTC) escribió:
>> Victor,
>> thanks for this action. Do they have individual URLs like the one below? If yes: could you please add them to the Validation page to make them easily accessible to implementers.
>>
>> Thanks,
>> Michael
>>
>> -----Original Message-----
>> From: vrodriguez@fi.upm.es [mailto:vrodriguez@fi.upm.es]
>> Sent: Thursday, October 5, 2017 11:05 AM
>> To: Permissions and Obligations Expression Working Group 
>> <public-poe-wg@w3.org>
>> Subject: Re: poe-ACTION-48: Create json-ld version of each turtle 
>> test case
>>
>>
>> Permissions and Obligations Expression Working Group Issue Tracker <sysbot+tracker@w3.org> escribió:
>>
>>> poe-ACTION-48: Create json-ld version of each turtle test case
>>>
>>> https://www.w3.org/2016/poe/track/actions/48
>>>
>>> Assigned to: Víctor Rodríguez-Doncel
>> An automated transformation has been published for each of the samples in the Validator.
>>
>> They are accessible online, for example:
>>
>> http://odrlapi.appspot.com/samples/sample005.json
>>
>> (with ID up to 075). Please not that invalid samples have not been transformed.
>>
>> If no other transformations have to be made, this ACTION-48 can be closed.
>>
>> Regards,
>> Víctor
>>
>>
>>
>>
>>
>
> --
> Víctor Rodríguez-Doncel
> D3205 - Ontology Engineering Group (OEG) Departamento de Inteligencia 
> Artificial ETS de Ingenieros Informáticos Universidad Politécnica de 
> Madrid
>
> Campus de Montegancedo s/n
> Boadilla del Monte-28660 Madrid, Spain Tel. (+34) 91336 3753
> Skype: vroddon3
>
>
>
>


--
Víctor Rodríguez-Doncel
D3205 - Ontology Engineering Group (OEG) Departamento de Inteligencia Artificial ETS de Ingenieros Informáticos Universidad Politécnica de Madrid

Campus de Montegancedo s/n
Boadilla del Monte-28660 Madrid, Spain
Tel. (+34) 91336 3753
Skype: vroddon3

Received on Friday, 6 October 2017 18:57:36 UTC