ca.uhn.hl7v2.parser
Class SegmentPointer
java.lang.Object
ca.uhn.hl7v2.parser.Pointer
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)
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 |
SegmentPointer
public SegmentPointer(PipeParser parser,
Group parent,
int position,
EncodingCharacters encodingChars)
throws HL7Exception
- Deprecated.
- Creates new SegmentPointer
- Parameters:
parser
- the PipeParser used to parse segmentsparent
- the Group object that would be the parent of any instances of the
Segment underlying this SegmentPointerposition
- the position (among siblings; from 0) of the underlying SegmentencodingChars
- array of encoding characters, starting w/ field delim
- Throws:
HL7Exception
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 parsecorrectOrder
- 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.