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