The Coverage view (mapping item) 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 TPluginYYYCoverageNoContext.



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 to create a mapping item based on the existence of ONE primary item, referred to as the left item because it appears on the left-hand side of the view, and one or more secondary item(s), referred to as the right item(s) because they appears on the right-hand side of the view. 


The view supports the creation of only one mapping item type. The mapping item can point into one or more left item types and one or more right item types.


Example Meta Model


Example XML

<!-- 
This view contains 3 custom columns:

   <MappedToIndicatorColumn/>,
   <MappedStatusColumn/>
   <MappedToColumn/>

that are mandatory to use in the column definitions on both left and right side.
-->
<CoverageMappingItemConfigs>
    <CoverageMappingItemConfig id= "unique_idd">
        <ViewSettings>
            <Caption>Requirement mapping</Caption>
            <RibbonGroup>Mapping</RibbonGroup>
            <Description>hist shown in the ribbon</Description>
            <Image guiImage="72"/>
        </ViewSettings>
        <TopItem itemType="BIDM"/>
        <LeftStructureTreeEditableParts partTypes="IBRA;3SBH"/>
        <RightStructureTreeEditableParts partTypes="IXRQ;IXRR"/>
        <FaultyMappingsBorder visible="True" />
		
        <Mappings distinctMappingPerPair="true">
            <PathFromMainToMappingContainer select="/DEPA/AIML" />
            <MappingItem itemType="BIRM" partType="IRMM" />
            <LeftMapping itemType="CRES" partType="EXRE" />
            <LeftMapping itemType="RERQ" partType="EXRM" />
            <RightMapping itemType="RRQ2" partType="INRM" />
            <RightMapping itemType="RRX" partType="INRX" />
        </Mappings>
		
        <LeftSide>
            <StructureTree>
                <Columns>
                    <MappedToIndicatorColumn/>
                    <ItemNameColumn  width="250"/>
                    <MappedStatusColumn/>
                    <MappedToColumn/>
                    <ItemStatusColumn/>
                    <ItemAttributeColumn type="ABAN" width="100" caption="Annotation"/> 
                </Columns>
                <ShouldShowSids>FUPA;REDC;IBRA;3SBH</ShouldShowSids>
                <ExpandLevel>5</ExpandLevel>
            </StructureTree>
        </LeftSide>
		
        <RightSide>
            <StructureTree>
                <Columns>
                    <MappedToIndicatorColumn/>
                    <ItemNameColumn width="250"/>
                    <MappedStatusColumn/>
                    <MappedToColumn/>
                    <ItemStatusColumn/> 
                    <ItemAttributeColumn type="ABAN" width="100" caption="Annotation"/>                                        
                </Columns>
                <ShouldShowSids>DEPA;DEDS;IXRQ;IXRR""</ShouldShowSids>
                <ExpandLevel>5</ExpandLevel>
            </StructureTree>
        </RightSide>

        <ShowStructure>
            <Visible>True</Visible>
            <ContextGroup>main</ContextGroup>
            <ShouldShowPartTypes>
                <PartType>FUPA</PartType>
                <PartType>REDC</PartType>
                <PartType>IBRA</PartType>
                <PartType>3SBH</PartType>
            </ShouldShowPartTypes>
        </ShowStructure>

        <UIMessages>
            <UIMessageLeftItemName>Function requirement</UIMessageLeftItemName>
            <UIMessageRightItemName>Design requirement</UIMessageRightItemName>
            <UIMessageNotMapped>Not mapped</UIMessageNotMapped>
            <UIMessageNotInLeft>Not in Function requirement</UIMessageNotInLeft>
            <UIMessageNotInRight>Not in Design requirement</UIMessageNotInRight>
            <UIMessageVersionInconsistency>!Version</UIMessageVersionInconsistency>
        </UIMessages>
    </CoverageMappingItemConfig>
</CoverageMappingItemConfigs>

Explanation of the Configuration Elements

The <CoverageMappingItemConfigs> and <CoverageMappingItemConfig> 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 <CoverageMappingItemConfig> elements.


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


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


The <LeftStructureTreeEditableParts> identifies the editable part types to be shown in the left-hand side structure tree. partTypes specifies the part SID of the editable part types separated by semicolon. This option is only available when using StructureTree, and not Grid or ContextTree.


The <RightStructureTreeEditableParts> identifies the editable part types to be shown in the right-hand side structure tree. partTypes specifies the part SID of the editable part types separated by semicolon. This option is only available when using  StructureTree, and not Grid or ContextTree.


Using <LeftStructureTreeEditableParts> and/or <RightStructureTreeEditableParts> will result in adding four options to the menu options, which are New, Add, Remove part(s) and New Version - and Replace.



The optional <FaultyMappingsBorder> identifies the visibility of the faulty mapping red border. visible specifies the visibility of the red border for faulty mapping and the allowed values are "True" or "False". The default value is "False", meaning that if this tag is missing the red border will not display. See the example below of when the red border is visible.



