javax.xml.validation

Class SchemaFactory


public abstract class SchemaFactory
extends java.lang.Object

Factory for obtaining schemata.

Since:
1.3

Constructor Summary

SchemaFactory()

Method Summary

ErrorHandler
getErrorHandler()
boolean
getFeature(String name)
Object
getProperty(String name)
LSResourceResolver
getResourceResolver()
boolean
isSchemaLanguageSupported(String schemaLanguage)
Indicates whether the specified schema language is supported.
static SchemaFactory
newInstance(String schemaLanguage)
Returns an implementation of SchemaFactory that supports the specified schema language.
Schema
newSchema()
Creates a special schema.
Schema
newSchema(File schema)
Returns a schema based on the specified source file.
Schema
newSchema(URL schema)
Returns a schema based on the specified URL.
Schema
newSchema(Source schema)
Returns a schema based on the specified source resource.
Schema
newSchema(Source[] schemata)
Parses the specified sources, and combine them into a single schema.
void
setErrorHandler(ErrorHandler errorHandler)
void
setFeature(String name, boolean value)
void
setProperty(String name, Object value)
void
setResourceResolver(LSResourceResolver resourceResolver)

Constructor Details

SchemaFactory

protected SchemaFactory()

Method Details

getErrorHandler

public ErrorHandler getErrorHandler()


getFeature

public boolean getFeature(String name)
            throws SAXNotRecognizedException,
                   SAXNotSupportedException


getProperty

public Object getProperty(String name)
            throws SAXNotRecognizedException,
                   SAXNotSupportedException


getResourceResolver

public LSResourceResolver getResourceResolver()


isSchemaLanguageSupported

public boolean isSchemaLanguageSupported(String schemaLanguage)
Indicates whether the specified schema language is supported.

Parameters:
schemaLanguage - the URI of a schema language (see XMLConstants)


newInstance

public static final SchemaFactory newInstance(String schemaLanguage)
Returns an implementation of SchemaFactory that supports the specified schema language.

Parameters:
schemaLanguage - the URI of a schema language (see XMLConstants)


newSchema

public Schema newSchema()
            throws SAXException
Creates a special schema. The exact semantics of this depends on the schema language.


newSchema

public Schema newSchema(File schema)
            throws SAXException
Returns a schema based on the specified source file.

Parameters:
schema - the source resource


newSchema

public Schema newSchema(URL schema)
            throws SAXException
Returns a schema based on the specified URL.

Parameters:
schema - the source resource


newSchema

public Schema newSchema(Source schema)
            throws SAXException
Returns a schema based on the specified source resource.

Parameters:
schema - the source resource


newSchema

public Schema newSchema(Source[] schemata)
            throws SAXException
Parses the specified sources, and combine them into a single schema. The exact procedure and semantics of this depends on the schema language.

Parameters:
schemata - the schema resources to load


setErrorHandler

public void setErrorHandler(ErrorHandler errorHandler)


setFeature

public void setFeature(String name,
                       boolean value)
            throws SAXNotRecognizedException,
                   SAXNotSupportedException


setProperty

public void setProperty(String name,
                        Object value)
            throws SAXNotRecognizedException,
                   SAXNotSupportedException


setResourceResolver

public void setResourceResolver(LSResourceResolver resourceResolver)