Create and Edit Attribute Mappings
The ReqIF™ format represents a requirement as aSpecObject
. TheSpecObject
has aSpecObjectType
, which defines attributes to store requirements information. TheSpecObjects
contains values for these attributes.
After you import requirements from a ReqIF file, you can customize how attributes from ReqIF requirements map toRequirements Toolbox™requirement properties and custom attributes. For more information, seeAdd Custom Attributes to Requirements. You can also save this mapping for reuse.
Edit the Attribute Mapping for Imported Requirements
You can import requirements from ReqIF files in theRequirements Editor. For more information, seeImport Requirements from ReqIF Files.
When you import requirements from ReqIF files, you must choose an import mapping to use. The imported requirement type, properties, and imported link type depend on the import mapping that you choose. For more information, seeChoosing an Import Mapping.
After you import requirements from a ReqIF file, you can edit the attribute mapping for the imported requirements:
Open theRequirements Editorand import the ReqIF file. For more information, seeImport Requirements from ReqIF Files.
Select the Import node or the top-level requirement, depending on if you imported referenced requirements or requirements. For more information, seeSelect an Import Mode.
You can see the attribute mappings in theDetailspane, underAttribute Mapping.
Edit the mapping by selecting a property or attribute from the drop-down in theMapped Tocolumn.
Note
When editing the attribute mapping, you can only map an attribute to a built-in requirement type. You cannot select a custom attribute from the drop-down in theMapped Tocolumn.
You can save the current attribute mapping by clickingSave mapping. The mapping saves as an XML file. You can load a saved mapping by clickingLoad mapping.
To change the name or description of the attribute mapping, open the XML file that you created in a text editor and modify the values of the
and
tags.
To haveRequirements Toolboxselect the import attribute mapping based on the tool that originally created the ReqIF file:
In a text editor, open the attribute mapping and the ReqIF file.
Find the value of the
tag in the ReqIF file.Change the value of the
tag in the attribute mapping file to match the value of the
tag.
Specify DefaultReqIFRequirement Type
Some external requirements management tools, such as Polarion™, support multiple types of requirements. In this case, modify the attribute mapping file to specify the default ReqIF requirement type to use when exporting to ReqIF. For example:
SpecObject System Requirement
tag indicates that each exportedSpecObject
will have theSpecObject
type asSystem Requirement
.
SpecifyReqIFTemplate
Some external requirements management tools, such as Polarion and IBM®理性的®DOORS®, require a specific set of ReqIF data type, attribute, andSpecObject
type definitions. They may also require that the ReqIF specification be of a certain type. You can supply these definitions by specifying the name of a template ReqIF file in the mapping file produced by the external requirements management tool. During ReqIF export,Requirements Toolboximports the template file and uses it to generate and export a ReqIF file with a format that is compatible with the external tool.
Save the template files in the same folder as the attribute mapping file,matlabroot/toolbox/slrequirements/attribute_maps
. To specify a template file in the attribute mapping, open the attribute mapping file that corresponds to the external requirements management tool in a text editor. Modify the value of the
tag to match the name of the template file. You might need to restart MATLAB®能够选择资源的映射文件ting Requirements dialog.