Viz Trio User Guide

Version 3.2 | Published June 29, 2021 ©

Field Linking and Feed Browsing in Viz Trio

Viz Trio supports browsing tab-field values from external sources. Instead of editing tab-field values manually, values from an external feed can be selected.

Note: Viz Trio only supports the Atom 1.0 feed standard.

This section covers the following topics:

Workflow

  1. Import a regular scene as a template in Trio.

  2. Read the template.

  3. On top of each tab-field of the template, a link button opens the collection picker, where you can specify a feed URI. You must also specify which part of the feed item should be used as a value: title, content, link with a certain link relation, entry or locator.

    Note: The link button is not available for pages. Linking to an Atom feed is a Viz Trio template property that is shared by all pages using that template.

  4. Press Save template.

  5. When establishing a valid feed connection, the tab-field value can be selected from the feed items.

Overview

Feed URIs can be defined in the control object of the scene design in Viz Artist. the feed URI for a tab-field in a template can also be defined inside Viz Trio. Each page then uses the feed browser to edit the tab-field value. The specified feed URI in Viz Trio overwrites any existing feed URI from the control object. Reimporting the scene does not replace the specified feed URI with the field definition specified in control object.

A tab-field contains several properties, each of which relate to a control plug-in in the scene. Properties are grouped under a tab-field using a naming convention.

Example: The ControlText plug-ins specifying the field identifiers 1.name, 1.score and 1.image forms a tab-field 1 with the properties' name, score and image. Selecting a feed item for tab-field 1 instantly applies the parts of the selected item to the properties name, score and image. The individual property values are editable as usual. The feed item selection assists fill-in only.

Feed linking can be used across all tab-field types.

Note: Make sure to define matching object types such as a thumbnail link for control image tab-fields.

Field linking in Viz Trio is a two-step procedure:

  1. Field Linking: Linking the fields in a template to various parts of data that comes from entries in a feed. This is a setup step that is usually done once for a template.

  2. Feed Browsing: After field linking has been set up and saved for a template, a new property editor for selecting an entry from a feed will be available. This feed browser lets you select an item in a feed that contains the values that should be applied to the field values.

    Note: Viz Trio only supports the Atom 1.0 feed standard.

    The feed browser supports two types of feeds:

  • Flat feeds

  • Hierarchical feeds (folder structure)

Tabfield Grouping

To be able to set multiple tabfield values from the same feed entry, the tabfields must be grouped together. This is done by giving them the same prefix followed by the period character. For example, the following tabfield names will generate two groups of tabfields (candidate1 and candidate2):

candidate1.name candidate1.image candidate2.name candidate2.image

Technical

The following XML Namespace Prefixes are used when referring to XML elements:

XML Namespace Prefixes

Prefix

URL

atom

http://www.w3.org/2005/Atom

viz

http://www.vizrt.com/types

vaext

http://www.vizrt.com/atom\-ext

media

http://search.yahoo.com/mrss/

thr

http://purl.org/syndication/thread/1.0

opensearch

http://a9.com/\-/spec/opensearch/1.1/

Example: The notation <atom:entry> is to be interpreted as referring to the same element as <entry xmlns="http://www.w3.org/2005/Atom">.

The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL in this document are to be interpreted as described in RFC 2119.

Field Linking

Field linking is the process of linking the fields in a template to various parts of data that comes from entries in a feed.

images/download/attachments/58332103/userinterface_fieldlinkerintrio.png

Fields That Can be Linked

  • <atom:author>
    The personal details of the author of the selected <atom:entry>, which might be an individual person or an organization. The data is provided in child elements as follows:

    • <atom:name>: The name of the author. The value of the <atom:name> element inside the first <atom:author> element that applies for the entry is recorded as the field value. This child element is required if you are specifying the <atom:author> element.

    • <atom:uri>: A URL associated with the author, such as a blog site or a company web site. The value of the <atom:uri> element inside the first <atom:author> element that applies for the entry is recorded as the field value. This child element is optional.

    • <atom:email>: The email address of the author. The value of the <atom:email> element inside the first <atom:author> element that applies for the entry is recorded as the field value. This child element is optional.

  • <atom:content>

    • Both inline and URL content is supported.

    • There is no type match, so it is up to the Trio operator to figure out what content can be used.

    • For URL content the resource is downloaded first and then applied as the value. If you just want the URL you should use <atom:link>.

  • <atom:entry>
    The whole entry XML.

  • <atom:link>
    This element defines a reference from an entry to a Web resource; in other words this is the value of the href attribute.

  • <vaext:locator>
    The text of the Vizrt Atom Extension <vaext:locator> element which has a vaext:type attribute equal to the mediatype attribute of <viz:fielddef> element in the model.

  • <atom:published>
    This element is a Date construct indicating the initial creation or first availability of the entry. The value of the <atom:published> element in the entry is recorded as the field value.

  • <atom:summary>
    This element is a Text construct that conveys a short summary, abstract, or excerpt of an entry. The content of the <atom:summary> element in the entry is recorded as the field value.

  • <atom:thumbnail>

  • The value of the url attribute of the first thumbnail element in the entry is recorded as the field value.

  • <atom:title>
    This element is a Text construct that conveys a human-readable title for an entry or feed; the title of the selected <atom:entry>.

  • <atom:updated>
    This element is a Date construct indicating the most recent instant in time when the selected <atom:entry> was modified. The value of the <atom:updated> element in the entry is recorded as the field value.

