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>

    <TopItemType itemType="TEST"/>
    <LeftOwner itemType="TEST" partType="PRT"/>

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

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

    <RightSide>

      <ContextTree>

        <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>
          <ItemNameColumn width="200"/>
          <ItemAttributeColumn type="AUID" width="100"/> 
           <PartAttributeColumn type="ABA2" readOnly="False"/>      
        </Columns>                      
        <ForEachPart type="ITSI">
          <DefObj>
            <Row/>
          </DefObj> 
        </ForEachPart>
      </Grid-->

      <!--StructureTree>
        <ViewName>Requirements</ViewName>
        <TopItemPath>/ITSI</TopItemPath>
      </StructureTree-->

      <!--StructureTree>
        <ShouldShowSids>ITEC;ITRQ</ShouldShowSids>
      </StructureTree-->
    </RightSide>  
    <LeftStructureTree partTypes="PRT;TCRE"/>
    <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 <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.


<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.


The optional <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.

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