Repository navigation
Existing Validation Rules in the ODRL API
This document provides a overview of the validation rules implemented in the current ODRL validator.
Validation Pipeline
The validator executes the following control checks:
- Validation01 – Policy existence
- Validation03 – Type consistency
- Validation04 – Permission cardinality
- Validation05 – Assigner in Offer rules
- Validation06 – Logical constraints
- Validation07 – Controlled vocabulary
- Validation08 – Collection refinement
- Validation09 – Remedy constraint
- ValidationSHACL – SHACL-based validation
Note: Validation02 exists but is not executed.
- Description: At least one policy must exist.
-
Condition:
- No
odrl:Policy,odrl:Agreement,odrl:Offer, orodrl:Setfound
- No
────────────────────────
- Description: A resource cannot have incompatible types.
-
Condition:
- Policies:
- Must not be more than one of
Agreement,Offer,Set
- Must not be more than one of
- Rules:
- Must not be more than one of
Permission,Prohibition,Duty
- Must not be more than one of
- Policies:
────────────────────────
- Description: A permission should not have multiple assigners or assignees.
-
Condition:
- At most 1
odrl:assigner - At most 1
odrl:assignee
- At most 1
────────────────────────
- Description: Every rule inside an Offer must have exactly one assigner.
-
Condition:
- For each rule (
permission,obligation,prohibition) under aodrl:Offer:- The number of
odrl:assignermust be exactly 1
- The number of
- For each rule (
────────────────────────
- Description: Operands in logical constraints must be valid constraints.
-
Condition:
- Must not be literals
- Must be instances of
odrl:Constraint
────────────────────────
- Description: Non-ODRL terms are allowed only when a profile is defined. Otherwise, values must belong to the standard ODRL vocabulary.
-
Condition:
- If no
odrl:profileis declared, the following properties must use terms from the ODRL vocabulary:odrl:actionodrl:leftOperandodrl:operator
- If no
────────────────────────
-
Description: Collections (
odrl:AssetCollectionorodrl:PartyCollection) with refinement must define their source. -
Condition:
- Must include
odrl:sourceifodrl:refinementis present
- Must include
────────────────────────
- Description: A remedy cannot reference a duty with consequences.
-
Condition:
-
remedymust not point to aDutythat hasodrl:consequence
-
-
Every
odrl:Policymust have an identifier (URI) and at least one rule -
Every
odrl:Offermust have an assigner, either directly or within its rules -
Every
odrl:Agreementmust have both an assigner and an assignee -
Every
odrl:Rulemust have at least one action -
Every
odrl:Permissionmust have at most one assigner and at most one assignee -
Every
odrl:Permissionmust have at least one target -
Every
odrl:Constraintmust be well-formed:- exactly one
odrl:leftOperand - exactly one
odrl:operator - and exactly one of:
odrl:rightOperandodrl:rightOperandReference
- exactly one
-
Actions and targets should ideally be URIs