dayTimeDurationUnion Function Description

Description

This function takes two or more arguments that are both a bag of dayTimeDuration values. It returns a bag of dayTimeDuration such that it contains all elements of all the argument bags. The function gets rid of duplicates, as determined by the equality functions.

dayTimeDurationUnion belongs to the ALFA function reference's Set functions category. It maps to the XACML function identifier urn:oasis:names:tc:xacml:3.0:function:dayTimeDuration-union, takes 2 or more arguments and returns a value of type A bag of values of type dayTimeDuration with no duplicates..

Property Value
Category Set functions
# Arguments 2 or more
Arguments
  • A bag of type dayTimeDuration
  • A bag of type dayTimeDuration
  • Optionally more bags of type dayTimeDuration
Return Value A bag of values of type dayTimeDuration with no duplicates.
Expressed As pre-fix
Representation ALFA short name
Allowed In Target false
ALFA Shorthand None
Commutative true

Example

/**
* Allow if the duration of 13 days is in the collection of validity periods or holidays
*/
rule dayTimeDurationUnionExample{
    permit
    condition dayTimeDurationIsIn("P13D":dayTimeDuration,dayTimeDurationUnion(validityPeriod,holidays))
}

In this example, we use the dayTimeDurationUnion function in conjunction with dayTimeDurationIsIn to determine whether a single atomic value is in the union of 2 bags of values. This also shows how functions can be combined together in ALFA.