pt.tumba.parser.swf
Class SaxHandlerBase

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by pt.tumba.parser.swf.SaxHandlerBase
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
Direct Known Subclasses:
SWFSaxWriter, XMLWriter

public abstract class SaxHandlerBase
extends org.xml.sax.helpers.DefaultHandler

Base class for SAX2 Content Handlers

Author:
unknown

Nested Class Summary
static class SaxHandlerBase.ContentElementType
          Description of the Class
static class SaxHandlerBase.ElementType
          Description of the Class
static class SaxHandlerBase.GatheringElementType
          Description of the Class
 
Field Summary
protected  java.util.Map elementTypes
          Description of the Field
protected  java.util.List elems
          Description of the Field
protected  SaxHandlerBase.ElementType elemType
          Description of the Field
protected  java.util.List gatherBuffer
          Description of the Field
protected  SaxHandlerBase.GatheringElementType gatheringElement
          Description of the Field
protected  boolean gatherMode
          Description of the Field
 
Constructor Summary
SaxHandlerBase()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          Description of the Method
 void dispatchAllMatchingGatheredElements(java.lang.String elemName)
          Description of the Method
 void dispatchGatheredElement(java.lang.String elemName)
          Description of the Method
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
          Description of the Method
 void endGatherMode()
          Description of the Method
static java.lang.String getAttr(org.xml.sax.Attributes attrs, java.lang.String name, java.lang.String defaultValue)
          Gets the attr attribute of the SaxHandlerBase class
static boolean getAttrBool(org.xml.sax.Attributes attrs, java.lang.String name, boolean defaultValue)
          Gets the attrBool attribute of the SaxHandlerBase class
static double getAttrDouble(org.xml.sax.Attributes attrs, java.lang.String name, double defaultValue)
          Gets the attrDouble attribute of the SaxHandlerBase class
static int getAttrInt(org.xml.sax.Attributes attrs, java.lang.String name, int defaultValue)
          Gets the attrInt attribute of the SaxHandlerBase class
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
          Description of the Method
 void startGatherMode(SaxHandlerBase.GatheringElementType elem)
          Description of the Method
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

elementTypes

protected java.util.Map elementTypes
Description of the Field


elemType

protected SaxHandlerBase.ElementType elemType
Description of the Field


elems

protected java.util.List elems
Description of the Field


gatherMode

protected boolean gatherMode
Description of the Field


gatherBuffer

protected java.util.List gatherBuffer
Description of the Field


gatheringElement

protected SaxHandlerBase.GatheringElementType gatheringElement
Description of the Field

Constructor Detail

SaxHandlerBase

public SaxHandlerBase()
Method Detail

startGatherMode

public void startGatherMode(SaxHandlerBase.GatheringElementType elem)
Description of the Method

Parameters:
elem - Description of the Parameter

endGatherMode

public void endGatherMode()
                   throws java.lang.Exception
Description of the Method

Throws:
java.lang.Exception - Description of the Exception

dispatchAllMatchingGatheredElements

public void dispatchAllMatchingGatheredElements(java.lang.String elemName)
                                         throws java.lang.Exception
Description of the Method

Parameters:
elemName - Description of the Parameter
Throws:
java.lang.Exception - Description of the Exception

dispatchGatheredElement

public void dispatchGatheredElement(java.lang.String elemName)
                             throws java.lang.Exception
Description of the Method

Parameters:
elemName - Description of the Parameter
Throws:
java.lang.Exception - Description of the Exception

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
Description of the Method

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Parameters:
namespaceURI - Description of the Parameter
localName - Description of the Parameter
qName - Description of the Parameter
atts - Description of the Parameter
Throws:
org.xml.sax.SAXException - Description of the Exception

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Description of the Method

Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
Parameters:
namespaceURI - Description of the Parameter
localName - Description of the Parameter
qName - Description of the Parameter
Throws:
org.xml.sax.SAXException - Description of the Exception

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Description of the Method

Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Parameters:
ch - Description of the Parameter
start - Description of the Parameter
length - Description of the Parameter
Throws:
org.xml.sax.SAXException - Description of the Exception

getAttr

public static java.lang.String getAttr(org.xml.sax.Attributes attrs,
                                       java.lang.String name,
                                       java.lang.String defaultValue)
Gets the attr attribute of the SaxHandlerBase class

Parameters:
attrs - Description of the Parameter
name - Description of the Parameter
defaultValue - Description of the Parameter
Returns:
The attr value

getAttrInt

public static int getAttrInt(org.xml.sax.Attributes attrs,
                             java.lang.String name,
                             int defaultValue)
Gets the attrInt attribute of the SaxHandlerBase class

Parameters:
attrs - Description of the Parameter
name - Description of the Parameter
defaultValue - Description of the Parameter
Returns:
The attrInt value

getAttrDouble

public static double getAttrDouble(org.xml.sax.Attributes attrs,
                                   java.lang.String name,
                                   double defaultValue)
Gets the attrDouble attribute of the SaxHandlerBase class

Parameters:
attrs - Description of the Parameter
name - Description of the Parameter
defaultValue - Description of the Parameter
Returns:
The attrDouble value

getAttrBool

public static boolean getAttrBool(org.xml.sax.Attributes attrs,
                                  java.lang.String name,
                                  boolean defaultValue)
Gets the attrBool attribute of the SaxHandlerBase class

Parameters:
attrs - Description of the Parameter
name - Description of the Parameter
defaultValue - Description of the Parameter
Returns:
The attrBool value