KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thaiopensource > relaxng > impl > RestrictionViolationException


1 package com.thaiopensource.relaxng.impl;
2
3 import org.xml.sax.Locator JavaDoc;
4 import com.thaiopensource.xml.util.Name;
5
6 class RestrictionViolationException extends Exception JavaDoc {
7   private final String JavaDoc messageId;
8   private Locator JavaDoc loc;
9   private Name name;
10
11   RestrictionViolationException(String JavaDoc messageId) {
12     this.messageId = messageId;
13   }
14
15   RestrictionViolationException(String JavaDoc messageId, Name name) {
16     this.messageId = messageId;
17     this.name = name;
18   }
19
20   String JavaDoc getMessageId() {
21     return messageId;
22   }
23
24   Locator JavaDoc getLocator() {
25     return loc;
26   }
27
28   void maybeSetLocator(Locator JavaDoc loc) {
29     if (this.loc == null)
30       this.loc = loc;
31   }
32
33   Name getName() {
34     return name;
35   }
36 }
37   
38
Popular Tags