Fields That Cannot be Linked

  • <atom:category>

  • <atom:id>

  • <atom:rights>

  • Any other elements.

Elements in Atom Feed

Elements that should be present in the <atom:feed> for the full user experience:

  • OpenSearch link:

    <atom:link rel="search" type="application/opensearchdescription+xml" href="http://example.com/opensearchdescription.xml"/>
  • Optional, required for support for server side searching.

    • The opensearchdescription xml file must contain a template node that returns search results as an atom feed:

      <opensearch:Url type="application/atom+xml" template="http://..." />
  • See http://www.opensearch.org/Specifications/OpenSearch/1.1 for more details.

  • Up link:

    <atom:link rel="up" type="application/atom+xml;type=feed" href="http://..." />
  • Optional, required for nested collections:

    • The up link should link to the parent folder feed for hierarchical feeds.

    • The up link must have a type string equal to "application/atom+xml;type=feed".

Elements in Atom Entry

Elements that should be present in the <atom:entry> for the full user experience:

  • Self link:

    <atom:link rel="self" type="application/atom+xml;type=entry" href="http://..." />
  • The self link must link to the URL that will return the <atom:entry> xml.

    • The self link must have a type value equal to "application/atom+xml;type=entry".

    • Needed for refresh/update of values from the item to work.

    • Needed in combination with the up link for remembering and showing the selected feed entry in a hierarchy of feeds (folder structure). Not needed for remembering selection in flat feeds since then the atom:id will be used.

  • Up link:

    <atom:link rel="up" type="application/atom+xml;type=feed" href="http://..." />
  • The up link must have a href value that is the URL of the feed the entry is in.

    • The up link must have a type value equal to "application/atom+xml;type=feed".

    • Needed in combination with the self link for remembering and showing the selected feed entry in a folder structure.

  • Down link:

    <atom:link rel="down" type="application/atom+xml;type=feed" href="http://..." />
  • Required if this <atom:entry> is to be considered a subfolder instead of a normal <atom:entry>.

    • The down link must have a type value equal to "application/atom+xml;type=feed".

    • The down link must have a href value that is the url of the feed (folder) the entry represents.

    • Link may contain thr:count attribute (RFC4685) indicating how many children there are. If the value of thr:count is 0 (zero) then the folder will not be loaded since it is empty. This is an optimization.

  • Thumbnail link:

    <media:thumbnail url="http://..."/>
  • Required for thumbnail icons to display on the entries in the feed browser:

    • The URL value must reference a JPEG or PNG image resource.

    • If many thumbnails are defined the first one will be selected as the default. This is according to Media RSS Specification Version 1.5.0.

  • Locator

    <vaext:locator type="application/vnd.vizrt.viz.geom">GEOM*Vizrt/Tutorials/VizTrio/...</vaext:locator>
  • Required to be able to link a tabfield to a locator. A locator is a path that is not representable with the URI href in an <atom:link>. The selected value is the text node in the locator, so it can in theory be used for any kind of text.

    • For Viz Trio it is meant to be used to select paths to resources that are not URIs, like the resources on the Viz Graphics Hub that is currently in use.

    • The type must match the tabfield type.

    • The value from the first locator that matches will be used.

    • If no locators matches an error message will be logged in Trio.

    • The Viz Engine types are:

  • TEXT : text/plain

    • RICHTEXT: application/vnd.vizrt.viz.richtext+xml

    • MATERIAL : application/vnd.vizrt.viz.material

    • DUPLET : application/vnd.vizrt.viz.duplet

    • TRIPLET : application/vnd.vizrt.viz.triplet

    • FONT : application/vnd.vizrt.viz.font

    • CLOCK : application/vnd.vizrt.viz.clockcommands

    • GEOM : application/vnd.vizrt.viz.geom

    • IMAGE : application/vnd.vizrt.viz.image

    • AUDIO : application/vnd.vizrt.viz.audio

    • VIDEO : application/vnd.vizrt.viz.video

    • MAP : application/vnd.vizrt.curious.map+xml

    • TRIOSCROLL : application/vnd.vizrt.trio.scrollelements+xml

  • Other links:

    <link rel="..." href="http://..." type="..."/>
  • Required in order to select the URL to external resources. This can be images, videos, text, and so on.

    • Limitation 1: The atom 1.0 specs allow multiple links with the same relation, but when linking a tabfield to a link in Trio, only the first link will be selected.

    • Limitation 2: Trio can only use the href URL as the value. It cannot download the resource at the URL and use its contents as the value. The Viz Engine control plugin for the property has to be able to understand the URL and download the resource.

Feed Browsing

Given a valid Field Linking URL the elements can now be browsed and selected in the Feed Browser window. The example below uses the link:

http://d63hzfu0kdpt5.cloudfront.net/vizrt\_training/vizrt\-training\-feed.xml

images/download/attachments/58332103/userinterface_ui_t3_feedbrowsing.png

  • Authentication:
    The feed browser supports basic HTTP authentication. The server must return a HTTP header based on the HTTP standard, like this:

    WWW-Authenticate: Basic realm="..."
  • Searching and Filtering:
    If the feed supports OpenSearch, the search box will be enabled and all searches will be done on the server. If not, the search box will be a local text filter box.