Top Description Fields Constructors Methods
com.sun.msv.verifier.jaxp

pack-priv Class SAXParserImpl

extends SAXParser
Class Inheritance
Imports
java.io.File, .InputStream, javax.xml.parsers.SAXParser, org.iso_relax.verifier.Schema, .Verifier, .VerifierFactory, org.xml.sax.InputSource, .SAXException, .SAXNotRecognizedException, .SAXNotSupportedException, .XMLFilter, .XMLReader, org.xml.sax.helpers.XMLReaderAdapter

SAXParser implementation that supports validation.

This class uses another SAXParser implementation and adds the validation capability to it.

Author
Kohsuke KAWAGUCHI

Field Summary

Modifier and TypeField and Description
private final SAXParser
core

The underlying SAX parser.

private final VerifierFactory
factory

A reference to VerifierFactory that can be used to parse a schema.

private Verifier
verifier

JARV verifier object that performs the validation for this SAXParserImpl.

Constructor Summary

AccessConstructor and Description
pack-priv
SAXParserImpl(SAXParser core, VerifierFactory _jarvFactory, Verifier _verifier)

Method Summary

Modifier and TypeMethod and Description
public Parser
getParser()

Implements abstract javax.xml.parsers.SAXParser.getParser.

Deprecated
Returns the SAX parser that is encapsulated by the implementation of this class.
public Object
getProperty(String
The name of the property to be retrieved.
name
)

Implements abstract javax.xml.parsers.SAXParser.getProperty.

Returns the particular property requested for in the underlying implementation of org.xml.sax.XMLReader.

public XMLReader
getXMLReader()

Implements abstract javax.xml.parsers.SAXParser.getXMLReader.

Returns the org.xml.sax.XMLReader that is encapsulated by the implementation of this class.
public boolean
isNamespaceAware()

Implements abstract javax.xml.parsers.SAXParser.isNamespaceAware.

Indicates whether or not this parser is configured to understand namespaces.
public boolean
isValidating()

Implements abstract javax.xml.parsers.SAXParser.isValidating.

Indicates whether or not this parser is configured to validate XML documents.
public void
setProperty(String
The name of the property to be set.
name
,
Object
The value of the property to be set.
value
)

Implements abstract javax.xml.parsers.SAXParser.setProperty.

Sets the particular property in the underlying implementation of org.xml.sax.XMLReader.

Inherited from javax.xml.parsers.SAXParser:
getSchemaisXIncludeAwareparseparseparseparseparseparseparseparseparseparsereset

Field Detail

coreback to summary
private final SAXParser core

The underlying SAX parser.

factoryback to summary
private final VerifierFactory factory

A reference to VerifierFactory that can be used to parse a schema.

verifierback to summary
private Verifier verifier

JARV verifier object that performs the validation for this SAXParserImpl. This field is null when no schema is set.

Constructor Detail

SAXParserImplback to summary
pack-priv SAXParserImpl(SAXParser core, VerifierFactory _jarvFactory, Verifier _verifier)

Method Detail

getParserback to summary
public Parser getParser() throws SAXException

Implements abstract javax.xml.parsers.SAXParser.getParser.

Doc from javax.xml.parsers.SAXParser.getParser.

Deprecated

Returns the SAX parser that is encapsulated by the implementation of this class.

Returns:Parser

The SAX parser that is encapsulated by the implementation of this class.

Exceptions
SAXException:
If any SAX errors occur during processing.
getPropertyback to summary
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException

Implements abstract javax.xml.parsers.SAXParser.getProperty.

Doc from javax.xml.parsers.SAXParser.getProperty.

Returns the particular property requested for in the underlying implementation of org.xml.sax.XMLReader.

Parameters
name:String

The name of the property to be retrieved.

Returns:Object

Value of the requested property.

Exceptions
SAXNotRecognizedException:
When the underlying XMLReader does not recognize the property name.
SAXNotSupportedException:
When the underlying XMLReader recognizes the property name but doesn't support the property.
getXMLReaderback to summary
public XMLReader getXMLReader() throws SAXException

Implements abstract javax.xml.parsers.SAXParser.getXMLReader.

Doc from javax.xml.parsers.SAXParser.getXMLReader.

Returns the org.xml.sax.XMLReader that is encapsulated by the implementation of this class.

Returns:XMLReader

The XMLReader that is encapsulated by the implementation of this class.

Exceptions
SAXException:
If any SAX errors occur during processing.
isNamespaceAwareback to summary
public boolean isNamespaceAware()

Implements abstract javax.xml.parsers.SAXParser.isNamespaceAware.

Doc from javax.xml.parsers.SAXParser.isNamespaceAware.

Indicates whether or not this parser is configured to understand namespaces.

Returns:boolean

true if this parser is configured to understand namespaces; false otherwise.

isValidatingback to summary
public boolean isValidating()

Implements abstract javax.xml.parsers.SAXParser.isValidating.

Doc from javax.xml.parsers.SAXParser.isValidating.

Indicates whether or not this parser is configured to validate XML documents.

Returns:boolean

true if this parser is configured to validate XML documents; false otherwise.

setPropertyback to summary
public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException

Implements abstract javax.xml.parsers.SAXParser.setProperty.

Doc from javax.xml.parsers.SAXParser.setProperty.

Sets the particular property in the underlying implementation of org.xml.sax.XMLReader. A list of the core features and properties can be found at http://sax.sourceforge.net/?selected=get-set.

All implementations that implement JAXP 1.5 or newer are required to support the javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD and javax.xml.XMLConstants#ACCESS_EXTERNAL_SCHEMA properties.

Parameters
name:String

The name of the property to be set.

value:Object

The value of the property to be set.

Exceptions
SAXNotRecognizedException:
When the underlying XMLReader does not recognize the property name.
SAXNotSupportedException:
When the underlying XMLReader recognizes the property name but doesn't support the property.