Re: Test suite skeleton

> A smart WG will create a validator (somehow). Something for the SPECIAL 
> project?

fwiw, following SHACL shapes check for those conditions:

odrl:PolicyShape
     a sh:NodeShape ;
     sh:targetClass odrl:Policy ;
     sh:nodeKind sh:IRI ;
     sh:property [
		sh:path [
			sh:alternativePath ( odrl:permission odrl:prohibition )
		] ;
		sh:minCount 1 ;
	] .

odrl:PolicyTypeShape
	a sh:NodeShape ;
	sh:targetSubjectsOf odrl:permission ;
	sh:class odrl:Policy .

odrl:PolicyTypeShape2
	a sh:NodeShape ;
	sh:targetSubjectsOf odrl:prohibition ;
	sh:class odrl:Policy .


you can test them here http://shacl.org/playground/ using following data 
graph:

@prefix odrl: <http://example.org/ns#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <http://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

odrl:Set rdfs:subClassOf odrl:Policy .


[] a odrl:Set;
	odrl:permission [
		a odrl:Permission ;
		odrl:target <http://example.com/asset:9898> ;
		odrl:action odrl:reproduce
	] ;
	odrl:prohibition [
		a odrl:Prohibition ;
		odrl:target <http://example.com/asset:9898> ;
		odrl:action odrl:modify
	] .

<http://example.com/policy:0099>
	odrl:permission [
		a odrl:Permission ;
		odrl:target <http://example.com/asset:9898> ;
		odrl:action odrl:reproduce
	] ;
	odrl:prohibition [
		a odrl:Prohibition ;
		odrl:target <http://example.com/asset:9898> ;
		odrl:action odrl:modify
	] .

<http://example.com/policy:00992>
	a odrl:Set .

<http://example.com/policy:valid>
	a odrl:Set;
	odrl:permission [
		a odrl:Permission ;
		odrl:target <http://example.com/asset:9898> ;
		odrl:action odrl:reproduce
	] ;
	odrl:prohibition [
		a odrl:Prohibition ;
		odrl:target <http://example.com/asset:9898> ;
		odrl:action odrl:modify
	] .

br simon

---
DDipl.-Ing. Simon Steyskal
Institute for Information Business, WU Vienna

www: http://www.steyskal.info/  twitter: @simonsteys

Am 2017-05-08 16:35, schrieb Phil Archer:
> Dear all,
> 
> I just failed to have this ready for today's call but it exists now
> and I'll extend it before next week's F2F.
> 
> As we have discussed several times, I believe we need a test suite.
> Next week's first agenda item will be to discuss the concept of an
> ODRL Process - what does it mean etc. These are all tied together of
> course.
> 
> All I've done so far is to take the first normative statement from the
> model doc and created a mini test suite for it, which in fact is
> copied from the old example 1. The current text in the model says:
> 
> A Policy MUST have the following properties:
> 
> The uid identification of the Policy.
> The type indicating the specific type of Policy.
> A permission and/or prohibition Rule.
> 
> So I copied example 1 as a valid example and then deliberately 'broke
> it' to create three invalid instances.
> 
> The idea is that you build an ODRL Processor (whatever we decide that
> means) and you can test that it accepts the first example and raises
> an error with the other 3. For valid examples, I'm suggesting that we
> include an 'interpretation' line, i.e. this is what this policy means.
> 
> Some points:
> - this is just an example;
> - it will need to change if we formally resolve that odrl:Set is the 
> default;
> - the external files will need to be created and served via conneg.
> 
> This is what I meant on today's call about the complexity of the test
> suite etc. increasing with every rule we introduce.
> 
> A smart WG will create a validator (somehow). Something for the SPECIAL 
> project?
> 
> Phil

Received on Tuesday, 9 May 2017 07:05:38 UTC