Package Summary  Overview Summary

class:ValidatorHandler [NONE]

constructor:<init>() [NONE]

method:setContentHandler(org.xml.sax.ContentHandler) [NONE]

method:getContentHandler() [NONE]

method:setErrorHandler(org.xml.sax.ErrorHandler) [NONE]

method:getErrorHandler() [NONE]

method:setResourceResolver(org.w3c.dom.ls.LSResourceResolver) [NONE]

  • setResourceResolver

    public abstract void setResourceResolver​(LSResourceResolver resourceResolver)
    Sets the LSResourceResolver to customize resource resolution while in a validation episode.

    ValidatorHandler uses a LSResourceResolver when it needs to locate external resources while a validation, although exactly what constitutes "locating external resources" is up to each schema language.

    When the LSResourceResolver is null, the implementation will behave as if the following LSResourceResolver is set:

     class DumbLSResourceResolver implements LSResourceResolver {
         public LSInput resolveResource(
             String publicId, String systemId, String baseURI) {
    
             return null; // always return null
         }
     }
     

    If a LSResourceResolver throws a RuntimeException (or instances of its derived classes), then the ValidatorHandler will abort the parsing and the caller of the validate method will receive the same RuntimeException.

    When a new ValidatorHandler object is created, initially this field is set to null.

    Parameters:
    resourceResolver - A new resource resolver to be set. This parameter can be null.

method:getResourceResolver() [NONE]

method:getTypeInfoProvider() [NONE]

  • getTypeInfoProvider

    public abstract TypeInfoProvider getTypeInfoProvider()
    Obtains the TypeInfoProvider implementation of this ValidatorHandler.

    The obtained TypeInfoProvider can be queried during a parse to access the type information determined by the validator.

    Some schema languages do not define the notion of type, for those languages, this method may not be supported. However, to be compliant with this specification, implementations for W3C XML Schema 1.0 must support this operation.

    Returns:
    null if the validator / schema language does not support the notion of TypeInfo. Otherwise a non-null valid TypeInfoProvider.

method:getFeature(java.lang.String) [NONE]

  • getFeature

    public boolean getFeature​(String name)
                       throws SAXNotRecognizedException,
                              SAXNotSupportedException
    
    Look up the value of a feature flag.

    The feature name is any fully-qualified URI. It is possible for a ValidatorHandler to recognize a feature name but temporarily be unable to return its value. Some feature values may be available only in specific contexts, such as before, during, or after a validation.

    Implementors are free (and encouraged) to invent their own features, using names built on their own URIs.

    Parameters:
    name - The feature name, which is a non-null fully-qualified URI.
    Returns:
    The current value of the feature (true or false).
    Throws:
    SAXNotRecognizedException - If the feature value can't be assigned or retrieved.
    SAXNotSupportedException - When the ValidatorHandler recognizes the feature name but cannot determine its value at this time.
    NullPointerException - When name is null.
    See Also:
    setFeature(String, boolean)

method:setFeature(java.lang.String,boolean) [NONE]

method:setProperty(java.lang.String,java.lang.Object) [NONE]

  • setProperty

    public void setProperty​(String name,
                            Object object)
                     throws SAXNotRecognizedException,
                            SAXNotSupportedException
    
    Set the value of a property.

    The property name is any fully-qualified URI. It is possible for a ValidatorHandler to recognize a property name but to be unable to change the current value. Some property values may be immutable or mutable only in specific contexts, such as before, during, or after a validation.

    ValidatorHandlers are not required to recognize setting any specific property names.

    Parameters:
    name - The property name, which is a non-null fully-qualified URI.
    object - The requested value for the property.
    Throws:
    SAXNotRecognizedException - If the property value can't be assigned or retrieved.
    SAXNotSupportedException - When the ValidatorHandler recognizes the property name but cannot set the requested value.
    NullPointerException - When name is null.

method:getProperty(java.lang.String) [NONE]

  • getProperty

    public Object getProperty​(String name)
                       throws SAXNotRecognizedException,
                              SAXNotSupportedException
    
    Look up the value of a property.

    The property name is any fully-qualified URI. It is possible for a ValidatorHandler to recognize a property name but temporarily be unable to return its value. Some property values may be available only in specific contexts, such as before, during, or after a validation.

    ValidatorHandlers are not required to recognize any specific property names.

    Implementors are free (and encouraged) to invent their own properties, using names built on their own URIs.

    Parameters:
    name - The property name, which is a non-null fully-qualified URI.
    Returns:
    The current value of the property.
    Throws:
    SAXNotRecognizedException - If the property value can't be assigned or retrieved.
    SAXNotSupportedException - When the XMLReader recognizes the property name but cannot determine its value at this time.
    NullPointerException - When name is null.
    See Also:
    setProperty(String, Object)

© 2019 Oracle Corporation and/or its affiliates