|
||||||||||
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(java.lang.String namePattern,
int rep)
As findSegment(), but will only return a group. |
Segment |
findSegment(java.lang.String namePattern,
int rep)
Returns the first segment with a name that matches the given pattern, in a depth-first search. |
Group |
getGroup(java.lang.String namePattern,
int rep)
As getSegment() but will only return a group. |
Segment |
getSegment(java.lang.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 branchMethod Detail |
---|
public Segment findSegment(java.lang.String namePattern, int rep) throws HL7Exception
segmentName
- the name of the segment to find. 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 findGroup(java.lang.String namePattern, int rep) throws HL7Exception
HL7Exception
public Segment getSegment(java.lang.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(java.lang.String namePattern, int rep) throws HL7Exception
HL7Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |