Skip to content

Commit e073bda

Browse files
committed
docs: update documentation
1 parent be95cd4 commit e073bda

File tree

3 files changed

+15
-144
lines changed

3 files changed

+15
-144
lines changed

ODRL-Support.md

Lines changed: 4 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,17 @@ The properties of the permission that are evaluated against a request and the st
1414
- [Constraints](#constraints): the `odrl:constraint`(s) of the permission.
1515
- Note: when there are multiple constraints and no logical constraint is provided, it is assumed that `odrl:and` is expected.
1616

17-
Currently, the evaluator applies multiple steps (see [reason](../ODRL-Evaluator/rules/faulty/README.md)).
18-
Therefore, the activation state of an `odrl:Permission` is calculated as the last step in [`activation-state.n3`](../ODRL-Evaluator/rules/activation-state.n3)
19-
2017
Note that there the permission evaluation does not yet take into account Duty Reports.
2118
That is the (pre-)conditions.
2219

2320
### Prohibition
2421

25-
No support (yet) in the ODRL Evaluator for `odrl:Prohibition` rules.
22+
There is support in the ODRL Evaluator for `odrl:Prohibition` rules.
2623

2724
### Duty
2825

2926
No support (yet) in the ODRL Evaluator for `odrl:Duty` rules.
27+
Reason being that requests to duties do not seem to make sense. Therefore, we assume that working with duties rely them being part of the State of the World.
3028

3129
## Action
3230

@@ -118,89 +116,7 @@ Columns of the table elaborated:
118116

119117
### Exact match and included in support
120118

121-
Support for `skos:ExactMatch` and `odrl:includedIn` is provided through inferences using [simple Notation3 rules](#inferences-to-be-cached) (which are [cached](../ODRL-Evaluator/rules/odrl-voc-inferences.ttl))
122-
They are then supported during the evaluation by rules that also looks at these properties.
123-
The rules for these can be found [here](#inferences-for-the-report)
124-
125-
126-
#### Inferences to be cached
127-
128-
Following rules are executed to add te cached inference to odrl voc.
129-
```n3
130-
# exact match rule
131-
{
132-
?thing skos:exactMatch ?otherThing .
133-
} =>
134-
{
135-
?otherThing skos:exactMatch ?thing .
136-
}.
137-
# exact match rule + inference of includedIN
138-
{
139-
?action skos:exactMatch ?otherAction;
140-
odrl:includedIn ?includedAction .
141-
} =>
142-
{
143-
?otherAction skos:exactMatch ?action ;
144-
odrl:includedIn ?includedAction .
145-
}.
146-
# Transitivity includedIn
147-
{
148-
?actionX odrl:includedIn ?actionY.
149-
?actionY odrl:includedIn ?actionZ .
150-
} => {
151-
?actionX odrl:includedIn ?actionZ .
152-
}.
153-
```
154-
155-
#### Inferences for the report
156-
157-
Notation3 rule for `odrl:includedIn` (note that this requires the ODRL voc and some inferences due to transitivity)
158-
```n3
159-
{
160-
?ruleReport a report:PermissionReport ;
161-
report:rule ?permission ;
162-
report:ruleRequest ?requestPermission .
163-
164-
?permission odrl:action ?x .
165-
166-
?x a odrl:Action;
167-
odrl:includedIn ?action .
168-
169-
?requestPermission odrl:action ?requestedAction .
170-
?action log:equalTo ?requestedAction .
171-
( ?action ) :getUUID ?urnUuid .
172-
}
173-
=>
174-
{
175-
?ruleReport report:premiseReport ?urnUuid .
176-
?urnUuid a report:ActionReport ;
177-
report:satisfactionState report:Satisfied .
178-
} .
179-
```
180-
181-
Notation3 rule for `skos:ExactMatch` (note that this requires the ODRL voc and some inferences due to transitivity)
182-
```n3
183-
{
184-
?ruleReport a report:PermissionReport ;
185-
report:rule ?permission ;
186-
report:ruleRequest ?requestPermission .
187-
188-
?permission odrl:action ?x .
189-
190-
?x a odrl:Action;
191-
skos:exactMatch ?action .
192-
193-
?requestPermission odrl:action ?requestedAction .
194-
?action log:equalTo ?requestedAction .
195-
( ?action ) :getUUID ?urnUuid .
196-
}
197-
=>
198-
{
199-
?ruleReport report:premiseReport ?urnUuid .
200-
?urnUuid a report:ActionReport ;
201-
report:satisfactionState report:Satisfied .
202-
} .
203-
```
119+
Support for `skos:ExactMatch` and `odrl:includedIn` is provided through inferences using simple Notation3 rules
204120

205121
## Asset
206122

@@ -213,33 +129,6 @@ To check for membership in an Asset Collection, the `odrl:partOf` property is us
213129
Example rule of Asset when Asset Collection is present:
214130
Note that the rule is a bit odd. This was also pointed out by [Joshua Corenjo](https://github.com/joshcornejo) in a [github issue](https://github.com/w3c/odrl/issues/64#issue-2572434743).
215131

216-
```n3
217-
{
218-
?ruleReport a report:PermissionReport ;
219-
report:rule ?permission ;
220-
report:ruleRequest ?requestPermission ;
221-
report:premiseReport ?targetReport .
222-
223-
?targetReport a report:TargetReport .
224-
225-
# rule containing asset collection
226-
?permission odrl:target ?iri .
227-
228-
# asset collection in policy rule
229-
?iri a odrl:AssetCollection.
230-
?iri odrl:source ?assetCollection .
231-
232-
# requested asset (resource)
233-
?requestPermission odrl:target ?resourceInCollection .
234-
235-
# from state of the world
236-
?resourceInCollection odrl:partOf ?assetCollection .
237-
}
238-
=>
239-
{
240-
?targetReport report:satisfactionState report:Satisfied .
241-
} .
242-
```
243132

244133
## Party
245134

@@ -251,39 +140,10 @@ When this is not the case, no satisfaction of this constraint can be obtained.
251140

252141
To check for membership in an Party Collection, the `odrl:partOf` property is used as stated in [ODRL IM §2.2.2](https://www.w3.org/TR/odrl-model/#party-partof).
253142

254-
Example rule of Party when Party Collection is present:
255-
256-
```n3
257-
{
258-
?ruleReport a report:PermissionReport ;
259-
report:rule ?permission ;
260-
report:ruleRequest ?requestPermission ;
261-
report:premiseReport ?partyReport .
262-
263-
?partyReport a report:PartyReport .
264-
265-
# rule containing party collection
266-
?permission odrl:assignee ?iri .
267-
268-
# party collection in policy rule
269-
?iri a odrl:PartyCollection.
270-
?iri odrl:source ?partyCollection .
271-
272-
# requested party
273-
?requestPermission odrl:assignee ?requestedParty .
274-
275-
# from state of the world
276-
?requestedParty odrl:partOf ?partyCollection .
277-
}
278-
=>
279-
{
280-
?partyReport report:satisfactionState report:Satisfied .
281-
} .
282-
```
283143

284144
## Constraints
285145

286-
Rules that implement the constraints can be found in [`constraints.n3`](../ODRL-Evaluator/rules/constraints.n3).
146+
Rules that implement the constraints can be found in [`constraints.n3`](../src/rules/constraints.n3).
287147

288148
### Refinements
289149

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ The definition of an ODRL evaluator as defined by the [ODRL Information Model 2.
1212
The [model for a Compliance Report](https://github.com/SolidLabResearch/ODRL-Compliance-Report-Model) is based of the [ODRL Formal Semantics specification](https://w3c.github.io/odrl/formal-semantics/) created by the [W3C ODRL Community Group](https://www.w3.org/community/odrl/) (CG) (also see [ODRL CG](https://www.w3.org/community/odrl/) for all reports and drafts developed by the CG).
1313

1414
## How does the ODRL Evaluator work?
15+
![](./img/ODRL-Evaluator.svg)
16+
1517
The evaluation relies on 3 inputs:
1618
- An ODRL Policy
1719
- An ODRL Request
@@ -31,6 +33,11 @@ The default ODRL Engine is [`ODRLEngine`](#odrlengine).
3133
Thus, if the user wants a faster evaluation and is sure that all checks are not required, they could directly use the ODRL engine (at their own risk).
3234

3335
*\*Following steps are not implemented yet, but should be: validation, cardinality, SOTW, policy decomposition*
36+
37+
## ODRL Evaluator Support
38+
39+
[ODRL Evaluator Support](./ODRL-Support.md) contains all aspects of the ODRL IM that are currently supported
40+
3441
## Running the ODRL Evaluator
3542
Following code shows how to run the ODRL Evaluator.
3643
```ts

img/ODRL-Evaluator.svg

Lines changed: 4 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)