Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.esau.ptarmigan.impl.filter
Class PLSFilter  view PLSFilter download PLSFilter.java

java.lang.Object
  extended byorg.xml.sax.helpers.XMLFilterImpl
      extended byorg.esau.ptarmigan.impl.filter.BaseFilter
          extended byorg.esau.ptarmigan.impl.filter.PlaylistFilter
              extended byorg.esau.ptarmigan.impl.filter.SimplePlaylistFilter
                  extended byorg.esau.ptarmigan.impl.filter.PLSFilter
All Implemented Interfaces:
org.esau.ptarmigan.impl.CharacterStreamSource, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.XMLFilter, org.xml.sax.XMLReader

public final class PLSFilter
extends SimplePlaylistFilter

PLSFilter -- transforms PLS playlist to ptarmigan playlist

TODO: recursively scan all playlists found.

Version:
$Revision: 1.3 $ $Date: 2002/09/19 03:48:00 $

Field Summary
(package private) static int COMMA_CH
           
(package private) static java.lang.String EQUALS
           
(package private) static org.apache.commons.logging.Log log
          logging object
(package private) static java.lang.String[] PLS_KEYS
           
(package private) static java.lang.String PLS_MARKER
           
(package private) static int PLS_TUNE_DURATION
           
(package private) static int PLS_TUNE_FILE
           
(package private) static int PLS_TUNE_TITLE
           
(package private) static int READ_AHEAD_LIMIT
           
 
Fields inherited from class org.esau.ptarmigan.impl.filter.PlaylistFilter
NS_PREFIX, NS_URI, TAG_ENTRY, TAG_ENTRY_DURATION, TAG_ENTRY_TITLE, TAG_ENTRY_URL, TAG_PLAYLIST, TAG_PROPS, TAG_PROPS_AUTHOR, TAG_PROPS_COPYRIGHT, TAG_PROPS_DURATION_TOTAL, TAG_PROPS_ENTRY_COUNT, TAG_PROPS_SUMMARY, TAG_PROPS_TITLE
 
Fields inherited from class org.esau.ptarmigan.impl.filter.BaseFilter
EMPTY_ATTRS, m_media_properties
 
Fields inherited from class org.xml.sax.helpers.XMLFilterImpl
 
Constructor Summary
PLSFilter()
           
 
Method Summary
 void doParsePlaylist(java.io.BufferedReader reader)
          Parse a document from a buffered source.
 boolean isMatch(java.lang.String str)
          does the specified stream contain a marker for the tag?
(package private)  boolean readEntry(java.io.BufferedReader reader)
          Obtain the next Tune (or playlist?) object from the playlist.
(package private)  boolean readHeader(java.io.BufferedReader reader)
          consume the header
 
Methods inherited from class org.esau.ptarmigan.impl.filter.SimplePlaylistFilter
doParse
 
Methods inherited from class org.esau.ptarmigan.impl.filter.PlaylistFilter
endPlaylist, getIncludeEntries, getInEntry, getIsPropsDone, getNamespacePrefix, getNamespaceURI, resetData, setAuthor, setBaseDir, setCopyright, setEntryCount, setEntryDuration, setEntryPath, setEntryPath, setEntryTitle, setIncludeEntries, setInEntry, setSummary, setTitle, startPlaylist, writeEntry, writeProperties
 
Methods inherited from class org.esau.ptarmigan.impl.filter.BaseFilter
characters, getByteStream, getChars, getMediaProperties, parse, setMediaProperties, sourceIsXML, write, write, write, write, write, write, write, write, write, write, write, writeDate, writeDate, writeDate, writeDate, writeInteger, writeInteger, writeInteger, writeInteger, writeInteger, writeString, writeString, writeString, writeString, writeString
 
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
 

Field Detail

PLS_MARKER

static final java.lang.String PLS_MARKER
See Also:
Constant Field Values

READ_AHEAD_LIMIT

static final int READ_AHEAD_LIMIT
See Also:
Constant Field Values

PLS_KEYS

static final java.lang.String[] PLS_KEYS

PLS_TUNE_FILE

static final int PLS_TUNE_FILE
See Also:
Constant Field Values

PLS_TUNE_TITLE

static final int PLS_TUNE_TITLE
See Also:
Constant Field Values

PLS_TUNE_DURATION

static final int PLS_TUNE_DURATION
See Also:
Constant Field Values

COMMA_CH

static final int COMMA_CH
See Also:
Constant Field Values

EQUALS

static final java.lang.String EQUALS
See Also:
Constant Field Values

log

static org.apache.commons.logging.Log log
logging object

Constructor Detail

PLSFilter

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

isMatch

public boolean isMatch(java.lang.String str)
                throws java.io.IOException
does the specified stream contain a marker for the tag?

Specified by:
isMatch in class PlaylistFilter

doParsePlaylist

public void doParsePlaylist(java.io.BufferedReader reader)
                     throws org.xml.sax.SAXException,
                            java.io.IOException,
                            java.text.ParseException
Parse a document from a buffered source.

Specified by:
doParsePlaylist in class SimplePlaylistFilter

readHeader

boolean readHeader(java.io.BufferedReader reader)
             throws java.io.IOException,
                    org.xml.sax.SAXException
consume the header


readEntry

boolean readEntry(java.io.BufferedReader reader)
            throws java.io.IOException,
                   org.xml.sax.SAXException
Obtain the next Tune (or playlist?) object from the playlist.