01: package org.kohsuke.rngom.binary;
02:
03: import javax.xml.namespace.QName;
04:
05: import org.xml.sax.Locator;
06:
07: final class RestrictionViolationException extends Exception {
08: private String messageId;
09: private Locator loc;
10: private QName name;
11:
12: RestrictionViolationException(String messageId) {
13: this .messageId = messageId;
14: }
15:
16: RestrictionViolationException(String messageId, QName name) {
17: this .messageId = messageId;
18: this .name = name;
19: }
20:
21: String getMessageId() {
22: return messageId;
23: }
24:
25: Locator getLocator() {
26: return loc;
27: }
28:
29: void maybeSetLocator(Locator loc) {
30: if (this .loc == null)
31: this .loc = loc;
32: }
33:
34: QName getName() {
35: return name;
36: }
37: }
|