org.apache.excalibur.xmlizer
Class DefaultXMLizer

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.excalibur.xmlizer.DefaultXMLizer
All Implemented Interfaces:
Component, Configurable, LogEnabled, Serviceable, ThreadSafe, XMLizer

public final class DefaultXMLizer
extends AbstractLogEnabled
implements XMLizer, Serviceable, Configurable, ThreadSafe, Component

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(Configuration configuration)
          Pass the Configuration to the Configurable class.
 void service(ServiceManager serviceManager)
          Pass the ServiceManager to the Serviceable.
 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(ServiceManager serviceManager)
             throws ServiceException
Description copied from interface: Serviceable
Pass the ServiceManager to the Serviceable. The Serviceable implementation should use the specified ServiceManager to acquire the components it needs for execution.

Specified by:
service in interface Serviceable
Parameters:
serviceManager - The ServiceManager which this Serviceable uses. Must not be null.
Throws:
ServiceException - if an error occurs

configure

public void configure(Configuration configuration)
               throws ConfigurationException
Description copied from interface: Configurable
Pass the Configuration to the Configurable class.

Specified by:
configure in interface Configurable
Parameters:
configuration - the class configurations. Must not be null.
Throws:
ConfigurationException - if an error occurs

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-2005 The Apache Software Foundation. All Rights Reserved.