com.ctc.wstx.dtd
Class DTDSchemaFactory

java.lang.Object
  extended by org.codehaus.stax2.validation.XMLValidationSchemaFactory
      extended by com.ctc.wstx.dtd.DTDSchemaFactory

public class DTDSchemaFactory
extends XMLValidationSchemaFactory

Factory for creating DTD validator schema objects (shareable stateless "blueprints" for creating actual validators).

Due to close coupling of XML and DTD, some of the functionality implemented (like that of reading internal subsets embedded in XML documents) is only accessible by core Woodstox. The externally accessible


Field Summary
protected  ReaderConfig mReaderConfig
          This configuration object is used (instead of a more specific one) since the actual DTD reader uses such configuration object.
protected  ValidatorConfig mSchemaConfig
          Current configurations for this factory
 
Fields inherited from class org.codehaus.stax2.validation.XMLValidationSchemaFactory
INTERNAL_ID_SCHEMA_DTD, INTERNAL_ID_SCHEMA_RELAXNG, INTERNAL_ID_SCHEMA_TREX, INTERNAL_ID_SCHEMA_W3C, P_ENABLE_CACHING, P_IS_NAMESPACE_AWARE, SERVICE_DEFINITION_PATH, SYSTEM_PROPERTY_FOR_IMPL
 
Constructor Summary
DTDSchemaFactory()
           
 
Method Summary
 XMLValidationSchema createSchema(java.io.File f)
           
 XMLValidationSchema createSchema(java.io.InputStream in, java.lang.String encoding, java.lang.String publicId, java.lang.String systemId)
           
 XMLValidationSchema createSchema(java.io.Reader r, java.lang.String publicId, java.lang.String systemId)
           
 XMLValidationSchema createSchema(java.net.URL url)
           
protected  XMLValidationSchema doCreateSchema(ReaderConfig rcfg, InputBootstrapper bs, java.lang.String publicId, java.lang.String systemId, java.net.URL ctxt)
          The main validator construction method, called by all externally visible methods.
 java.lang.Object getProperty(java.lang.String propName)
           
 boolean isPropertySupported(java.lang.String propName)
           
 boolean setProperty(java.lang.String propName, java.lang.Object value)
           
 
Methods inherited from class org.codehaus.stax2.validation.XMLValidationSchemaFactory
createSchema, createSchema, createSchema, newInstance, newInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mSchemaConfig

protected final ValidatorConfig mSchemaConfig
Current configurations for this factory


mReaderConfig

protected final ReaderConfig mReaderConfig
This configuration object is used (instead of a more specific one) since the actual DTD reader uses such configuration object.

Constructor Detail

DTDSchemaFactory

public DTDSchemaFactory()
Method Detail

isPropertySupported

public boolean isPropertySupported(java.lang.String propName)
Specified by:
isPropertySupported in class XMLValidationSchemaFactory

setProperty

public boolean setProperty(java.lang.String propName,
                           java.lang.Object value)
Specified by:
setProperty in class XMLValidationSchemaFactory
Parameters:
propName - Name of property to set
value - Value to set property to
Returns:
True if setting succeeded; false if property was recognized but could not be changed to specified value, or if it was not recognized but the implementation did not throw an exception.

getProperty

public java.lang.Object getProperty(java.lang.String propName)
Specified by:
getProperty in class XMLValidationSchemaFactory

createSchema

public XMLValidationSchema createSchema(java.io.InputStream in,
                                        java.lang.String encoding,
                                        java.lang.String publicId,
                                        java.lang.String systemId)
                                 throws javax.xml.stream.XMLStreamException
Specified by:
createSchema in class XMLValidationSchemaFactory
Throws:
javax.xml.stream.XMLStreamException

createSchema

public XMLValidationSchema createSchema(java.io.Reader r,
                                        java.lang.String publicId,
                                        java.lang.String systemId)
                                 throws javax.xml.stream.XMLStreamException
Specified by:
createSchema in class XMLValidationSchemaFactory
Throws:
javax.xml.stream.XMLStreamException

createSchema

public XMLValidationSchema createSchema(java.net.URL url)
                                 throws javax.xml.stream.XMLStreamException
Specified by:
createSchema in class XMLValidationSchemaFactory
Throws:
javax.xml.stream.XMLStreamException

createSchema

public XMLValidationSchema createSchema(java.io.File f)
                                 throws javax.xml.stream.XMLStreamException
Specified by:
createSchema in class XMLValidationSchemaFactory
Throws:
javax.xml.stream.XMLStreamException

doCreateSchema

protected XMLValidationSchema doCreateSchema(ReaderConfig rcfg,
                                             InputBootstrapper bs,
                                             java.lang.String publicId,
                                             java.lang.String systemId,
                                             java.net.URL ctxt)
                                      throws javax.xml.stream.XMLStreamException
The main validator construction method, called by all externally visible methods.

Throws:
javax.xml.stream.XMLStreamException