User Preference Set
A user preference set consists of a flat ordered list of user preferences.
A user profile preference consists of three fields: a property, a value and a condition. The property serves as a key to get a specification from a registry, which defines the user preference (for example by defining the value space for the value field).
Conditions are unique to the user preferences and define their circumstances of application. A preference could, for example, only be active at a given time of the day (global sensor), at a given lighting condition (local sensor) or on a certain operating system (device specific).
Conditions are expressed as Boolean expressions, featuring the common logical and comparison operators (incomplete list, you could also imagine string comparison operators like "contains"):
|&&||binary operator: logical and|
|||||binary operator: logical or|
|!||unary operator: logical not|
|==||binary operator: equality check. This operator is specified in the specification received from the registry|
|>||binary operator: greater-than check. This operator is specified in the specification received from the registry|
|<||binary operator: less-than check. This operator is specified in the specification received from the registry|
|>=||binary compound operator: (a >= b) --> ((a > b) or (a == b))|
|<=||binary compound operator: (a <= b) --> ((a < b) or (a == b))|
There are also some functions available to receive values.
|value(uri)||uri (datatype: string): a property||Returns the value of a user preference or a context in the current user preference set or context set|
|isKnown(uri)||uri (datatype: string): a property||Returns a Boolean indicating whether the passed property appears in the user preference set or the context set|
A context set consists of a flat unordered list of contexts.
The Context Set describes the current context. This includes output from local sensors (like the current background noise), global sensors (like the current time of the day at the device's location) or device specific information, like the device type or the operating system version.
A context consists of two fields: a property and a value. A property may only appear once in a Context Set. The property serves as a key to get a specification from a registry, which defines the context (for example by defining the value space for the value field).