public class LinkSpec
extends java.lang.Object
Class representing a link specification between the two nodes of a reduction rule,
and that is capable of recognizing if a given Alarm matches the reduction
rule definition, considering that the latter might include patterns (e.g.,
'a*b') for both fault-family and fault-member
fields on the reduction rule parent node.
Reduction rules that include patterns must obey the following rule:
NODE RRs, a single parent (cause) has several children (effects).
Therefore, the RR might include patterns only for the children alarm definition.
MULTIPLICITY RRs, a single child (synthetic alarm) reduces a set
of alarms that relate somehow (causes). Therefore, the RR might include patterns only
for the parent alarm definition.
This rules does not mean that errors will appear if a pattern expression is present where
it shouldn't; no error will occur, but instead the pattern will be treated as an ordinary string.
For example, if the user specifies a fault family DV*, it will not match all
fault families DV01, DV02, ..., but instead it will match
the fault family named DV*.
| Modifier and Type | Field and Description |
|---|---|
AlarmRefMatcher |
_child |
boolean |
_isMultiplicity |
AlarmRefMatcher |
_parent |
| Constructor and Description |
|---|
LinkSpec(ReductionLinkType link) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isMultiplicity() |
boolean |
matchChild(Alarm child)
Reports if a given Alarm matches as a child, based on the patterns
present in the reduction rule's child definition.
|
boolean |
matchParent(Alarm parent)
Reports if a given Alarm matches as a parent, based on the patterns
present in the reduction rule's parent definition.
|
java.lang.String |
toString() |
public final AlarmRefMatcher _parent
public final AlarmRefMatcher _child
public final boolean _isMultiplicity
public boolean matchParent(Alarm parent)
parent - The alarm to be checked as occupying the parent role in the reduction rulepublic boolean matchChild(Alarm child)
child - The alarm to be checked as occupying the child role in the reduction rulepublic boolean isMultiplicity()
public java.lang.String toString()
toString in class java.lang.Object