ca.uhn.hl7v2.parser
Class SegmentPointer

java.lang.Object
  extended by ca.uhn.hl7v2.parser.Pointer
      extended by ca.uhn.hl7v2.parser.SegmentPointer

Deprecated. PipeParser now uses MessageIterator

public class SegmentPointer
extends Pointer

A SegmentPointer is used when parsing traditionally encoded HL7 messages. It acts as a placeholder for a unique segment "slot" in a message structure. There is one SegmentPointer per unique segment path (even if the segment repeats, and regardless of whether any instances exist).

Author:
Bryan Tripp (bryan_tripp@sourceforge.net)

Field Summary
 
Fields inherited from class ca.uhn.hl7v2.parser.Pointer
FILL_FAILED_FULL, FILL_FAILED_OUT_OF_ORDER, FILL_FAILED_WRONG_SEGMENT, FILL_OK, position
 
Constructor Summary
SegmentPointer(PipeParser parser, Group parent, int position, EncodingCharacters encodingChars)
          Deprecated. Creates new SegmentPointer
 
Method Summary
 int setSegment(java.lang.String segment, boolean correctOrder)
          Deprecated. Parses the given String, which must contain a single traditionally encoded message segment, into the current repetition of the message Structure underlying this Pointer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SegmentPointer

public SegmentPointer(PipeParser parser,
                      Group parent,
                      int position,
                      EncodingCharacters encodingChars)
               throws HL7Exception
Deprecated. 
Creates new SegmentPointer

Parameters:
parser - the PipeParser used to parse segments
parent - the Group object that would be the parent of any instances of the Segment underlying this SegmentPointer
position - the position (among siblings; from 0) of the underlying Segment
encodingChars - array of encoding characters, starting w/ field delim
Throws:
HL7Exception
Method Detail

setSegment

public int setSegment(java.lang.String segment,
                      boolean correctOrder)
               throws HL7Exception
Deprecated. 
Parses the given String, which must contain a single traditionally encoded message segment, into the current repetition of the message Structure underlying this Pointer. See Pointer static fields for return values.

Specified by:
setSegment in class Pointer
Parameters:
segment - the segment to parse
correctOrder - false if this segment should not actually be parsed because the current location precedes the location of a segment that has already been parsed. In this case, the return value should be either FILL_FAILED_FULL, FILL_FAILED_WRONG_SEGMENT, or FILL_FAILED_OUT_OF_ORDER, but the segment should not be parsed.
Returns:
an int indicating the success or flavours of failure of the request
Throws:
HL7Exception - if there is an error during parsing


Copyright © 2001-2011 University Health Network. All Rights Reserved.