Analysis Type
Maps a pattern and allocates fields to a traceability element:
- Creates entity, attribute, or link when found during exploration and pattern matches
- Specifies constant properties
- Follows an implicit traceability hierarchy based on parent/children
pattern
Content
|
Properties
|
- Literal value
- Regular expression
- Choice
- Sequence
- Reference definition
- Analysis type
- Rule
- Capture fields: entity, link, attribute
- Variable
|
- Type (name for the analysis)
- Object types:
- Optional:
|
Analysis Type: Display
The optional display setting replaces the entity title in the
traceability graphical view. When the display setting is not specified, the
identifier, label or both (if both exist) are displayed.
- Display Syntax
- The display expression is decomposed in different tokens:
- $i: identifier
- $l: label
- $t: type
- ${attribute}: attribute value
- $$: $ (for dollar symbol display)
- Any other character preceded by $ is ignored
- Other text is printed as is
Leading and trailing texts are always printed.
Separator texts are printed only when the next field is not
empty.
- Display Example
- Considering the following display expression:
XX $i - $l #${Version} YY
The result is:
ID
|
Label
|
Version
|
Result
|
REQ001
|
|
|
XX REQ001 YY
|
REQ001
|
Title
|
|
XX REQ001 - Title YY
|
REQ001
|
Title
|
A
|
XX REQ001 - Title #A YY
|
|
Chapter 1
|
A
|
XX Chapter 1 #A YY
|
Rule
Defines properties on a traceability element. Allocates fields
or variables with conditionality.
Content
|
Properties
|
- Literal value
- Regular expression
- Choice
- Sequence
- Reference definition
- Analysis type
- Rule
- Capture fields: entity, link, attribute
- Variable
|
Optional: Setters
- Set flag
- Entity flag
- Attribute flag
- Link flag
- Set string
- Set string format
For more information, see Setters for Analysis Types and Rules. |
Entity, Attribute, Link Fields
Applicable to the nearest parent analysis type.
Content
|
Properties
|
None
|
- Entity field: Identifier, label, text, or type
- Attribute field: Name or value
- Link field: Source, target, or type
|
Variable
Applicable to the whole pattern schema when executing the pattern on a
document.
Content |
Properties |
None
|
Variable: Name |
Note:
Variables can be used as content in many pattern types. For more information,
see Pattern Elements Overview.Usually, they are used in a
string format, with other variables. For more information, see String Format
below.
Setters for Analysis Types and Rules
Allocates a field (depending on its position) to a traceability element.
Content |
Properties |
- Entity field
- Attribute field
- Link field
- Variable
|
A value |
Setter Creation
To create a setter:
- Select an analysis type or rule.
- From the context bar, click Create Setter
.
- Select the allocation type, the field to be allocated and a value:
Allocation Type |
Allocated Field |
Value |
Set Flag |
Flag |
True ou False |
Set String |
Field or variable |
Field or variable |
Set String Format |
Field or variable |
Formatted string |
Multiple Flags on Attribute
If the Multiple flag is false or not specified, the
pattern is not able to capture multiple values for the same attribute. Only the
last encountered value is assigned to the parent node.
If the Multiple flag is true, the pattern accumulates all
the values that are encountered for the same attribute name under the same node.
Here are few examples:
Use Case |
Result (Allocation) |
Comment |
- Attribute: Allocation
- Multiple=true
- Occurrence 1
- Occurrence 2
|
A, B |
The multiple values are cumulated under a
single occurrence of the same attribute with multiple
enabled (multiple=true). |
- Occurrence 1
- Attribute: Allocation
- Multiple=true
- Captures: A
- Occurrence 2
- Attribute: Allocation
- Multiple=true
- Captures: B
|
A, B |
The multiple values are cumulated for
consecutive attributes with same name and multiple enabled
(multiple=true). |
- Occurrence 1
- Attribute: Allocation
- Multiple=true
- Captures: A
- Occurrence 2
- Attribute: Allocation
- Multiple=false
- Captures: B
- Occurrence 3
- Attribute: Allocation
- Multiple=true
- Captures: C
|
B, C |
The previous values are discarded as soon as a value is captured and
multiple is disabled (multiple=false). However, it does
not prevent from capturing other values afterward.
|
String Format
- String Format Usage
- The string format can be applied on:
- An analysis type to produce a formatted string with captured
variables.
- A rule to assign this string to any field (indent, label, text,
source, target) or to a variable.
Variables can be added at the same location as the fields with the
Create Pattern command. Once a variable
is assigned, the corresponding value can be used anywhere during the
pattern analysis. For more information, see Variable.
- String Format Syntax
-
The string format is decomposed in different tokens:
- ${variable}: the variable value
- $$: $ (for dollar symbol display)
- Any other character preceded by $ is ignored
- Other text considered as a separator is printed as is
Leading and trailing texts are always printed.
Separator texts are printed only when the next field is not empty.
- String Format Example
Considering the following format expression: XX $(A) - $(B) #${C} YY The result is:
A |
B |
C |
Result |
REQ001 |
|
|
XX REQ001 YY |
REQ001 |
Title |
|
XX REQ001 - Title YY |
REQ001 |
Title |
A |
XX REQ001 - Title #A
YY |
|
Chapter 1 |
A |
XX Chapter 1 #A YY |
|