Trust values
Context Resolvers specify a trust value for every aspect property value they return. The trust value conveys the amount of confidence a Resolver places in the accuracy of the value. If multiple Resolvers return different values for the same aspect property, the value returned by the Resolver that gave the highest trust value is accepted as the correct one.
For example, imagine two Resolvers that both try to determine whether the connecting device is a mobile device. One Resolver may employ a fast, but not entirely reliable way of finding this out, so it returns a trust value of 65 (trust values are integers from 0, not at all sure, to 100, absolutely sure) and a value false (that is, it thinks this is not a mobile device). The other Resolver uses a sophisticated algorithm and feels that it is very sure of its findings: it returns a trust value of 95 and a value true. The aspect property value would now be set to true because the second Resolver is more confident about its findings.
In the event that two Resolvers return different values for an aspect property with the same, and the highest, trust value, then both values are disregarded and the property value with the next highest trust value is chosen.
Here are the trust values returned by the various Resolvers:
| Context Resolver | Trust value |
|---|---|
| Translation Resolver | n/a (does not set trust values) |
| User Agent Resolver | 80 for all aspect properties |
| Repository Resolver | any value, depends on the strength of the evidence |
| Discovery Resolver | 85 for all aspect properties |
| Default Resolver | 1 for all aspect properties |
| Expression Resolver | depends on the aspect property: you configure the trust value in the Context Vocabulary file that defines its aspect properties |