Main Content

add

Class: slreq.Justification
Namespace: slreq

Add child justification

Syntax

childJustification = add(jt)
childJustification = add(jt,PropertyName,PropertyValue,...,PropertyNameN,PropertyValueN)

Description

childJustification = add(jt) adds a child justification to the justification object jt.

childJustification = add(jt,PropertyName,PropertyValue,...,PropertyNameN,PropertyValueN) adds a child justification with the additional properties specified by PropertyName and PropertyValue.

Input Arguments

expand all

Justification, specified as an slreq.Justification object.

Justification property name, specified as an string scalar or a character vector.

For more information, see slreq.Justification properties.

Justification property value, specified as an string scalar or a character vector.

Output Arguments

expand all

New child justification, returned as an slreq.Justification object.

Examples

expand all

This example shows how to add a child justification under another justification.

Load a requirement set file called My_Requirement_Set_1.

rs = slreq.load('C:\MATLAB\My_Requirement_Set_1.slreqx');

Add a justification to the requirement set.

jt = addJustification(rs,"Id","J1",...
"Summary","Non-functional requirement justification");

Add a child justification to the justification jt.

childJt = add(just1,"Id","J1.1",...
"Summary","Justification for non-functional requirement")
childJust1 = 

  Justification with properties:

              Id: 'J1.1'
         Summary: 'Justification for non-functional requirement'
     Description: ''
        Keywords: [0×0 char]
       Rationale: ''
       CreatedOn: 25-Aug-2017 11:21:29
       CreatedBy: 'John Doe'
      ModifiedBy: 'Jane Doe'
             SID: 11
    FileRevision: 2
      ModifiedOn: 25-Aug-2017 14:00:29
           Dirty: 0
        Comments: [0×0 struct]

Tips

  • To add a top-level requirement to a requirement set, use the add method of slreq.ReqSet. To add a requirement as a child of another requirement, use the add method of slreq.Requirement. To add a referenced requirement as a child of another referenced requirement, use the add method of slreq.Reference.

Version History

Introduced in R2018b