org.apache.excalibur.xmlizer
Class DefaultXMLizer

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.excalibur.xmlizer.DefaultXMLizer
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.thread.ThreadSafe, XMLizer

public final class DefaultXMLizer
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements XMLizer, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.thread.ThreadSafe

Converter for transforming any input stream with a given mime-type into SAX events. This component acts like a selector. All XMLizer can "register" themselfes for a given mime-type and this component forwards the transformation to the registered on.

Version:
CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:34 $
Author:
Avalon Development Team

Field Summary
 
Fields inherited from interface org.apache.excalibur.xmlizer.XMLizer
ROLE
 
Constructor Summary
DefaultXMLizer()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
           
 void service(org.apache.avalon.framework.service.ServiceManager serviceManager)
           
 void toSAX(java.io.InputStream stream, java.lang.String mimeType, java.lang.String systemID, org.xml.sax.ContentHandler handler)
          Generates SAX events from the given input stream NOTE : if the implementation can produce lexical events, care should be taken that handler can actually be a XMLConsumer that accepts such events or directly implements the LexicalHandler interface!
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultXMLizer

public DefaultXMLizer()
Method Detail

service

public void service(org.apache.avalon.framework.service.ServiceManager serviceManager)
             throws org.apache.avalon.framework.service.ServiceException
Specified by:
service in interface org.apache.avalon.framework.service.Serviceable
Throws:
org.apache.avalon.framework.service.ServiceException

configure

public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

toSAX

public void toSAX(java.io.InputStream stream,
                  java.lang.String mimeType,
                  java.lang.String systemID,
                  org.xml.sax.ContentHandler handler)
           throws org.xml.sax.SAXException,
                  java.io.IOException
Description copied from interface: XMLizer
Generates SAX events from the given input stream NOTE : if the implementation can produce lexical events, care should be taken that handler can actually be a XMLConsumer that accepts such events or directly implements the LexicalHandler interface!

Specified by:
toSAX in interface XMLizer
Parameters:
stream - the data
mimeType - the mime-type for the data
systemID - the URI defining the data (this is optional and can be null)
Throws:
org.xml.sax.SAXException
java.io.IOException


Copyright © 1997-2010 Apache Software Foundation. All Rights Reserved.