|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.uhn.hl7v2.util.MessageNavigator
ca.uhn.hl7v2.util.SegmentFinder
public class SegmentFinder
A tool for getting segments by name within a message or part of a message.
| Constructor Summary | |
|---|---|
SegmentFinder(Group root)
Creates a new instance of SegmentFinder. |
|
| Method Summary | |
|---|---|
Group |
findGroup(String namePattern,
int rep)
As findSegment(), but will only return a group. |
Segment |
findSegment(String namePattern,
int rep)
Returns the first segment with a name that matches the given pattern, in a depth-first search. |
Group |
getGroup(String namePattern,
int rep)
As getSegment() but will only return a group. |
Segment |
getSegment(String namePattern,
int rep)
Returns the first segment with a name matching the given pattern that is a sibling of the structure at the current location. |
| Methods inherited from class ca.uhn.hl7v2.util.MessageNavigator |
|---|
drillDown, drillDown, drillUp, getCurrentChildReps, getCurrentGroup, getCurrentStructure, getRoot, hasNextChild, iterate, nextChild, reset, toChild |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SegmentFinder(Group root)
root - the scope of searches -- may be a whole message or only a branch| Method Detail |
|---|
public Segment findSegment(String namePattern,
int rep)
throws HL7Exception
segmentName - the name of the segment to find. The wildcard * means any number
of arbitrary characters; the wildcard ? one arbitrary character
(eg "P*" or "*ID" or "???" or "P??" would match on PID).rep - the repetition of the segment to return
HL7Exception
public Group findGroup(String namePattern,
int rep)
throws HL7Exception
HL7Exception
public Segment getSegment(String namePattern,
int rep)
throws HL7Exception
segmentName - the name of the segment to get. The wildcad * means any number
of arbitrary characters; the wildard ? one arbitrary character
(eg "P*" or "*ID" or "???" or "P??" would match on PID).rep - the repetition of the segment to return
HL7Exception
public Group getGroup(String namePattern,
int rep)
throws HL7Exception
HL7Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||