The Coverage: Item -> item view can be configured to suit specific meta models or needs and you can configure several mapping cases. The configuration is done in the Configure the explorer dialog, accessible from the File tab. The Item view class name is TPluginYYYCoverageItemToItem. 



Prerequisites

  • Familiarity with SystemWeaver concepts such as Items, Parts and Attributes
  • Knowledge of XML
  • An installation of the SystemWeaver swExplorer client (swExplorer)
  • Assignment of the SW Architect role in the server


The data pattern supported by this view is for creating mapping between two different structures - one that holds items and the other that contains parts to those items. This are mapped together by a newly created part.



Example Meta Model


Example XML

<CoverageViewConfigs>

<CoverageViewConfig id="unique_id">
<ViewSettings>
<Caption>Coverage: item->item</Caption>
<RibbonGroup>Coverage</RibbonGroup>
<Description>Hint shown in the ribbon</Description>
</ViewSettings>

<Parameters>
<Parameter caption="Vehicle" name="p1">
<Values>
<ForEachPart type="IRRS">
<DefObj>
<AddValue/>
</DefObj>
</ForEachPart>
</Values>
</Parameter>
</Parameters>

<TopItemType itemType="TEST"/>
<LeftOwner itemType="I" partType="PRT"/>
<CompleteRightSide select="$p1/REDC/IBRA/3SBH"/>

<Mappings>
<Mapping fromType="TECA" partType="TCRE" toType="REQ"/>
</Mappings>

<UIMessages>
<UIMessagePrimaryItemName>Pin</UIMessagePrimaryItemName>
<UIMessageSecondaryItemName>SASC</UIMessageSecondaryItemName>
</UIMessages>

<RightSide>
<ContextTree>
<Columns>
<MappedToIndicatorColumn/>
<ItemNameColumn width="250"/>
<MappedStatusColumn/>
<MappedToColumn/>
</Columns>
<Context>
<AddParts owner="main" sid="ITSI" part="specif" defobj="spec"/>
<AddParts owner="spec" sid="ITFC" part="fc" defobj="fuco"/>
<AddParts owner="fuco" sid="IDRE" part="rq" defobj="req"/>
</Context>
<Tree startGroup="spec">
<Case group="spec" go="/fc"/>
<Case group="fuco" go="/rq"/>
</Tree>
</ContextTree>

<!--Grid>
<Columns>
<MappedToIndicatorColumn/>
<ItemNameColumn width="250" icon="true"/>
<MappedStatusColumn/>
<MappedToColumn/>
<ItemAttributeColumn type="AUID" width="100"/>
</Columns>
<ForEachPart type="ITSI">
<DefObj>
<Row/>
</DefObj>
</ForEachPart>
</Grid-->

<!--StructureTree>
<Columns>
<MappedToIndicatorColumn/>
<ItemNameColumn width="250" icon="true"/>
<MappedStatusColumn/>
<MappedToColumn/>
<ItemAttributeColumn type="AUID" width="100"/>
</Columns>
<ViewName>Requirements</ViewName>
<TopItemPath>/ITSI</TopItemPath>
</StructureTree-->
<!--StructureTree>
<Columns>
<MappedToIndicatorColumn/>
<ItemNameColumn width="250" icon="true"/>
<MappedStatusColumn/>
<MappedToColumn/>
<ItemAttributeColumn type="AUID" width="100"/>
</Columns>
<ShouldShowSids>ITEC;ITRQ</ShouldShowSids>
</StructureTree-->

</RightSide>

<LeftStructureTree partTypes="TESP;SPRE" topItemPath="$p1/IRRS"/>
<AdditionalLeftItemAttributes sids=""/>
</CoverageViewConfig>

</CoverageViewConfigs>


Explanation of the Configuration Elements

The <CoverageViewConfigs> and <CoverageViewConfig> elements build the structure of the configuration and the individual configurations. The id attribute identifies the specific configuration, and should be a string value and unique among the different <CoverageViewConfig> elements.


<ViewSettings> enables you to set custom view labels, hovertips, images, etc. See How to Configure Item View Menu Button Settings.


The optional <Parameters> give access to a specific item, either in the structure below the specific <TopItem>, or any of its references. See Parameters in the application Help for more information.


The <TopItemType> defines the item type of which the configuration applies to. itemType specifies the SID of the item type. This definition is required.


The <LeftOwner> defines the itemType of the left top item and the partType specifies the part type of items to be included in the left-hand side list. The left side displays as an item structure tree. This must be included if users are to be allowed to Map to New in the view.


The optional <CompleteRightSide> is to be used when a filtration of what is seen has been done, e.g., by utilizing the <Parameter> value. The <CompleteRightSide> provides the full scope of the right side to the view upon loading. This means that if the right side has been filtered in some way, the complete scope given by the <CompleteRightSide> will be used when calculating for any Faulty Mappings, thus not listing any correct mappings as Faulty.


<Mappings> specifies the part types for the allowed mappings. The view supports multiple mapping types, and a part type is specified for each.   


The <Mapping> specifies the properties of the mapping part, which are fromType specifying the part's owner item SID, partType specifying the mapping part SID and toType specifying the part's defobj item SID.


<UIMessages> tag enables customization of labels for primary (left-hand side) and secondary (right-hand side) item names.

  • <UIMessagePrimaryItemName> specifies the label of the left-hand side item list.
  • <UIMessageSecondaryItemName> specifies the label of the right-hand side item list.



The <RightSide> element defines the content of the right-hand side of the view. This content can be defined in three alternative ways: 

  1. Using a <ContextTree> tag to build a so-called context tree according to a context definition. A context tree definition uses a SystemWeaver context as a basis for building a tree. Refer to SystemWeaver Contexts, and Context trees in the application Help for details.
  2. Using a <Grid> tag to build a grid. The grid definition can use all tags available to a Grid view. Refer to XML Tag Reference - Grid specific in the application Help for details. 
  3. Using a <StructureTree> tag to build an item structure tree. The item structure tree uses the <ViewName> element to specify which structure tree view to be used, as described in Configuring Tree View Settings.

There are three custom columns and one standard column that are mandatory in the column definitions in the <RightSide> element. They are:

  • <MappedToIndicatorColumn/> custom column adds the "Indicator" column.
  • <MappedStatusColumn/> custom column adds the "Mapped" column, which is the mapping status.
  • <MappedToColumn/> custom column adds "To" column, which contains a number of mapped-to items. 
  • <ItemNameColumn/> standard column adds "Name" column, which contains the name of items. 

More standard columns can be added if needed. The order of columns in the configuration will determine their order in the UI.


The <LeftStructureTree> identifies the part types to be shown in the left-hand side structure tree and the partTypes specifies the part SID to be viewed separated by semicolon. The topItemPath attribute is optional and determines the path to the top item in the left structure tree, which is used when specifying <Parameter>.

Example:  <LeftStructureTree partTypes="TESP;SPRE" topItemPath="$p1/IRRS"/>


The <AdditionalLeftItemAttributes> defines attributes to be used in the left-hand side structure tree and sids specifies the attribute SIDs separated by semicolon.