Defining Filters for the Model Viewer

 

This chapter explains the definition and the usage of filters in a Model Viewer.

In this section, you will learn:

·         What to do to write your own filters for the Model Viewer

·         How to combine several filters into one filter set

·         How to assign filters or filter sets to a Model Viewer

 

Topics

Defining Filters on Selena Elements

 

Creating Filter Sets

 

Task 1: Write Your Own Viewer Filters

 

Task 2: Create Filter Sets

 

Task 3: Assign a Filter (or Filter Set) to the Viewer

 

 

Filters and Filter Sets

Filters are used in a Model Viewer in order to hide a certain number of nodes within the viewer display. Since the Model Viewer is a visual representation of the API element model, either Selena elements or various element relationships can be used for filtering purposes.

All viewer filters of this type implement the Ifilter interface (from the package com.tssap.selena.model.extension).

 

Filter implementations have the following characteristics::

 

·         Filters can be inverted (inverse filters)

 

·         Filters can be queried, on the one hand, for general availability of Property, PropertyMap, UniqueName or ReferenceContainer, and, on the other hand, for availability of navigation paths (parent, child entity,...).

 

·         Several filters can be combined to filter sets.  Default implementations for such filter sets are available. These can define OR and AND relationships. 

 

Example

Display of Web projects as part of a J2EE View .