Skip to content

Commit

Permalink
Merge pull request #92 from YassirSellami/master
Browse files Browse the repository at this point in the history
feat(formal-semantics): add example links to example 13
  • Loading branch information
vroddon authored Dec 19, 2024
2 parents a00e5a2 + 988769a commit 9e5bd5a
Show file tree
Hide file tree
Showing 9 changed files with 163 additions and 9 deletions.
32 changes: 32 additions & 0 deletions formal-semantics/examples/output13-1-advanced.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"@context": {
"odrl": "http://www.w3.org/ns/odrl.jsonld",
"ex": "http://example.org/",
"report": "http://example.com/report/temp/",
"dct": "http://purl.org/dc/terms/",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"@id": "http://example.com/policy-report/13",
"@type": "report:ComplianceReport",
"dct:created": {
"@value": "2024-12-19T15:00:00.999Z",
"@type": "xsd:dateTime"
},
"report:policy": "http://example.com/policy/13",
"report:policyRequest": "http://example.com/policy/request/13",
"ex:permissionReport1": {
"@id": "http://example.com/policy-report/13/permission/1",
"@type": "report:ruleReport",
"report:rule": "http://example.com/document/1234",
"report:ruleRequest": "http://example.com/policy/request/13/rule/1",
"report:activationState": "report:Active",
"report:attemptState": "report:Attempted",
"report:performanceState": "report:Unknown",
"report:deonticState": "report:NonSet"
},
"ex:constraintReport1": {
"@type": "report:ConstraintReport",
"@id": "http://example.com/policy-report/13/constraint/1",
"report:satisfactionState": "report:Satisfied"
}
}
24 changes: 24 additions & 0 deletions formal-semantics/examples/output13-1-basic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"@context": {
"odrl": "http://www.w3.org/ns/odrl.jsonld",
"ex": "http://example.org/",
"report": "http://example.com/report/temp/",
"dct": "http://purl.org/dc/terms/",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"@id": "http://example.com/policy-report/13",
"@type": "report:ComplianceReport",
"dct:created": {
"@value": "2024-12-19T15:00:00.999Z",
"@type": "xsd:dateTime"
},
"report:policy": "http://example.com/policy/13",
"report:policyRequest": "http://example.com/policy/request/13",
"ex:permissionReport1": {
"@id": "http://example.com/policy-report/13/permission/1",
"@type": "report:ruleReport",
"report:rule": "http://example.com/document/1234",
"report:ruleRequest": "http://example.com/policy/request/13/rule/1",
"report:activationState": "report:Active"
}
}
32 changes: 32 additions & 0 deletions formal-semantics/examples/output13-2-advanced.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"@context": {
"odrl": "http://www.w3.org/ns/odrl.jsonld",
"ex": "http://example.org/",
"report": "http://example.com/report/temp/",
"dct": "http://purl.org/dc/terms/",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"@id": "http://example.com/policy-report/13",
"@type": "report:ComplianceReport",
"dct:created": {
"@value": "2024-12-19T15:00:00.999Z",
"@type": "xsd:dateTime"
},
"report:policy": "http://example.com/policy/13",
"report:policyRequest": "http://example.com/policy/request/13",
"ex:permissionReport1": {
"@id": "http://example.com/policy-report/13/permission/1",
"@type": "report:ruleReport",
"report:rule": "http://example.com/document/1234",
"report:ruleRequest": "http://example.com/policy/request/13/rule/1",
"report:activationState": "report:Inactive",
"report:attemptState": "report:Attempted",
"report:performanceState": "report:Unknown",
"report:deonticState": "report:NonSet"
},
"ex:constraintReport1": {
"@type": "report:ConstraintReport",
"@id": "http://example.com/policy-report/13/constraint/1",
"report:satisfactionState": "report:NotSatisfied"
}
}
24 changes: 24 additions & 0 deletions formal-semantics/examples/output13-2-basic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"@context": {
"odrl": "http://www.w3.org/ns/odrl.jsonld",
"ex": "http://example.org/",
"report": "http://example.com/report/temp/",
"dct": "http://purl.org/dc/terms/",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"@id": "http://example.com/policy-report/13",
"@type": "report:ComplianceReport",
"dct:created": {
"@value": "2024-12-19T15:00:00.999Z",
"@type": "xsd:dateTime"
},
"report:policy": "http://example.com/policy/13",
"report:policyRequest": "http://example.com/policy/request/13",
"ex:permissionReport1": {
"@id": "http://example.com/policy-report/13/permission/1",
"@type": "report:ruleReport",
"report:rule": "http://example.com/document/1234",
"report:ruleRequest": "http://example.com/policy/request/13/rule/1",
"report:activationState": "report:Inactive"
}
}
16 changes: 16 additions & 0 deletions formal-semantics/examples/policy13.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"@context": "http://www.w3.org/ns/odrl.jsonld",
"@type": "Set",
"uid": "http://example.com/policy/13",
"permission": [{
"target": "http://example.com/document/1234",
"assigner": "http://example.com/party/16",
"action": "distribute",
"constraint": [{
"@id": "http://example.com/constraint/1",
"leftOperand": "dateTime",
"operator": "lt",
"rightOperand": { "@value": "2018-01-01", "@type": "xsd:date" }
}]
}]
}
11 changes: 11 additions & 0 deletions formal-semantics/examples/request13-1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"@context": "http://www.w3.org/ns/odrl.jsonld",
"@type": "Request",
"uid": "http://example.com/policy/request/13",
"permission": [{
"target": "http://example.com/policy/request/13/rule/1",
"assignee": "http://example.com/party/1",
"assigner": "http://example.com/party/16",
"action": "distribute"
}]
}
8 changes: 8 additions & 0 deletions formal-semantics/examples/world13-1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@context": {
"ex": "http://www.example.org/ns",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"@id": "http://example.com/state/13/1",
"xsd:dateTime": "2019-12-19T15:00:00.999Z"
}
8 changes: 8 additions & 0 deletions formal-semantics/examples/world13-2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@context": {
"ex": "http://www.example.org/ns",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"@id": "http://example.com/state/13/1",
"xsd:dateTime": "2017-12-19T15:00:00.999Z"
}
17 changes: 8 additions & 9 deletions formal-semantics/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -355,25 +355,25 @@ <h4>Example of a constrained permission</h4>
</tr>
<tr>
<td>E13-1</td>
<td>policy:13 (<a href="policy13.json">link</a>)</td>
<td>We are in 2017 <br> <code>current time.year=2017</code><br>(<a href="world13-1.json">link</a>) </td>
<td>policy:13 (<a href="examples/policy13.json">link</a>)</td>
<td>We are in 2017 <br> <code>current time.year=2017</code><br>(<a href="examples/world13-1.json">link</a>) </td>
<td><code>distribute</code>
<code>document:1234</code><br><a href="request13-1.json">link</a></td>
<code>document:1234</code><br><a href="examples/request13-1.json">link</a></td>
<td>satisfied</td>
<td>active</td>
<td>permit the requested action</td>
<td>(<a href="output13-1-basic.json">link 1</a>)<br>(<a href="output13-1-advanced.json">link 2</a>)</td>
<td>(<a href="examples/output13-1-basic.json">link 1</a>)<br>(<a href="examples/output13-1-advanced.json">link 2</a>)</td>
</tr>
<tr>
<td>E13-2</td>
<td>policy:13</td>
<td>We are in 2019 <br> <code>current time.year=2019</code></td>
<td>policy:13 (<a href="examples/policy13.json">link</a>)</td>
<td>We are in 2019 <br> <code>current time.year=2019</code><br>(<a href="examples/world13-1.json">link</a>)</td>
<td><code>distribute</code><br>
<code>document:1234</code></td>
<code>document:1234</code><br><a href="examples/request13-1.json">link</a></td>
<td>not-satisfied</td>
<td>inactive</td>
<td>deny the requested action</td>
<td>(<a href="output13-2-basic.json">link 1</a>)<br>(<a href="output13-2-advanced.json">link 2</a>)</td>
<td>(<a href="examples/output13-2-basic.json">link 1</a>)<br>(<a href="examples/output13-2-advanced.json">link 2</a>)</td>
</tr>
</table>

Expand Down Expand Up @@ -1282,4 +1282,3 @@ <h3>Planning</h3>

</body>
</html>

0 comments on commit 9e5bd5a

Please sign in to comment.