public abstract class BaseSchemaFactory extends XMLValidationSchemaFactory
| Modifier and Type | Field and Description |
|---|---|
protected ValidatorConfig |
mConfig
Current configurations for this factory
|
protected static SAXParserFactory |
sSaxFactory |
INTERNAL_ID_SCHEMA_DTD, INTERNAL_ID_SCHEMA_RELAXNG, INTERNAL_ID_SCHEMA_TREX, INTERNAL_ID_SCHEMA_W3C, mSchemaType, P_ENABLE_CACHING, P_IS_NAMESPACE_AWARE, SERVICE_DEFINITION_PATH, SYSTEM_PROPERTY_FOR_IMPL| Modifier | Constructor and Description |
|---|---|
protected |
BaseSchemaFactory(String schemaType) |
| Modifier and Type | Method and Description |
|---|---|
XMLValidationSchema |
createSchema(File f) |
XMLValidationSchema |
createSchema(InputStream in,
String encoding,
String publicId,
String systemId) |
XMLValidationSchema |
createSchema(Reader r,
String publicId,
String systemId) |
XMLValidationSchema |
createSchema(URL url) |
Object |
getProperty(String propName) |
protected static SAXParserFactory |
getSaxFactory()
We will essentially share a singleton sax parser factory;
the reason being that constructing (or, rather, locating
implementation class) is bit expensive.
|
boolean |
isPropertySupported(String propName) |
protected abstract XMLValidationSchema |
loadSchema(InputSource src,
Object sysRef) |
boolean |
setProperty(String propName,
Object value) |
createSchema, createSchema, createSchema, getSchemaType, newInstance, newInstanceprotected static SAXParserFactory sSaxFactory
protected final ValidatorConfig mConfig
protected BaseSchemaFactory(String schemaType)
public boolean isPropertySupported(String propName)
isPropertySupported in class XMLValidationSchemaFactorypublic boolean setProperty(String propName, Object value)
setProperty in class XMLValidationSchemaFactorypropName - Name of property to setvalue - Value to set property topublic Object getProperty(String propName)
getProperty in class XMLValidationSchemaFactorypublic XMLValidationSchema createSchema(InputStream in, String encoding, String publicId, String systemId) throws XMLStreamException
createSchema in class XMLValidationSchemaFactoryXMLStreamExceptionpublic XMLValidationSchema createSchema(Reader r, String publicId, String systemId) throws XMLStreamException
createSchema in class XMLValidationSchemaFactoryXMLStreamExceptionpublic XMLValidationSchema createSchema(URL url) throws XMLStreamException
createSchema in class XMLValidationSchemaFactoryXMLStreamExceptionpublic XMLValidationSchema createSchema(File f) throws XMLStreamException
createSchema in class XMLValidationSchemaFactoryXMLStreamExceptionprotected abstract XMLValidationSchema loadSchema(InputSource src, Object sysRef) throws XMLStreamException
XMLStreamExceptionprotected static SAXParserFactory getSaxFactory()