Skip to content

Commit 0287ab5

Browse files
Merge pull request #12 from SolidLabResearch/feat/purpose
Feat/purpose
2 parents 1d15c9b + bf92ae9 commit 0287ab5

File tree

10 files changed

+4984
-2867
lines changed

10 files changed

+4984
-2867
lines changed

ODRL-Support.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,30 @@ When this is not the case, no satisfaction of this constraint can be obtained.
127127
To check for membership in an Asset Collection, the `odrl:partOf` property is used as stated in [ODRL IM §2.2.2](https://www.w3.org/TR/odrl-model/#asset-partof).
128128

129129
Example rule of Asset when Asset Collection is present:
130+
```notation3
131+
{
132+
?ruleReport a ?ruleReportType ;
133+
report:rule ?permission ;
134+
report:ruleRequest ?requestPermission ;
135+
report:premiseReport ?targetReport .
136+
?ruleReportType list:in (report:PermissionReport report:RuleReport report:ProhibitionReport) .
137+
138+
?targetReport a report:TargetReport .
139+
140+
?permission odrl:target ?assetCollection .
141+
142+
?assetCollection a odrl:AssetCollection.
143+
144+
?requestPermission odrl:target ?resourceInCollection .
145+
146+
?resourceInCollection odrl:partOf ?assetCollection .
147+
}
148+
=>
149+
{
150+
?targetReport report:satisfactionState report:Satisfied .
151+
} .
152+
```
153+
130154
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).
131155

132156

