com.simonstl.moe.visitor
Class MOEtoSAX

java.lang.Object
  |
  +--com.simonstl.moe.visitor.MOEtoSAX
All Implemented Interfaces:
ComponentSAXOutI

public class MOEtoSAX
extends java.lang.Object
implements ComponentSAXOutI

The MOEtoSAX class provides a basic set of methods which can be used to convert any MOE object into SAX events.

This version has hooks for NamespaceContext but doesn't actually implement any of it, nor does it support startPrefixMapping and endPrefixMapping in any substantial way.

version 0.01 is the initial release.

Version:
0.01 5 November 2001
Author:
Simon St.Laurent

Constructor Summary
MOEtoSAX()
           
 
Method Summary
 void attributeEvent(org.xml.sax.helpers.XMLFilterImpl handler, CoreComponentI component, NamespaceContext namespace)
          SAX doesn't report attributes as separate events
 void cdataEvent(org.xml.sax.helpers.XMLFilterImpl handler, CoreComponentI component, NamespaceContext namespace)
          empty until new functionality added beyond XMLFilterImpl
 void charsEvent(org.xml.sax.helpers.XMLFilterImpl handler, CoreComponentI component, NamespaceContext namespace)
           
 void commentEvent(org.xml.sax.helpers.XMLFilterImpl handler, CoreComponentI component, NamespaceContext namespace)
          empty until new functionality added beyond XMLFilterImpl
 void elementEvent(org.xml.sax.helpers.XMLFilterImpl handler, CoreComponentI component, NamespaceContext namespace)
           
 void endAttributeEvent(org.xml.sax.helpers.XMLFilterImpl handler, CoreComponentI component, NamespaceContext namespace)
          SAX doesn't report attributes as separate events
 void endCdataEvent(org.xml.sax.helpers.XMLFilterImpl handler, CoreComponentI component, NamespaceContext namespace)
          empty until new functionality added beyond XMLFilterImpl
 void endCommentEvent(org.xml.sax.helpers.XMLFilterImpl handler, CoreComponentI component, NamespaceContext namespace)
          empty until new functionality added beyond XMLFilterImpl
 void endElementEvent(org.xml.sax.helpers.XMLFilterImpl handler, CoreComponentI component, NamespaceContext namespace)
           
 void endNamespaceEvent(org.xml.sax.helpers.XMLFilterImpl handler, CoreComponentI component, NamespaceContext namespace)
          Will need to check at the end of an element to see if this has happened.
 void endPiEvent(org.xml.sax.helpers.XMLFilterImpl handler, CoreComponentI component, NamespaceContext namespace)
          SAX has no conception of the end of a processing instruction.
 void igWhitespaceEvent(org.xml.sax.helpers.XMLFilterImpl handler, CoreComponentI component, NamespaceContext namespace)
           
 void namespaceEvent(org.xml.sax.helpers.XMLFilterImpl handler, CoreComponentI component, NamespaceContext namespace)
           
 void piEvent(org.xml.sax.helpers.XMLFilterImpl handler, CoreComponentI component, NamespaceContext namespace)
           
 void SAXEventComponent(org.xml.sax.helpers.XMLFilterImpl handler, CoreComponentI component)
          This method passes off processing to the real method with a blank NamespaceContext.
 void SAXEventComponent(org.xml.sax.helpers.XMLFilterImpl handler, CoreComponentI component, NamespaceContext namespace)
          The core method just passes off processing to the child methods.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MOEtoSAX

public MOEtoSAX()
Method Detail

SAXEventComponent

public void SAXEventComponent(org.xml.sax.helpers.XMLFilterImpl handler,
                              CoreComponentI component)
                       throws org.xml.sax.SAXException
This method passes off processing to the real method with a blank NamespaceContext.
Specified by:
SAXEventComponent in interface ComponentSAXOutI

SAXEventComponent

public void SAXEventComponent(org.xml.sax.helpers.XMLFilterImpl handler,
                              CoreComponentI component,
                              NamespaceContext namespace)
                       throws org.xml.sax.SAXException
The core method just passes off processing to the child methods. This needs to be updated for handlers beyond those in XMLFilterImpl.

elementEvent

public void elementEvent(org.xml.sax.helpers.XMLFilterImpl handler,
                         CoreComponentI component,
                         NamespaceContext namespace)
                  throws org.xml.sax.SAXException

endElementEvent

public void endElementEvent(org.xml.sax.helpers.XMLFilterImpl handler,
                            CoreComponentI component,
                            NamespaceContext namespace)
                     throws org.xml.sax.SAXException

attributeEvent

public void attributeEvent(org.xml.sax.helpers.XMLFilterImpl handler,
                           CoreComponentI component,
                           NamespaceContext namespace)
                    throws org.xml.sax.SAXException
SAX doesn't report attributes as separate events

endAttributeEvent

public void endAttributeEvent(org.xml.sax.helpers.XMLFilterImpl handler,
                              CoreComponentI component,
                              NamespaceContext namespace)
                       throws org.xml.sax.SAXException
SAX doesn't report attributes as separate events

namespaceEvent

public void namespaceEvent(org.xml.sax.helpers.XMLFilterImpl handler,
                           CoreComponentI component,
                           NamespaceContext namespace)
                    throws org.xml.sax.SAXException

endNamespaceEvent

public void endNamespaceEvent(org.xml.sax.helpers.XMLFilterImpl handler,
                              CoreComponentI component,
                              NamespaceContext namespace)
                       throws org.xml.sax.SAXException
Will need to check at the end of an element to see if this has happened.

cdataEvent

public void cdataEvent(org.xml.sax.helpers.XMLFilterImpl handler,
                       CoreComponentI component,
                       NamespaceContext namespace)
                throws org.xml.sax.SAXException
empty until new functionality added beyond XMLFilterImpl

endCdataEvent

public void endCdataEvent(org.xml.sax.helpers.XMLFilterImpl handler,
                          CoreComponentI component,
                          NamespaceContext namespace)
                   throws org.xml.sax.SAXException
empty until new functionality added beyond XMLFilterImpl

commentEvent

public void commentEvent(org.xml.sax.helpers.XMLFilterImpl handler,
                         CoreComponentI component,
                         NamespaceContext namespace)
                  throws org.xml.sax.SAXException
empty until new functionality added beyond XMLFilterImpl

endCommentEvent

public void endCommentEvent(org.xml.sax.helpers.XMLFilterImpl handler,
                            CoreComponentI component,
                            NamespaceContext namespace)
                     throws org.xml.sax.SAXException
empty until new functionality added beyond XMLFilterImpl

piEvent

public void piEvent(org.xml.sax.helpers.XMLFilterImpl handler,
                    CoreComponentI component,
                    NamespaceContext namespace)
             throws org.xml.sax.SAXException

endPiEvent

public void endPiEvent(org.xml.sax.helpers.XMLFilterImpl handler,
                       CoreComponentI component,
                       NamespaceContext namespace)
                throws org.xml.sax.SAXException
SAX has no conception of the end of a processing instruction.

charsEvent

public void charsEvent(org.xml.sax.helpers.XMLFilterImpl handler,
                       CoreComponentI component,
                       NamespaceContext namespace)
                throws org.xml.sax.SAXException

igWhitespaceEvent

public void igWhitespaceEvent(org.xml.sax.helpers.XMLFilterImpl handler,
                              CoreComponentI component,
                              NamespaceContext namespace)
                       throws org.xml.sax.SAXException