org.exolab.castor.xml
Class BaseSax2EventFromStaxProducer

java.lang.Object
  extended by org.exolab.castor.xml.BaseSax2EventFromStaxProducer
All Implemented Interfaces:
SAX2EventAndErrorProducer, SAX2EventProducer
Direct Known Subclasses:
Sax2EventFromStaxEventProducer, Sax2EventFromStaxStreamProducer

public abstract class BaseSax2EventFromStaxProducer
extends Object
implements SAX2EventAndErrorProducer

This provides shared code for Sax2EventFromStaxEventProducer and Sax2EventFromStaxStreamProducer. It consumes StAX events and produces SAX2 events.

Author:
Philipp Erlacher

Constructor Summary
BaseSax2EventFromStaxProducer()
           
 
Method Summary
static SAX2EventAndErrorProducer createSax2EventFromStax(javax.xml.stream.XMLEventReader eventReader)
           
static SAX2EventAndErrorProducer createSax2EventFromStax(javax.xml.stream.XMLStreamReader streamReader)
           
 ContentHandler getContentHandler()
           
 ErrorHandler getErrorHandler()
           
 Stack<List<String>> getPrefixes()
           
protected  Locator getSAXLocator(javax.xml.stream.Location location)
          Gets a Locator to a given Location.
 void setContentHandler(ContentHandler contentHandler)
          Sets the SAX2 ContentHandler to send SAX 2 events to
 void setErrorHandler(ErrorHandler errorHandler)
          Sets the SAX2 ErrorHandler to send SAX 2 errors to
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.exolab.castor.xml.SAX2EventProducer
start
 

Constructor Detail

BaseSax2EventFromStaxProducer

public BaseSax2EventFromStaxProducer()
Method Detail

createSax2EventFromStax

public static SAX2EventAndErrorProducer createSax2EventFromStax(javax.xml.stream.XMLStreamReader streamReader)

createSax2EventFromStax

public static SAX2EventAndErrorProducer createSax2EventFromStax(javax.xml.stream.XMLEventReader eventReader)

setContentHandler

public void setContentHandler(ContentHandler contentHandler)
Description copied from interface: SAX2EventProducer
Sets the SAX2 ContentHandler to send SAX 2 events to

Specified by:
setContentHandler in interface SAX2EventProducer

setErrorHandler

public void setErrorHandler(ErrorHandler errorHandler)
Description copied from interface: SAX2EventAndErrorProducer
Sets the SAX2 ErrorHandler to send SAX 2 errors to

Specified by:
setErrorHandler in interface SAX2EventAndErrorProducer

getPrefixes

public Stack<List<String>> getPrefixes()

getContentHandler

public ContentHandler getContentHandler()

getErrorHandler

public ErrorHandler getErrorHandler()

getSAXLocator

protected Locator getSAXLocator(javax.xml.stream.Location location)
Gets a Locator to a given Location.

Parameters:
location - A Location
Returns:
A Locator


Copyright © 2013. All Rights Reserved.