Class MessageVisitorSupport

java.lang.Object
ca.uhn.hl7v2.model.MessageVisitorSupport
All Implemented Interfaces:
MessageVisitor
Direct Known Subclasses:
ValidatingMessageVisitor

public class MessageVisitorSupport extends Object implements MessageVisitor
Base MessageVisitor implementation that just logs each call with TRACE level
  • Field Details

    • LOG

      protected static final org.slf4j.Logger LOG
  • Constructor Details

  • Method Details

    • start

      public boolean start(Message message) throws HL7Exception
      Description copied from interface: MessageVisitor
      Enters a message
      Specified by:
      start in interface MessageVisitor
      Parameters:
      message - message
      Returns:
      true if the visitor shall descend into the nested structures
      Throws:
      HL7Exception - if an error occurred while visiting
    • end

      public boolean end(Message message) throws HL7Exception
      Description copied from interface: MessageVisitor
      Leaves a message
      Specified by:
      end in interface MessageVisitor
      Parameters:
      message - message
      Returns:
      true if the visitor shall descend into the nested structures
      Throws:
      HL7Exception - if an error occurred while visiting
    • start

      public boolean start(Group group, Location location) throws HL7Exception
      Description copied from interface: MessageVisitor
      Enters a group (or message)
      Specified by:
      start in interface MessageVisitor
      Parameters:
      group - group
      location - Location object describing the location within the message
      Returns:
      true if the visitor shall descend into the nested structures
      Throws:
      HL7Exception - if an error occurred while visiting
    • end

      public boolean end(Group group, Location location) throws HL7Exception
      Description copied from interface: MessageVisitor
      Leaves a group (or message)
      Specified by:
      end in interface MessageVisitor
      Parameters:
      group - group
      location - Location object describing the location within the message
      Returns:
      true if the visitor shall continue visiting the parent structure
      Throws:
      HL7Exception - if an error occurred while visiting
    • start

      public boolean start(Segment segment, Location location) throws HL7Exception
      Description copied from interface: MessageVisitor
      Enters a segment
      Specified by:
      start in interface MessageVisitor
      Parameters:
      segment - segment
      location - Location object describing the location within the message
      Returns:
      true if the visitor shall descend into the nested structures
      Throws:
      HL7Exception - if an error occurred while visiting
    • end

      public boolean end(Segment segment, Location location) throws HL7Exception
      Description copied from interface: MessageVisitor
      Leaves a segment
      Specified by:
      end in interface MessageVisitor
      Parameters:
      segment - segment
      location - Location object describing the location within the message
      Returns:
      true if the visitor shall continue visiting the parent structure
      Throws:
      HL7Exception - if an error occurred while visiting
    • start

      public boolean start(Field field, Location location) throws HL7Exception
      Description copied from interface: MessageVisitor
      Enters a field. Note that a field is *not* a physical part of the HAPI model class hierarchy; it merely encapsulates all repetitions of a specific field along with its substructures.
      Specified by:
      start in interface MessageVisitor
      Parameters:
      field - field
      location - Location object describing the location within the message
      Returns:
      true if the visitor shall descend into the nested structures
      Throws:
      HL7Exception - if an error occurred while visiting
    • end

      public boolean end(Field field, Location location) throws HL7Exception
      Description copied from interface: MessageVisitor
      Leaves a field. Note that a field is *not* a physical part of the HAPI model class hierarchy; it merely encapsulates all repetitions of a specific field along with its substructures.
      Specified by:
      end in interface MessageVisitor
      Parameters:
      field - field
      location - Location object describing the location within the message
      Returns:
      true if the visitor shall continue visiting the parent structure
      Throws:
      HL7Exception - if an error occurred while visiting
    • start

      public boolean start(Composite type, Location location) throws HL7Exception
      Description copied from interface: MessageVisitor
      Enters a composite
      Specified by:
      start in interface MessageVisitor
      Parameters:
      type - composite
      location - Location object describing the location within the message
      Returns:
      true if the visitor shall descend into the nested structures
      Throws:
      HL7Exception - if an error occurred while visiting
    • end

      public boolean end(Composite type, Location location) throws HL7Exception
      Description copied from interface: MessageVisitor
      Leaves a composite
      Specified by:
      end in interface MessageVisitor
      Parameters:
      type - composite
      location - Location object describing the location within the message
      Returns:
      true if the visitor shall continue visiting the parent structure
      Throws:
      HL7Exception - if an error occurred while visiting
    • visit

      public boolean visit(Primitive type, Location location) throws HL7Exception
      Description copied from interface: MessageVisitor
      Visits a primitive
      Specified by:
      visit in interface MessageVisitor
      Parameters:
      type - primitive
      location - Location object describing the location within the message
      Returns:
      true if the visitor shall descend into the nested structures
      Throws:
      HL7Exception - if an error occurred while visiting