Package com.sun.msv.verifier.jaxp
Class SAXParserFactoryImpl
- java.lang.Object
-
- javax.xml.parsers.SAXParserFactory
-
- com.sun.msv.verifier.jaxp.SAXParserFactoryImpl
-
public class SAXParserFactoryImpl extends SAXParserFactory
SAXParserFactory implementation that supports validation.This class uses another SAXParserFactory implementation and adds the validation capability to it.
- Author:
- Kohsuke KAWAGUCHI
-
-
Constructor Summary
Constructors Constructor Description SAXParserFactoryImpl()Creates a new instance by using the default SAXParserFactory implementation as the underlying parser.SAXParserFactoryImpl(File schemaAsFile)Creates a new instance that validates documents against the specified schema.SAXParserFactoryImpl(String schemaUrl)Creates a new instance that validates documents against the specified schema.SAXParserFactoryImpl(SAXParserFactory _factory)Creates a new instance by specifying the underlying SAXParserFactory implementation.SAXParserFactoryImpl(SAXParserFactory _factory, org.iso_relax.verifier.Schema _schema)SAXParserFactoryImpl(org.iso_relax.verifier.Schema schema)Creates a new instance by using a default SAXParserFactory implementation and the specified schema object.SAXParserFactoryImpl(InputSource _schema)Creates a new instance that validates documents against the specified schema.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetFeature(String name)booleanisNamespaceAware()booleanisValidating()SAXParsernewSAXParser()voidsetFeature(String name, boolean value)voidsetNamespaceAware(boolean awareness)voidsetValidating(boolean validating)-
Methods inherited from class javax.xml.parsers.SAXParserFactory
getSchema, isXIncludeAware, newInstance, newInstance, setSchema, setXIncludeAware
-
-
-
-
Constructor Detail
-
SAXParserFactoryImpl
public SAXParserFactoryImpl()
Creates a new instance by using the default SAXParserFactory implementation as the underlying parser. This constructor does not set any schema.
-
SAXParserFactoryImpl
public SAXParserFactoryImpl(SAXParserFactory _factory)
Creates a new instance by specifying the underlying SAXParserFactory implementation. This constructor does not set any schema.
-
SAXParserFactoryImpl
public SAXParserFactoryImpl(org.iso_relax.verifier.Schema schema)
Creates a new instance by using a default SAXParserFactory implementation and the specified schema object.
-
SAXParserFactoryImpl
public SAXParserFactoryImpl(File schemaAsFile) throws org.iso_relax.verifier.VerifierConfigurationException, SAXException, IOException
Creates a new instance that validates documents against the specified schema.- Throws:
org.iso_relax.verifier.VerifierConfigurationExceptionSAXExceptionIOException
-
SAXParserFactoryImpl
public SAXParserFactoryImpl(InputSource _schema) throws org.iso_relax.verifier.VerifierConfigurationException, SAXException, IOException
Creates a new instance that validates documents against the specified schema.- Throws:
org.iso_relax.verifier.VerifierConfigurationExceptionSAXExceptionIOException
-
SAXParserFactoryImpl
public SAXParserFactoryImpl(String schemaUrl) throws org.iso_relax.verifier.VerifierConfigurationException, SAXException, IOException
Creates a new instance that validates documents against the specified schema.- Throws:
org.iso_relax.verifier.VerifierConfigurationExceptionSAXExceptionIOException
-
SAXParserFactoryImpl
public SAXParserFactoryImpl(SAXParserFactory _factory, org.iso_relax.verifier.Schema _schema)
-
-
Method Detail
-
getFeature
public boolean getFeature(String name) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
getFeaturein classSAXParserFactory- Throws:
ParserConfigurationExceptionSAXNotRecognizedExceptionSAXNotSupportedException
-
setFeature
public void setFeature(String name, boolean value) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException
- Specified by:
setFeaturein classSAXParserFactory- Throws:
ParserConfigurationExceptionSAXNotRecognizedExceptionSAXNotSupportedException
-
newSAXParser
public SAXParser newSAXParser() throws ParserConfigurationException, SAXException
- Specified by:
newSAXParserin classSAXParserFactory- Throws:
ParserConfigurationExceptionSAXException
-
setNamespaceAware
public void setNamespaceAware(boolean awareness)
- Overrides:
setNamespaceAwarein classSAXParserFactory
-
isNamespaceAware
public boolean isNamespaceAware()
- Overrides:
isNamespaceAwarein classSAXParserFactory
-
setValidating
public void setValidating(boolean validating)
- Overrides:
setValidatingin classSAXParserFactory
-
isValidating
public boolean isValidating()
- Overrides:
isValidatingin classSAXParserFactory
-
-