External
External type is designed for more complex data structure which might require the Producer to traverse through a categories tree (navigation) in order to narrow down data subset (data). These have the following attributes:
source | An object which specifies the location of the navigation and data feed. Note that only |
select | An object which controls what data selection mechanism is to be used. |
select
has these properties:
mode | Defines how data selection mechanism should be implemented. Supported modes:
|
min | Minimum number of items that Producer can select from a list for |
max | Minimum and maximum number of items that Producer can select from a list for |
filtering | Controls data filtering mechanism. This works over keywords specified for data items and is supported only for
|
Example
Navigation
Navigation is a hierarchy of categories. At the bottom of the navigation tree there is a layer of data for that navigation tree branch. Hierarchy is optional.
Both hierarchy and data can be split between several feeds. This allows to partition feeds in a flexible way to meet size or architecture restrictions. This is done by providing categories-source
or data-items-source
attributes.
Navigation object has these properties:
categories-label | Dropdown labels for category selection. |
categories | An array of categories entries, used to populate categories dropdown. |
categories-source | Source object with an url pointing to JSON feed containing categories data array. This is ignored if
|
name | Name of a category as to be displayed in a dropdown. |
data-items | An array of data entries. |
data-items-source | Source object with a URL pointing to JSON feed containing data entries array. Ignored if is specified. |
Data
id | An arbitrary id which can be used for debug/data tracing purposes. |
name | Name of this data item to be presented to the Producer. |
data | Actual data |
keywords | Array of keywords used for filtering. |
Examples
Non-hierarchical data example
Hierarchical structure example
The following feed describes this hierarchy:
First layer - discipline selection of “Hockey” and “Figure Skating”, labelled “Discipline”
Second layer for Hockey - event selection of “Men’s tournament” and “Women’s tournament”, labelled “Events”
Third layer for “Men’s tournament” - match selection of “Men’s Gold Medal Game” and “Men’s Bronze Medal Game”, labelled “Match”
Fourth layer for “Men’s Gold Medal Game” is the data layer. It lists two items of data.
The categories data feed (http://example.com/feeds/wt.json\) might look like this:
The data feed (http://example.com/feeds/mbmg.json\) might look like this: