Warning:
This wiki has been archived and is now read-only.
Constraints on Constraints (aka Complex Constraints)
The purpose of this page is to collect proposals for addressing use cases that require means for defining more expressive/complex constraints on permissions, prohibitions or duties. For example, one may wants to define:
- relative constraints, such as "You can publish photos to do with a football match, but only 1 hour after the event (i.e., respective football match) has ended."
- or qualified constraints (scope of constraints?) to distinguish between "payment per account" and "payment per person".
Both of which are currently not (or only partially?) ...
According to our current Information Model ED, constraints in ODRL are defined as follows:
ODRL Constraints - current status (as of 10/11/2016) The Constraint
entity indicates limits and restrictions to thePermission
, theProhibition
and theDuty
entity.Constraint
s express mathematical terms with two operands and one operator. For example, the "number of usages" (name
) must be "smaller than" (operator
) the "number 10" (rightOperand
).If multiple
Constraint
entities are linked to the samePermission
,Prohibition
, orDuty
entity, then all of theConstraint
entities MUST be satisfied. That is, all theConstraint
entities are (boolean) ANDed. In the case where the sameConstraint
is repeated, then these MUST be represented as a singleConstraint
entity using an appropriateoperator
value (for example,isAnyOf
).The
Constraint
entity contains the following attributes:-
name
: a name that identifies the left operand of the operation (REQUIRED)- identifies the left operand of the mathematical operation for the
Constraint
such as "Number of Usages" and "Expiration Date" etc.
- identifies the left operand of the mathematical operation for the
-
operator
: an operator function (REQUIRED)- identifies the comparative operation such as "greater than" or "equal to"
-
rightOperand
: the right operand of the operation (REQUIRED)- identifies the value that is being compared
-
dataType
: the datatype of the rightOperand (OPTIONAL)- indicates the type of the
rightOperand
, such as "decimal" or "datetime"
- indicates the type of the
-
unit
: the units of the rightOperand (OPTIONAL)- indicates the unit value of the
rightOperand
, such as "EU dollars"
- indicates the unit value of the
-
status
: the current value of the left operand (OPTIONAL)- provides the current value of the
Constraint
variable (i.e. current value ofname
)
- provides the current value of the
When processing policy expressions, these
Constraint
names MAY be directly linked to a procedure that can determine the outcome of the operations, such as the number of already performed usages and the current date. Thename
andoperator
are defined in the ODRL Vocabulary or community profiles.-