Class DelegatingMessageVisitor<T extends MessageVisitor>

java.lang.Object
ca.uhn.hl7v2.model.DelegatingMessageVisitor<T>
All Implemented Interfaces:
MessageVisitor
Direct Known Subclasses:
MessageVisitors.PopulatedVisitor, MessageVisitors.StructuresVisitor

public class DelegatingMessageVisitor<T extends MessageVisitor> extends Object implements MessageVisitor
Delegates all visit method calls to the wrapped MessageVisitor. This class can be used
  • Field Details

    • LOG

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

    • DelegatingMessageVisitor

      public DelegatingMessageVisitor(T delegate)
      Parameters:
      delegate - MessageVisitor to which all calls are delegated to
  • Method Details

    • getDelegate

      public T getDelegate()
      Returns:
      MessageVisitor to which all calls are delegated to
    • 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