Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions ODRL-Support.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,30 @@ When this is not the case, no satisfaction of this constraint can be obtained.
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).

Example rule of Asset when Asset Collection is present:
```notation3
{
?ruleReport a ?ruleReportType ;
report:rule ?permission ;
report:ruleRequest ?requestPermission ;
report:premiseReport ?targetReport .
?ruleReportType list:in (report:PermissionReport report:RuleReport report:ProhibitionReport) .

?targetReport a report:TargetReport .

?permission odrl:target ?assetCollection .

?assetCollection a odrl:AssetCollection.

?requestPermission odrl:target ?resourceInCollection .

?resourceInCollection odrl:partOf ?assetCollection .
}
=>
{
?targetReport report:satisfactionState report:Satisfied .
} .
```

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).


Expand Down Expand Up @@ -183,10 +207,10 @@ Columns of the table elaborated:
| Greater than | [`odrl:gt`](http://www.w3.org/ns/odrl/2/gt) | ✅ | ❌ | ✅ |
| Greater than or equal to | [`odrl:gteq`](http://www.w3.org/ns/odrl/2/gteq) | ✅ | ❌ | ✅ |
| Has part | [`odrl:hasPart`](http://www.w3.org/ns/odrl/2/hasPart) | ✅ | ❌ | ❌ |
| Is a | [`odrl:isA`](http://www.w3.org/ns/odrl/2/isA) | ✅ | ❌ | |
| Is a | [`odrl:isA`](http://www.w3.org/ns/odrl/2/isA) | ✅ | ❌ | |
| Is all of | [`odrl:isAllOf`](http://www.w3.org/ns/odrl/2/isAllOf) | ✅ | ❌ | ❌ |
| Is any of | [`odrl:isAnyOf`](http://www.w3.org/ns/odrl/2/isAnyOf) | ✅ | ❌ | |
| Is none of | [`odrl:isNoneOf`](http://www.w3.org/ns/odrl/2/isNoneOf) | ✅ | ❌ | |
| Is any of | [`odrl:isAnyOf`](http://www.w3.org/ns/odrl/2/isAnyOf) | ✅ | ❌ | |
| Is none of | [`odrl:isNoneOf`](http://www.w3.org/ns/odrl/2/isNoneOf) | ✅ | ❌ | |
| Is part of | [`odrl:isPartOf`](http://www.w3.org/ns/odrl/2/isPartOf) | ✅ | ❌ | ❌ |
| Less than | [`odrl:lt`](http://www.w3.org/ns/odrl/2/lt) | ✅ | ❌ | ✅ |
| Less than or equal to | [`odrl:lteq`](http://www.w3.org/ns/odrl/2/lteq) | ✅ | ❌ | ✅ |
Expand Down Expand Up @@ -221,7 +245,7 @@ Columns of the table elaborated:
| Payment Amount | [`odrl:payAmount`](http://www.w3.org/ns/odrl/2/payAmount) | ❌ | ❌ | ❌ |
| Asset Percentage | [`odrl:percentage`](http://www.w3.org/ns/odrl/2/percentage) | ❌ | ❌ | ❌ |
| Product Context | [`odrl:product`](http://www.w3.org/ns/odrl/2/product) | ❌ | ❌ | ❌ |
| Purpose | [`odrl:purpose`](http://www.w3.org/ns/odrl/2/purpose) | ❌ | ❌ | |
| Purpose | [`odrl:purpose`](http://www.w3.org/ns/odrl/2/purpose) | ❌ | ❌ | |
| Recipient | [`odrl:recipient`](http://www.w3.org/ns/odrl/2/recipient) | ❌ | ❌ | ❌ |
| Relative Asset Position | [`odrl:relativePosition`](http://www.w3.org/ns/odrl/2/relativePosition) | ❌ | ❌ | ❌ |
| Relative Asset Size | [`odrl:relativeSize`](http://www.w3.org/ns/odrl/2/relativeSize) | ❌ | ❌ | ❌ |
Expand Down
16 changes: 16 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# ODRL Evaluator

## v0.5.0

### New features

- Support for the purpose constraint
- 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
- Support for following set based operators
- `odrl:isAnyOf`
- `odrl:isA`
- `odrl:isNoneOf`

### Fixes

- Fix to the way Party and Asset collections are handled
- addressed in the rules (`src/rules/report.n3`) and the test suite (`test/integration/ODRL-Test-Suite.test.ts`)

## v0.4.0

### New features
Expand Down
65 changes: 65 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# TODO list

## Creating new test cases

- [x] checking whether evaluation also work when having xsd:date instead of xsd:dateTime
- [x] remove comments in `constraint.n3`
- [ ] Make actual test case for (ODRL-test-suite)
- [ ] Test cases for zero or one purpose
- Ensure no DANGLING context is possible -> see rules related to purpose in `constraint.n3`
- make a test case for that?
```n3
?requestPermission sotw:context ?requestContextConstraint .
?requestContextConstraint odrl:leftOperand odrl:purpose .
```

MUST become

```n3
?requestPermission a sotw:EvaluationRequest.
?requestPermission sotw:context ?requestContextConstraint .
?requestContextConstraint odrl:leftOperand odrl:purpose .
```

Both created at: `test/ODRL-newTestCases.test.ts`

## Other

- [x] Do a github release for version 0.4
- [ ] fix [issue 3](https://github.com/SolidLabResearch/ODRL-Evaluator/issues/3) -> strange behaviour in action reports for compact rules
- [ ] perhaps also test whether I can solve compact policies as well as that is just derivation
- [x] fix [issue 8](https://github.com/SolidLabResearch/ODRL-Evaluator/issues/8) -> collection
- [x] implement `odrl:anyOf`
- [x] implement `odrl:isNoneOf`
- [x] implement `odrl:anyOf`
- [x] checkout other operators
- Needs discussion
- `odrl:isAllOf`: With how we evaluate right now, `odrlisAllOf` does not make a lot of sense
- `odrl:isPartOf`: what does containment mean? for Target and Party collections, that is clear (`odrl:partOf`)
- `odrl:hasPart`: what does containment mean? for Target and Party collections, that is clear (`odrl:partOf`)
- [x] `odrl:isA`: What does *is an instance* mean for right operands?
- https://besteves4.github.io/odrl-access-control-profile/oac.html#x5-1-preference-policy
- Needs implementation and test cases
- [x] Make a release checklist template
- [x] start drafting roadmap for proper upgrade to new sotw and evaluation request
- preferably this release?

### To be discussed with Beatriz

- [ ] update policies in https://github.com/besteves4/pacsoi-policies
- had to explicitly add `odrl:Permission` to the permission of the policies -> perhaps add code to infer this (making it future proof)
- Recommend using proper identifiers everywhere due the the policy reports
- Atomizer of Ruben D fails when blank nodes are used for odrl Rules. As a result, so does my `Atomizer` class.

### Addressed
- Does it make sense to request access for multiple purposes?
- A: Right now, it does not. You want to be very specific when you ask for data. You don't want the ambiguity
- For now, `odrl:hasPart` does not make sense:
- 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.
- 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
- `odrl:isAllOf`: A set-based operator indicating that a given value is all of the right operand of the Constraint.
- It does not make sense: we have not found a value that could do that
- NOTE: perhaps it would be possible if the meaning of the constraint is
- A set-based operator indicating that a given value is **AN INSTANCE OF** all of the right operand of the Constraint.
- `odrl:isPartOf`: There is no generic way to have Collections. Perhaps this operator could be useful in profiles.
- There is notion of collections with parties and assets, though this is handled already through the party and asset properties of a rule.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "odrl-evaluator",
"version": "0.4.0",
"version": "0.5.0",
"description": "An open implementation of an ODRL Evaluator that evaluates ODRL policies by generating Compliance Reports",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
Loading