src/javax/xml/validation/Validator.java

Print this page




 423     public void setFeature(String name, boolean value)
 424         throws SAXNotRecognizedException, SAXNotSupportedException {
 425 
 426         if (name == null) {
 427             throw new NullPointerException("the name parameter is null");
 428         }
 429 
 430         throw new SAXNotRecognizedException(name);
 431     }
 432 
 433     /**
 434      * Set the value of a property.
 435      *
 436      * <p>The property name is any fully-qualified URI.  It is
 437      * possible for a {@link Validator} to recognize a property name but
 438      * to be unable to change the current value.
 439      * Some property values may be immutable or mutable only
 440      * in specific contexts, such as before, during, or after
 441      * a validation.</p>
 442      *
 443      * <p>{@link Validator}s are not required to recognize setting
 444      * any specific property names.</p>










 445      *









 446      * @param name The property name, which is a non-null fully-qualified URI.
 447      * @param object The requested value for the property.
 448      *
 449      * @throws SAXNotRecognizedException If the property
 450      *   value can't be assigned or retrieved.
 451      * @throws SAXNotSupportedException When the
 452      *   {@link Validator} recognizes the property name but
 453      *   cannot set the requested value.
 454      * @throws NullPointerException
 455      *   When the name parameter is null.
 456      */
 457     public void setProperty(String name, Object object)
 458         throws SAXNotRecognizedException, SAXNotSupportedException {
 459 
 460         if (name == null) {
 461             throw new NullPointerException("the name parameter is null");
 462         }
 463 
 464         throw new SAXNotRecognizedException(name);
 465     }




 423     public void setFeature(String name, boolean value)
 424         throws SAXNotRecognizedException, SAXNotSupportedException {
 425 
 426         if (name == null) {
 427             throw new NullPointerException("the name parameter is null");
 428         }
 429 
 430         throw new SAXNotRecognizedException(name);
 431     }
 432 
 433     /**
 434      * Set the value of a property.
 435      *
 436      * <p>The property name is any fully-qualified URI.  It is
 437      * possible for a {@link Validator} to recognize a property name but
 438      * to be unable to change the current value.
 439      * Some property values may be immutable or mutable only
 440      * in specific contexts, such as before, during, or after
 441      * a validation.</p>
 442      *
 443      * <p>
 444      * All implementations that implement JAXP 1.5 or newer are required to 
 445      * support the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} and 
 446      * {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_SCHEMA} properties. 
 447      * </p>
 448      * <ul> 
 449      *   <li>
 450      *      <p>Access to external DTDs in source or Schema file is restricted to 
 451      *      the protocols specified by the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} 
 452      *      property.  If access is denied during validation due to the restriction 
 453      *      of this property, {@link org.xml.sax.SAXException} will be thrown by the 
 454      *      {@link #validate(Source)} method.</p>
 455      * 
 456      *      <p>Access to external reference set by the schemaLocation attribute is 
 457      *      restricted to the protocols specified by the 
 458      *      {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_SCHEMA} property. 
 459      *      If access is denied during validation due to the restriction of this property, 
 460      *      {@link org.xml.sax.SAXException} will be thrown by the 
 461      *      {@link #validate(Source)} method.</p>
 462      *   </li>
 463      * </ul>
 464      *
 465      * @param name The property name, which is a non-null fully-qualified URI.
 466      * @param object The requested value for the property.
 467      *
 468      * @throws SAXNotRecognizedException If the property
 469      *   value can't be assigned or retrieved.
 470      * @throws SAXNotSupportedException When the
 471      *   {@link Validator} recognizes the property name but
 472      *   cannot set the requested value.
 473      * @throws NullPointerException
 474      *   When the name parameter is null.
 475      */
 476     public void setProperty(String name, Object object)
 477         throws SAXNotRecognizedException, SAXNotSupportedException {
 478 
 479         if (name == null) {
 480             throw new NullPointerException("the name parameter is null");
 481         }
 482 
 483         throw new SAXNotRecognizedException(name);
 484     }