javax.xml.validation

Class SchemaFactory

public abstract class SchemaFactory extends Object

Factory for obtaining schemata.

Since: 1.5

Constructor Summary
protected SchemaFactory()
Method Summary
abstract ErrorHandlergetErrorHandler()
booleangetFeature(String name)
ObjectgetProperty(String name)
abstract LSResourceResolvergetResourceResolver()
abstract booleanisSchemaLanguageSupported(String schemaLanguage)
Indicates whether the specified schema language is supported.
static SchemaFactorynewInstance(String schemaLanguage)
Returns an implementation of SchemaFactory that supports the specified schema language.
SchemanewSchema(Source schema)
Returns a schema based on the specified source resource.
SchemanewSchema(File schema)
Returns a schema based on the specified source file.
SchemanewSchema(URL schema)
Returns a schema based on the specified URL.
abstract SchemanewSchema(Source[] schemata)
Parses the specified sources, and combine them into a single schema.
abstract SchemanewSchema()
Creates a special schema.
abstract voidsetErrorHandler(ErrorHandler errorHandler)
voidsetFeature(String name, boolean value)
voidsetProperty(String name, Object value)
abstract voidsetResourceResolver(LSResourceResolver resourceResolver)

Constructor Detail

SchemaFactory

protected SchemaFactory()

Method Detail

getErrorHandler

public abstract ErrorHandler getErrorHandler()

getFeature

public boolean getFeature(String name)

getProperty

public Object getProperty(String name)

getResourceResolver

public abstract LSResourceResolver getResourceResolver()

isSchemaLanguageSupported

public abstract 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(Source schema)
Returns a schema based on the specified source resource.

Parameters: schema the source resource

newSchema

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

Parameters: schema the source resource

newSchema

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

Parameters: schema the source resource

newSchema

public abstract Schema newSchema(Source[] schemata)
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

newSchema

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

setErrorHandler

public abstract void setErrorHandler(ErrorHandler errorHandler)

setFeature

public void setFeature(String name, boolean value)

setProperty

public void setProperty(String name, Object value)

setResourceResolver

public abstract void setResourceResolver(LSResourceResolver resourceResolver)