Class AbstractMessageRule

java.lang.Object
ca.uhn.hl7v2.validation.impl.RuleSupport<Message>
ca.uhn.hl7v2.validation.impl.AbstractMessageRule
All Implemented Interfaces:
MessageRule, Rule<Message>, Serializable
Direct Known Subclasses:
ChoiceElementsRespectedRule, ConformanceProfileRule, OnlyAllowableSegmentsInSuperstructureRule, OnlyKnownSegmentsRule, PredicateMessageRule, VisitorMessageRule, WrongVersionRule

public abstract class AbstractMessageRule extends RuleSupport<Message> implements MessageRule
Abstract base class for message rules
Author:
Christian Ohr
See Also:
  • Constructor Details

  • Method Details

    • test

      Description copied from interface: MessageRule
      Tests the given (fully populated) message against the criteria defined by this rule class.
      Specified by:
      test in interface MessageRule
      Parameters:
      msg - message to be tested
      Returns:
      a list of exceptions indicating points at which the given message failed to validate (empty if validation succeeds; may not be a complete list as testing may be aborted after failure). The list should be empty if this rule is evaluated against a type of message to which it doesn't apply.