public abstract class XMLValidationSchemaFactory extends Object
XMLValidationSchema
instances. This abstract base class has methods for instantiating the
actual implementation (similar to the way
XMLInputFactory
works, and defines the API to
use for configuring these instances, as well as factory methods concrete
classes implement for actually creating XMLValidationSchema
instances.
Note: this class is part of the second major revision of StAX 2 API (StAX2, v2), and is optional for StAX2 implementations to support.
XMLInputFactory
,
XMLValidationSchema
,
XMLInputFactory2
Modifier and Type | Field and Description |
---|---|
static String |
INTERNAL_ID_SCHEMA_DTD |
static String |
INTERNAL_ID_SCHEMA_RELAXNG |
static String |
INTERNAL_ID_SCHEMA_TREX |
static String |
INTERNAL_ID_SCHEMA_W3C |
protected String |
mSchemaType
Schema type this factory instance supports.
|
static String |
P_ENABLE_CACHING
Property that determines whether schema instances created by this
factory instance can be cached by the factory; if false, no caching
is allowed to be doe; if true, factory can do caching if it wants to.
|
static String |
P_IS_NAMESPACE_AWARE
Property that determines whether schemas constructed are namespace-aware,
in cases where schema supports both namespace-aware and non-namespace
aware modes.
|
static String |
SERVICE_DEFINITION_PATH
Path to resource that should contain implementation class definition.
|
static String |
SYSTEM_PROPERTY_FOR_IMPL
Defines the system property that can be set to explicitly specify
which implementation to use (in case there are multiple StAX2
implementations; or the one used does not specify other mechanisms
for the loader to find the implementation class).
|
Modifier | Constructor and Description |
---|---|
protected |
XMLValidationSchemaFactory(String st) |
Modifier and Type | Method and Description |
---|---|
abstract XMLValidationSchema |
createSchema(File f) |
XMLValidationSchema |
createSchema(InputStream in) |
XMLValidationSchema |
createSchema(InputStream in,
String encoding) |
abstract XMLValidationSchema |
createSchema(InputStream in,
String encoding,
String publicId,
String systemId) |
XMLValidationSchema |
createSchema(Reader r) |
abstract XMLValidationSchema |
createSchema(Reader r,
String publicId,
String systemId) |
abstract XMLValidationSchema |
createSchema(URL url) |
abstract Object |
getProperty(String propName) |
String |
getSchemaType() |
abstract boolean |
isPropertySupported(String propName) |
static XMLValidationSchemaFactory |
newInstance(String schemaType)
Creates a new XMLValidationFactory instance, using the default
instance configuration mechanism.
|
static XMLValidationSchemaFactory |
newInstance(String schemaType,
ClassLoader classLoader) |
abstract boolean |
setProperty(String propName,
Object value) |
public static final String INTERNAL_ID_SCHEMA_DTD
public static final String INTERNAL_ID_SCHEMA_RELAXNG
public static final String INTERNAL_ID_SCHEMA_W3C
public static final String INTERNAL_ID_SCHEMA_TREX
public static final String SYSTEM_PROPERTY_FOR_IMPL
public static final String SERVICE_DEFINITION_PATH
public static final String P_IS_NAMESPACE_AWARE
Default value is TRUE. For schema types for which only one value (usually TRUE) is allowed, this property will be ignored.
public static final String P_ENABLE_CACHING
protected final String mSchemaType
protected XMLValidationSchemaFactory(String st)
st
- Schema type this factory supports; one of
SCHEMA_ID_xxx
constants.public static XMLValidationSchemaFactory newInstance(String schemaType) throws FactoryConfigurationError
FactoryConfigurationError
public static XMLValidationSchemaFactory newInstance(String schemaType, ClassLoader classLoader) throws FactoryConfigurationError
FactoryConfigurationError
public XMLValidationSchema createSchema(InputStream in) throws XMLStreamException
XMLStreamException
public XMLValidationSchema createSchema(InputStream in, String encoding) throws XMLStreamException
XMLStreamException
public abstract XMLValidationSchema createSchema(InputStream in, String encoding, String publicId, String systemId) throws XMLStreamException
XMLStreamException
public XMLValidationSchema createSchema(Reader r) throws XMLStreamException
XMLStreamException
public abstract XMLValidationSchema createSchema(Reader r, String publicId, String systemId) throws XMLStreamException
XMLStreamException
public abstract XMLValidationSchema createSchema(URL url) throws XMLStreamException
XMLStreamException
public abstract XMLValidationSchema createSchema(File f) throws XMLStreamException
XMLStreamException
public abstract boolean isPropertySupported(String propName)
public abstract boolean setProperty(String propName, Object value)
propName
- Name of property to setvalue
- Value to set property topublic final String getSchemaType()
SCHEMA_ID_xxx
constants) that this factory supports.Copyright © 2015 fasterxml.com. All Rights Reserved.