Class Field

java.lang.Object
ca.uhn.hl7v2.model.Field
All Implemented Interfaces:
Visitable

public class Field extends Object implements Visitable
Field is a auxiliary model class only created while visiting parts of the message.
  • Constructor Details

    • Field

      public Field(Type[] reps, int maxCardinality)
  • Method Details

    • accept

      public boolean accept(MessageVisitor visitor, Location currentLocation) throws HL7Exception
      Description copied from interface: Visitable
      Callback method for the visitor. This method is supposed to either directly call one of the visitors methods, passing this as parameter, or traverse through a hierarchical substructure and call accept(MessageVisitor) for each visited element.
      Specified by:
      accept in interface Visitable
      Parameters:
      visitor - MessageVisitor instance to be called back
      currentLocation - location of this object
      Returns:
      true if the visit process shall continue
      Throws:
      HL7Exception - if a problem occurred during visiting
    • provideLocation

      public Location provideLocation(Location parentLocation, int index, int repetition)
      Description copied from interface: Visitable
      Reusing the location of this object's parent, this method returns its own location within the message.
      Specified by:
      provideLocation in interface Visitable
      Parameters:
      parentLocation - the parents location
      index - index of this object
      repetition - repetition of this object
      Returns:
      this objects location
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: Visitable
      Returns true if this Visitable has actual content
      Specified by:
      isEmpty in interface Visitable
      Returns:
      true if Visitable is empty