1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 package ca.uhn.hl7v2.model;
28
29 import ca.uhn.hl7v2.HL7Exception;
30 import ca.uhn.hl7v2.Location;
31
32 import org.slf4j.Logger;
33 import org.slf4j.LoggerFactory;
34
35
36
37
38 public class MessageVisitorSupport implements MessageVisitor {
39
40 protected static final Logger LOG = LoggerFactory.getLogger(MessageVisitorSupport.class);
41
42 public boolean start(Message message) throws HL7Exception {
43 LOG.trace("Enter message {}", message);
44 return true;
45 }
46
47 public boolean end(Message message) throws HL7Exception {
48 LOG.trace("Leave message {}", message);
49 return true;
50 }
51
52 public boolean start(Group group, Location location) throws HL7Exception {
53 LOG.trace("Enter group {} {}", group, location);
54 return true;
55 }
56
57 public boolean end(Group group, Location location) throws HL7Exception {
58 LOG.trace("Leave group {} {}", group, location);
59 return true;
60 }
61
62 public boolean start(Segment segment, Location location) throws HL7Exception {
63 LOG.trace("Enter segment {} {}", segment, location);
64 return true;
65 }
66
67 public boolean end(Segment segment, Location location) throws HL7Exception {
68 LOG.trace("Leave segment {} {}", segment, location);
69 return true;
70 }
71
72 public boolean start(Field field, Location location) throws HL7Exception {
73 LOG.trace("Enter field {} {}", field, location);
74 return true;
75 }
76
77 public boolean end(Field field, Location location) throws HL7Exception {
78 LOG.trace("Leave field {} {}", field, location);
79 return true;
80 }
81
82 public boolean start(Composite type, Location location) throws HL7Exception {
83 LOG.trace("Enter composite {} {}", type, location);
84 return true;
85 }
86
87 public boolean end(Composite type, Location location) throws HL7Exception {
88 LOG.trace("Leave composite {} {}", type, location);
89 return true;
90 }
91
92 public boolean visit(Primitive type, Location location) throws HL7Exception {
93 LOG.trace("Visit primitive {} {}", type, location);
94 return true;
95 }
96 }