public class SegmentFinder extends MessageNavigator
Constructor and Description |
---|
SegmentFinder(Group root)
Creates a new instance of SegmentFinder.
|
Modifier and Type | Method and Description |
---|---|
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.
|
drillDown, drillDown, drillUp, getCurrentChildReps, getCurrentGroup, getCurrentStructure, getRoot, hasNextChild, iterate, nextChild, reset, toChild
public SegmentFinder(Group root)
root
- the scope of searches -- may be a whole message or only a branchpublic Segment findSegment(String namePattern, int rep) throws HL7Exception
namePattern
- 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 returnHL7Exception
public Group findGroup(String namePattern, int rep) throws HL7Exception
HL7Exception
public Segment getSegment(String namePattern, int rep) throws HL7Exception
namePattern
- 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 returnHL7Exception
public Group getGroup(String namePattern, int rep) throws HL7Exception
HL7Exception
Copyright © 2001–2017 University Health Network. All rights reserved.