org.esau.ptarmigan.impl.filter
Class BaseFilter

java.lang.Object
  |
  +--org.xml.sax.helpers.XMLFilterImpl
        |
        +--org.esau.ptarmigan.impl.filter.BaseFilter
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.XMLFilter, org.xml.sax.XMLReader
Direct Known Subclasses:
BinaryFilter, PlaylistFilter

public abstract class BaseFilter
extends org.xml.sax.helpers.XMLFilterImpl

BaseFilter -- abstract filter with a few services

TODO: how should in_chars be handled?

Version:
$Revision: 1.4 $ $Date: 2002/10/02 05:27:49 $
Author:
Reed Esau

Constructor Summary
BaseFilter()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          Receive notification of character data.
 MediaProperties getMediaProperties()
           
 void parse(org.xml.sax.InputSource input)
          SAX-Invoked parse of a 'document' from an input stream.
 void setMediaProperties(MediaProperties media_properties)
           
 
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
endDocument, endElement, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseFilter

public BaseFilter()
           throws org.xml.sax.SAXException
Method Detail

getMediaProperties

public MediaProperties getMediaProperties()

setMediaProperties

public void setMediaProperties(MediaProperties media_properties)

parse

public void parse(org.xml.sax.InputSource input)
           throws org.xml.sax.SAXException,
                  java.io.IOException
SAX-Invoked parse of a 'document' from an input stream.

This module creates the document from the parsed metadata.

Overrides:
parse in class org.xml.sax.helpers.XMLFilterImpl

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Receive notification of character data. If upstream XML, just ignore all character SAX events, as we are cacheing them here in a StringBuffer for extraction during the endElements. See ASXFilter or B4SFilter for examples. However, if NOT upstream XML, then pass-thru the character SAX events, as they are needed when temporarily attaching ContentHandlers. Example: Vorbis comments in FLAC tags.
Overrides:
characters in class org.xml.sax.helpers.XMLFilterImpl


Copyright © 2002 Reed Esau, All Rights Reserved.