1 6 7 package javax.xml.validation; 8 9 import java.io.IOException ; 10 11 import javax.xml.transform.Result ; 12 import javax.xml.transform.Source ; 13 14 import org.w3c.dom.ls.LSResourceResolver ; 15 import org.xml.sax.ErrorHandler ; 16 import org.xml.sax.SAXException ; 17 import org.xml.sax.SAXNotRecognizedException ; 18 import org.xml.sax.SAXNotSupportedException ; 19 20 40 public abstract class Validator { 41 42 53 protected Validator() { 54 } 55 56 68 public abstract void reset(); 69 70 81 public void validate(Source source) throws SAXException , IOException { 82 validate(source, null); 83 } 84 85 173 public abstract void validate(Source source, Result result) throws SAXException , IOException ; 174 175 225 public abstract void setErrorHandler(ErrorHandler errorHandler); 226 227 238 public abstract ErrorHandler getErrorHandler(); 239 240 277 public abstract void setResourceResolver(LSResourceResolver resourceResolver); 278 279 290 public abstract LSResourceResolver getResourceResolver(); 291 292 293 294 317 public boolean getFeature(String name) throws SAXNotRecognizedException , SAXNotSupportedException { 318 if(name==null) throw new NullPointerException ("the name parameter is null"); 319 throw new SAXNotRecognizedException (name); 320 } 321 322 350 public void setFeature(String name, boolean value) throws SAXNotRecognizedException , SAXNotSupportedException { 351 if(name==null) throw new NullPointerException ("the name parameter is null"); 352 throw new SAXNotRecognizedException (name); 353 } 354 355 378 public void setProperty(String name, Object object) throws SAXNotRecognizedException , SAXNotSupportedException { 379 if(name==null) throw new NullPointerException ("the name parameter is null"); 380 throw new SAXNotRecognizedException (name); 381 } 382 383 409 public Object getProperty(String name) throws SAXNotRecognizedException , SAXNotSupportedException { 410 if(name==null) throw new NullPointerException ("the name parameter is null"); 411 throw new SAXNotRecognizedException (name); 412 } 413 } 414 | Popular Tags |