Skip to content

Feat/profile validation iteration - #7

Merged
woutslabbinck merged 4 commits into
mainfrom
feat/profile-validation-iteration
Nov 19, 2026
Merged

woutslabbinck merged 4 commits into
mainfrom
feat/profile-validation-iteration

Conversation

@woutslabbinck

Copy link
Copy Markdown
Collaborator

Adds three features

  • rules in profile
  • only policies that declare profiles will be validated using the declared policies
  • instances and declarations of Assets and Parties are added together with the data to avoid warnings

Implements new Rules in profiles, which are declared through rdfs:subClassOf.

Three tests cannot be properly be verified for this feature

  • fails when a profile rule subclass is used without a profile
    • I cannot enforce this because it would define the new rule class and its relation. The only thing I can think of that fixes this is by closing the policy, but than other relations in a Policy would fail Perhaps if we are deliberatily strict, this is possible? But then we need to ensure to add all allowed metadata properties in our shape: https://www.w3.org/TR/odrl-model/#metadata
  • validates policies that use a profile rule subclass and where the wrong relation is used.
    • if the relation is an odrl defined one, the normalization step will wrongly categorize them as that type
  • fails when a profile rule subclass is used without a profile and a wrong relation is used
    • if the relation is an odrl defined one, the normalization step will wrongly categorize them as that type

Maybe the latter two can be resolved by mandating an odrl:Rule can only have one type.

Furthermore, the DPV test suite still fails cause it contains no tests yet.

Ensure that policies are only validated according to their profile

The ODRL Validator is heavily rewritten. The main flow however remains the same.

  1. A check for whether there are policies in the input
  2. normalisation of the policies
  3. (differs) Policies are extracted from the input. All quads not part of the policies are also collected
    • Each policy validated and when it declared it profile, according to that profile
    • A warning is added for policies that declare a policy that has not been configured in the Validator
    • The leftovers are also validated -> NOTE see last description about the failing test
  4. Deduplication of messages (ensures that e.g. an Asset warning is only thrown once)
  5. If there is no Violation, the notation3 conflict detection is run.

So mainly the third point has been changed.

MultipleProfiles.test is created. Though one test still fails

One test fails due to the first feature: I added for rule subclasses test the requirement for permissions, duties and prohibition that a relation to them is added (e.g. from a policy or another rule). This makes validating permissions, prohibitions and duties stand alone always throw a violation as there is no policy then.

Extract all instances and declarations of Assets and Parties from the profiles

In the ODRL Validator with profiles, the assets and parties are added (non transitive).
This way, no warning are thrown when terminology for the profiles are used.

Instances and declarations are used because DPV and TOSL define it diferrently:

  • TOSL uses declaration: tosl:Service rdfs:subClassOf odrl:Asset
  • DPV uses instances: dpv-odrl:Age a odrl:LeftOperand, skos:Concept, odrl:Asset

@woutslabbinck
woutslabbinck merged commit 3513646 into main Nov 19, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant