Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Contexts are a way of grouping entities within a configuration. For example, a Weave configuration may include entities from a broad cross section of categories. - It may include reference information (roads, rivers, towns, administrative boundaries, property boundaries etc), plus various categories of information, for example :
a) Land classifications (wetlands, rainforest, grasslands, grazing, cropping, etc.)
b) Tourist information (motels, restaurants, Places of Interest, etc.)

Contexts allow such categories to be grouped and referred to by a context identifier (eg. landType, tourism); As a consequence, Weave clients may optionally specify categories (ie. "contexts") of entities that they will be working with. For example, the below client config specifies that the Holiday_client will utilise layers from the tourism context group.
<client:config id='Holiday_client' context='tourism'>
... Hence only entities that include the 'tourism' context will be used by the subject client, in additon to entities that do not have a context specification.

The required context specification per entity, takes the following form :

Code Block
<entity:entity id='roads' label='Roads'/>
<entity:entity id='rivers'      label='Rivers'/>
<entity:entity id='wetlands'    label='Wetlands'    context='landType' />
<entity:entity id='rainforest'  label='Rainforest'  context='landType' />
<entity:entity id='restaurants' label='Restaurants' context='tourism'/>
<entity:entity id='motels'      label='Motels'      context='tourism'/>

Consequently, for the above defined Holiday_client, it would subsequently utilise entities :
Roads, Rivers, Restaurants and Motels, without there needing to be an explicit specification of relevant entities, per utilised client configuration item.

The "Context" capability was introduced at Weave 2.6.8. It is a powerful feature that significantly simplifies the process of working with many entities within a Weave configuration, where numerous clients may exist. More discussion and examples are provided below.

Prior to the Advent of Contexts

Before 2.6.8 when a user opens a Weave client all of the entities that are registered with Weave are sent to the browser but if you do not need all of the entities to be available in the client then individual panels and components, if they support it, would each have to be configured to refine which entities that they would display.
Weave 2.6.8 adds the concept of a “context” to Weave that will allow you to group entities, and other configuration items, and then specify that a client should only present the entities that have been assigned to that context, removing the need to apply additional configuration too to all of the panels/componentcomponents. The panels/components can be cleaned up to remove the additional configuration that specifies which entities they should include and switch back to including all entities, since now “all entities” means the entities that were linked to the context specified by the client.

...

Associating a context to an entity also means that other items that are associated with that entity will not display* in the client either, things like searches, reports, data, edits, etc., so if an entity is not part of the context that a client uses, then none of the other items related to that entity will be displayed in the client either, there is no need to set a context for these other items.

Info

*It should be noted that Contexts are not designed to influence the rendering of entities within a map engine. Thus, the image generated as a consequence of a mapengine configuration, will not be affected by the use of client context specifications.

It’s likely that just associating contexts to entities will take care of 99% of the requirements to refine what’s available in the client, but it’s also possible to assign contexts to other configuration items.

...