Types of Context Resolvers
Context Engine Cartridge uses (in sequence): a User Agent Parser Resolver, a Repository Resolver, a Discovery Resolver, a Default Resolver and an Expression Resolver.
- Translation Resolver
-
This Context Resolver translates Ambient Data Framework Claim URIs into Context Engine Cartridge custom vocabulary. That is, any third-party Claim URI values are mapped into a custom aspect and property. They are then available to be used by the Expression Resolver.
- User Agent Parser Resolver
-
This Context Resolver uses user agent strings, supplied in the HTTP request originating from the client, as evidence. It then applies pattern-matching rules to obtain values for the following aspect properties:
browser.modelbrowser.versionos.modelos.versiondevice.model
- Repository Resolver
-
This Context Resolver uses user agent strings, supplied in the HTTP request originating from the client, as evidence. It then refers to its repository of known user devices to obtain values for the following aspect properties:
browser.cookieSupportbrowser.cssVersionbrowser.displayColorDepthbrowser.displayHeightbrowser.displayWidthbrowser.imageFormatSupportbrowser.inputModeSupportbrowser.inputDevicesbrowser.jsVersionbrowser.markupSupportbrowser.modelbrowser.preferredHtmlContentTypebrowser.scriptSupportbrowser.stylesheetSupportbrowser.vendorbrowser.versiondevice.mobiledevice.modeldevice.robotdevice.tabletdevice.variantdevice.vendordevice.versionos.model
- Discovery Resolver
-
This Context Resolves runs client-side JavaScript code to determine the capabilities of the device and to determine current settings, such as browser width. Specifically, it obtains values for the following aspect properties:
browser.displayColorDepthbrowser.displayHeightbrowser.displayWidthbrowser.modeldevice.displayHeightdevice.displayWidthdevice.pixelRatio
- Expression Resolver
-
This Resolver reads the Context Vocabulary file, in which you can define your own aspect properties. This file lists the name, context expression (evaluating to its value), data type and trust value of each aspect property. The context expressions must conform to the definition of the Context Expression Language. These expressions can be a literal value, or they can be the result of using existing aspect properties (as returned by the other Resolvers) in the expression.
If the expression is invalid or evaluates to a null value, thenContext Engine Cartridge uses the Default Resolver, where possible.
- Default Resolver
-
This Resolver sets all aspect properties in the Context Map that have not yet been assigned a value to their predefined default value. For example, if none of the Resolvers have been able to determine whether the connecting device is a mobile device or not, the Default Resolver sets
device.mobileto the default valuefalse.