<Mappings> specifies the properties of the mapping item. Note that only one mapping item type is allowed. The properties of the mapping item are path from main To mapping container, mapping item, left mapping(s) and right mapping. <Mappings> has one optional distinctMappingPerPair attribute which determines if each pair should have a distinct mapping. A "true" value enforces 1:1 relation and will always create a new mapping item for the selected pairs. A "false" value enforces replacement for the existing left mapping item. The default is "false".    

  • The <PathFromMainToMappingContainer> specifies the path from TopItem to mapping container, where the mapping items will be added, using a path query. select specifies a path query using the Path query methods. Note that the result of the PathFromMainToMappingContainer should be only ONE item and if the result is a list of mapping containers, the end user well get an error.
  • The <MappingItem> defines the mapping item properties, which are itemType and partType. The itemType attribute is the SID of the mapping item type. The partType attribute is SID of the part from MappingContainer to MappingItem. If the mapping items added directly under the TopItem, without MappingContainer, then the partType is the SID from TopItem to MappingItem. 
  • The <LeftMapping> defines the primary, left item properties, which are itemType and partType. The attribute itemType is the SID of the left item type. The attribute partType is SID of the part from MappingItem type to LeftMapping type. The view supports one or more LeftMapping item types.
    Note: The LeftMapping primary partType must have Multiplicity set to "Single", otherwise you will not be able to save your configuration and a "Left mapping part sid requires multiplicity single: ASID" will display. Multiplicity is set in the meta model using the swArchitect client. If the part has Multiplicity set to "List", it can be refactored to "Single" using the swArchitect. 
  • The <RightMapping> defines the secondary, riht item properties, which are  itemType and partType. The attribute itemType is the SID of the right item type. The attribute partType is SID of the part from MappingItem type to RightMapping type. The view supports one or more RightMapping item types.


The <LeftSide> element defines the content of the left-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, or  <ShouldShowSids> with one or more part SIDs separated by semicolons.


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, or  <ShouldShowSids> with one or more part SIDs separated by semicolons.


In both the <LeftSide> and <RightSide> element when using any alternative (ContextTree, Grid or StructureTree), there are three custom columns that are mandatory to use in the column definitions. They are:

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



The optional <ShowStructure> enables showing the structure when selecting a secondary item type (right item) in the main tree structure. The default is hidden, meaning that if this tag is missing, the "Show structure" option will not display.


  • <Visible> identifies the visibility of the option in the UI. The allowed value is True/False. 
  • <ContextGroup> specifies the starting group. The allowed value is main, which is equal to TopItem.
  • <ShouldShowPartTypes> grouping the part type to be shown. 
  • <PartType> identifies the part SID to be shown.


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

  • <UIMessageLeftItemName> specifies the label of the left-hand side item list.
  • <UIMessageRightItemName> specifies the label of the right-hand side item list.
  • <UIMessageNotMapped> specifies the label of the not mapped items. 
  • <UIMessageNotInLeft> specifies the label of the items out side the scope of the left-hand side item list.
  • <UIMessageNotInRight> specifies the label of the items out side the scope of the right-hand side item list.
  • <UIMessageVersionInconsistency> specifies the label of the items with version inconsistency.



The view also supports the use of Parameters. The tag is added, as usual, directly at the top of the individual xml configuration and gives parameter values available globally for the entire view.


Parameter Example

<CoverageMappingItemConfig id= "unique_idd2p">
    <ViewSettings>
        <Caption>Requirement mapping</Caption>
        <RibbonGroup>Mapping</RibbonGroup>
    </ViewSettings>
    <TopItem itemType="BIDM"/>
    <Parameters>
        <Parameter name="p1" caption="Parameter">
            <Values>
                <ForEach select="/REQS">
                    <AddValue/>
                </ForEach>
            </Values>
        </Parameter>
    </Parameters>
    <Mappings>
        <PathFromMainToMappingContainer select="$p1/DEPA/AIML" />
        ....
    </Mappings>
    <LeftSide>
        <Grid>
            <Columns>
                ....
            </Columns>
            <ForEach select="$p1">
                <Row/>
            </ForEach>
        </Grid>
        <StructureTree>
            <TopItemPath>$p1/IGRF</TopItemPath>
        </StructureTree>
        <ContextTree>    
            <Context>
                <AddParts owner="main" sid="PM1P" part="PrimaryMappings" defobj="PrimaryMapping"/>
                <AddParts owner="$p1" sid="IGRP" part="PrimaryMappings" defobj="PrimaryMapping"/>
            </Context>
        </ContextTree>
    </LeftSide>
    <RightSide>
        ....
    </RightSide>
</CoverageMappingItemConfig>


What's Next?

Take a look at some additional configuration examples.