- From: simon via GitHub <sysbot+gh@w3.org>
- Date: Fri, 31 Mar 2017 09:40:15 +0000
- To: public-poe-archives@w3.org
> b) I dont see how to define the policytypes as defined classes... Any example? Something like that? (you can use http://shacl.org/playground/ to try it out)-> **Shapes Graph:** ```Turtle @prefix dash: <http://datashapes.org/dash#> . @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 sh: <http://www.w3.org/ns/shacl#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix odrl: <http://www.w3.org/ns/odrl/2/> . @prefix ex: <http://example.org/ns#> . ex:AgreementPolicyShape a sh:NodeShape ; sh:targetClass odrl:Agreement ; sh:or ( [ sh:path odrl:permission ; sh:minCount 1 ; ] [ sh:path odrl:prohibition ; sh:minCount 1 ; ] ) ; sh:property [ sh:path odrl:permission ; sh:node ex:MinAssigneeShape ; sh:node ex:MinAssignerShape ; ] ; sh:property [ sh:path odrl:prohibition ; sh:node ex:MinAssigneeShape ; sh:node ex:MinAssignerShape ; ] . ex:MinAssigneeShape a sh:NodeShape ; sh:property [ sh:path odrl:assignee ; sh:class odrl:Assignee ; sh:minCount 1 ; ] . ex:MinAssignerShape a sh:NodeShape ; sh:property [ sh:path odrl:assigner ; sh:class odrl:Assigner ; sh:minCount 1 ; ] . ``` **Data Graph:** ```Turtle @prefix ex: <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 odrl: <http://www.w3.org/ns/odrl/2/> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . <http://example.com/OkPolicy> a odrl:Agreement ; odrl:permission [ a odrl:Permission ; odrl:target <http://example.com/music:4545> ; odrl:assigner <http://example.com/sony:10> ; odrl:assignee <http://example.com/billie:888> ; odrl:action odrl:play ; ] ; odrl:permission [ odrl:target <http://example.com/music:4545> ; odrl:assigner <http://example.com/sony:10> ; odrl:assignee <http://example.com/billie:888> ; odrl:action odrl:copy ; ] . <http://example.com/BadPolicy> a odrl:Agreement ; odrl:permission [ a odrl:Permission ; odrl:target <http://example.com/music:4545> ; odrl:assigner <http://example.com/sony:10> ; odrl:action odrl:play ; ] . <http://example.com/sony:10> a odrl:Assigner. <http://example.com/billie:888> a odrl:Assignee. ``` -- GitHub Notification of comment by simonstey Please view or discuss this issue at https://github.com/w3c/poe/issues/26#issuecomment-290667475 using your GitHub account
Received on Friday, 31 March 2017 09:40:22 UTC