@@ -183,10 +207,10 @@ Columns of the table elaborated:
183207
| Greater than | [`odrl:gt`](http://www.w3.org/ns/odrl/2/gt) ||||
184208
| Greater than or equal to | [`odrl:gteq`](http://www.w3.org/ns/odrl/2/gteq) ||||
185209
| Has part | [`odrl:hasPart`](http://www.w3.org/ns/odrl/2/hasPart) ||||
186-
| Is a | [`odrl:isA`](http://www.w3.org/ns/odrl/2/isA) ||| |
210+
| Is a | [`odrl:isA`](http://www.w3.org/ns/odrl/2/isA) ||| |
187211
| Is all of | [`odrl:isAllOf`](http://www.w3.org/ns/odrl/2/isAllOf) ||||
188-
| Is any of | [`odrl:isAnyOf`](http://www.w3.org/ns/odrl/2/isAnyOf) ||| |
189-
| Is none of | [`odrl:isNoneOf`](http://www.w3.org/ns/odrl/2/isNoneOf) ||| |
212+
| Is any of | [`odrl:isAnyOf`](http://www.w3.org/ns/odrl/2/isAnyOf) ||| |
213+
| Is none of | [`odrl:isNoneOf`](http://www.w3.org/ns/odrl/2/isNoneOf) ||| |
190214
| Is part of | [`odrl:isPartOf`](http://www.w3.org/ns/odrl/2/isPartOf) ||||
191215
| Less than | [`odrl:lt`](http://www.w3.org/ns/odrl/2/lt) ||||
192216
| Less than or equal to | [`odrl:lteq`](http://www.w3.org/ns/odrl/2/lteq) ||||
@@ -221,7 +245,7 @@ Columns of the table elaborated:
221245
| Payment Amount | [`odrl:payAmount`](http://www.w3.org/ns/odrl/2/payAmount) ||||
222246
| Asset Percentage | [`odrl:percentage`](http://www.w3.org/ns/odrl/2/percentage) ||||
223247
| Product Context | [`odrl:product`](http://www.w3.org/ns/odrl/2/product) ||||
224-
| Purpose | [`odrl:purpose`](http://www.w3.org/ns/odrl/2/purpose) ||| |
248+
| Purpose | [`odrl:purpose`](http://www.w3.org/ns/odrl/2/purpose) ||| |
225249
| Recipient | [`odrl:recipient`](http://www.w3.org/ns/odrl/2/recipient) ||||
226250
| Relative Asset Position | [`odrl:relativePosition`](http://www.w3.org/ns/odrl/2/relativePosition) ||||
227251
| Relative Asset Size | [`odrl:relativeSize`](http://www.w3.org/ns/odrl/2/relativeSize) ||||

RELEASE_NOTES.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# ODRL Evaluator
22

3+
## v0.5.0
4+
5+
### New features
6+
7+
- Support for the purpose constraint
8+
- The purpose is added as a constraint using the `https://w3id.org/force/sotw#context`. Note that this is an intermediary step between current inputs and the future inputs of the ODRL Evaluator: https://w3id.org/force/sotw
9+
- Support for following set based operators
10+
- `odrl:isAnyOf`
11+
- `odrl:isA`
12+
- `odrl:isNoneOf`
13+
14+
### Fixes
15+
16+
- Fix to the way Party and Asset collections are handled
17+
- addressed in the rules (`src/rules/report.n3`) and the test suite (`test/integration/ODRL-Test-Suite.test.ts`)
18+
319
## v0.4.0
420

521
### New features

TODO.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# TODO list
2+
3+
## Creating new test cases
4+
5+
- [x] checking whether evaluation also work when having xsd:date instead of xsd:dateTime
6+
- [x] remove comments in `constraint.n3`
7+
- [ ] Make actual test case for (ODRL-test-suite)
8+
- [ ] Test cases for zero or one purpose
9+
- Ensure no DANGLING context is possible -> see rules related to purpose in `constraint.n3`
10+
- make a test case for that?
11+
```n3
12+
?requestPermission sotw:context ?requestContextConstraint .
13+
?requestContextConstraint odrl:leftOperand odrl:purpose .
14+
```
15+
16+
MUST become
17+
18+
```n3
19+
?requestPermission a sotw:EvaluationRequest.
20+
?requestPermission sotw:context ?requestContextConstraint .
21+
?requestContextConstraint odrl:leftOperand odrl:purpose .
22+
```
23+
24+
Both created at: `test/ODRL-newTestCases.test.ts`
25+
26+
## Other
27+
28+
- [x] Do a github release for version 0.4
29+
- [ ] fix [issue 3](https://github.com/SolidLabResearch/ODRL-Evaluator/issues/3) -> strange behaviour in action reports for compact rules
30+
- [ ] perhaps also test whether I can solve compact policies as well as that is just derivation
31+
- [x] fix [issue 8](https://github.com/SolidLabResearch/ODRL-Evaluator/issues/8) -> collection
32+
- [x] implement `odrl:anyOf`
33+
- [x] implement `odrl:isNoneOf`
34+
- [x] implement `odrl:anyOf`
35+
- [x] checkout other operators
36+
- Needs discussion
37+
- `odrl:isAllOf`: With how we evaluate right now, `odrlisAllOf` does not make a lot of sense
38+
- `odrl:isPartOf`: what does containment mean? for Target and Party collections, that is clear (`odrl:partOf`)
39+
- `odrl:hasPart`: what does containment mean? for Target and Party collections, that is clear (`odrl:partOf`)
40+
- [x] `odrl:isA`: What does *is an instance* mean for right operands?
41+
- https://besteves4.github.io/odrl-access-control-profile/oac.html#x5-1-preference-policy
42+
- Needs implementation and test cases
43+
- [x] Make a release checklist template
44+
- [x] start drafting roadmap for proper upgrade to new sotw and evaluation request
45+
- preferably this release?
46+
47+
### To be discussed with Beatriz
48+
49+
- [ ] update policies in https://github.com/besteves4/pacsoi-policies
50+
- had to explicitly add `odrl:Permission` to the permission of the policies -> perhaps add code to infer this (making it future proof)
51+
- Recommend using proper identifiers everywhere due the the policy reports
52+
- Atomizer of Ruben D fails when blank nodes are used for odrl Rules. As a result, so does my `Atomizer` class.
53+
54+
### Addressed
55+
- Does it make sense to request access for multiple purposes?
56+
- A: Right now, it does not. You want to be very specific when you ask for data. You don't want the ambiguity
57+
- For now, `odrl:hasPart` does not make sense:
58+
- The current sotw and evaluation request assumes a cardinality of one value to materialize for a left operand. Thus far, no examples have been found where a left operand contains multiple properties.
59+
- this was the assumption for the state of the world anyway, because we want a deterministic way to get **one** value (though programmable) for the Left Operand
60+
- `odrl:isAllOf`: A set-based operator indicating that a given value is all of the right operand of the Constraint.
61+
- It does not make sense: we have not found a value that could do that
62+
- NOTE: perhaps it would be possible if the meaning of the constraint is
63+
- A set-based operator indicating that a given value is **AN INSTANCE OF** all of the right operand of the Constraint.
64+
- `odrl:isPartOf`: There is no generic way to have Collections. Perhaps this operator could be useful in profiles.
65+
- There is notion of collections with parties and assets, though this is handled already through the party and asset properties of a rule.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "odrl-evaluator",
3-
"version": "0.4.0",
3+
"version": "0.5.0",
44
"description": "An open implementation of an ODRL Evaluator that evaluates ODRL policies by generating Compliance Reports",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",

0 commit comments

Comments
 (0)