Spring Web Services Framework

org.springframework.xml.stream
Class AbstractStaxXmlReader

java.lang.Object
  extended by org.springframework.xml.sax.AbstractXmlReader
      extended by org.springframework.xml.stream.AbstractStaxXmlReader
All Implemented Interfaces:
XMLReader
Direct Known Subclasses:
StaxEventXmlReader, StaxStreamXmlReader

public abstract class AbstractStaxXmlReader
extends AbstractXmlReader

Abstract base class for SAX XMLReader implementations that use StAX as a basis.

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
AbstractXmlReader.setContentHandler(org.xml.sax.ContentHandler), AbstractXmlReader.setDTDHandler(org.xml.sax.DTDHandler), AbstractXmlReader.setEntityResolver(org.xml.sax.EntityResolver), AbstractXmlReader.setErrorHandler(org.xml.sax.ErrorHandler)

Constructor Summary
AbstractStaxXmlReader()
           
 
Method Summary
 boolean getFeature(String name)
          Throws a SAXNotRecognizedException exception.
protected  boolean hasNamespacePrefixesFeature()
          Indicates whether the SAX feature http://xml.org/sax/features/namespaces-prefixes is turned on.
protected  boolean hasNamespacesFeature()
          Indicates whether the SAX feature http://xml.org/sax/features/namespaces is turned on.
 void parse(InputSource ignored)
          Parses the StAX XML reader passed at construction-time.
 void parse(String ignored)
          Parses the StAX XML reader passed at construction-time.
protected abstract  void parseInternal()
          Template-method that parses the StAX reader passed at construction-time.
 void setFeature(String name, boolean value)
          Throws a SAXNotRecognizedException exception.
protected  void setLocator(Location location)
          Sets the SAX Locator based on the given StAX Location.
protected  void setStandalone(boolean standalone)
           
 
Methods inherited from class org.springframework.xml.sax.AbstractXmlReader
getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getLexicalHandler, getProperty, setContentHandler, setDTDHandler, setEntityResolver, setErrorHandler, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractStaxXmlReader

public AbstractStaxXmlReader()
Method Detail

getFeature

public boolean getFeature(String name)
                   throws SAXNotRecognizedException,
                          SAXNotSupportedException
Description copied from class: AbstractXmlReader
Throws a SAXNotRecognizedException exception.

Specified by:
getFeature in interface XMLReader
Overrides:
getFeature in class AbstractXmlReader
Throws:
SAXNotRecognizedException - always
SAXNotSupportedException

setFeature

public void setFeature(String name,
                       boolean value)
                throws SAXNotRecognizedException,
                       SAXNotSupportedException
Description copied from class: AbstractXmlReader
Throws a SAXNotRecognizedException exception.

Specified by:
setFeature in interface XMLReader
Overrides:
setFeature in class AbstractXmlReader
Throws:
SAXNotRecognizedException - always
SAXNotSupportedException

hasNamespacesFeature

protected boolean hasNamespacesFeature()
Indicates whether the SAX feature http://xml.org/sax/features/namespaces is turned on.


hasNamespacePrefixesFeature

protected boolean hasNamespacePrefixesFeature()
Indicates whether the SAX feature http://xml.org/sax/features/namespaces-prefixes is turned on.


setStandalone

protected void setStandalone(boolean standalone)

parse

public final void parse(InputSource ignored)
                 throws SAXException
Parses the StAX XML reader passed at construction-time.

Note that the given InputSource is not read, but ignored.

Parameters:
ignored - is ignored
Throws:
SAXException - A SAX exception, possibly wrapping a XMLStreamException

parse

public final void parse(String ignored)
                 throws SAXException
Parses the StAX XML reader passed at construction-time.

Note that the given system identifier is not read, but ignored.

Parameters:
ignored - is ignored
Throws:
SAXException - A SAX exception, possibly wrapping a XMLStreamException

setLocator

protected void setLocator(Location location)
Sets the SAX Locator based on the given StAX Location.

Parameters:
location - the location
See Also:
ContentHandler.setDocumentLocator(org.xml.sax.Locator)

parseInternal

protected abstract void parseInternal()
                               throws SAXException,
                                      XMLStreamException
Template-method that parses the StAX reader passed at construction-time.

Throws:
SAXException
XMLStreamException

Spring Web Services Framework

Copyright © 2005-2010 The Spring Web Services Framework. All Rights Reserved.