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

Quick Search    Search Deep

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

java.lang.Object
  extended byorg.xml.sax.helpers.XMLFilterImpl
      extended byorg.esau.ptarmigan.impl.filter.BaseFilter
          extended byorg.esau.ptarmigan.impl.filter.PlaylistFilter
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
Direct Known Subclasses:
SimplePlaylistFilter, XMLPlaylistFilter

public abstract class PlaylistFilter
extends BaseFilter
implements org.esau.ptarmigan.impl.CharacterStreamSource

PlaylistFilter -- transforms XML playlist to ptarmigan playlist

All playlists are presently implemented as CharacterStreamSource

Version:
$Revision: 1.3 $ $Date: 2002/09/19 03:47:35 $

Field Summary
private  boolean in_entry
           
private  boolean is_props_done
           
(package private) static org.apache.commons.logging.Log log
          logging object
private  java.lang.String m_author
           
private  java.io.File m_base_dir
          the directory from which relative pathnames will be normalized
private  java.lang.String m_copyright
           
private  int m_entry_count
           
private  int m_entry_duration
           
private  java.lang.String m_entry_title
           
private  java.net.URL m_entry_url
           
private  boolean m_include_entries
           
private  java.lang.String m_summary
           
private  java.lang.String m_title
           
(package private) static java.lang.String NS_PREFIX
           
(package private) static java.lang.String NS_URI
           
(package private) static java.lang.String TAG_ENTRY
           
(package private) static java.lang.String TAG_ENTRY_DURATION
           
(package private) static java.lang.String TAG_ENTRY_TITLE
           
(package private) static java.lang.String TAG_ENTRY_URL
           
(package private) static java.lang.String TAG_PLAYLIST
          from the playlist.xsd schema
(package private) static java.lang.String TAG_PROPS
           
(package private) static java.lang.String TAG_PROPS_AUTHOR
           
(package private) static java.lang.String TAG_PROPS_COPYRIGHT
           
(package private) static java.lang.String TAG_PROPS_DURATION_TOTAL
           
(package private) static java.lang.String TAG_PROPS_ENTRY_COUNT
           
(package private) static java.lang.String TAG_PROPS_SUMMARY
           
(package private) static java.lang.String 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
PlaylistFilter()
           
 
Method Summary
(package private)  void endPlaylist()
          end
 boolean getIncludeEntries()
           
(package private)  boolean getInEntry()
           
(package private)  boolean getIsPropsDone()
           
(package private)  java.lang.String getNamespacePrefix()
           
(package private)  java.lang.String getNamespaceURI()
           
abstract  boolean isMatch(java.lang.String sniff_chars)
          can this parser handle the text file?
 void resetData()
           
(package private)  void setAuthor(java.lang.String author)
           
 void setBaseDir(java.io.File base_dir)
          provide a directory by which relative paths will be resolved
(package private)  void setCopyright(java.lang.String copyright)
           
(package private)  void setEntryCount(int entry_count)
           
(package private)  void setEntryDuration(int entry_duration)
           
(package private)  void setEntryPath(java.lang.String path)
          attempt to build a URL from the path; if unsuccessful the entry isn't written It's okay to pass in a relative path, where the playlist's directory will be used.
(package private)  void setEntryPath(java.net.URL entry_path)
           
(package private)  void setEntryTitle(java.lang.String entry_title)
           
 void setIncludeEntries(boolean include_entries)
           
(package private)  void setInEntry(boolean state)
           
(package private)  void setSummary(java.lang.String summary)
           
(package private)  void setTitle(java.lang.String title)
           
(package private)  void startPlaylist()
          begin
(package private)  void writeEntry()
          output pl:entry and reset entry values
(package private)  void writeProperties()
          output pl:properties
 
Methods inherited from class org.esau.ptarmigan.impl.filter.BaseFilter
characters, doParse, 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

NS_URI

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

NS_PREFIX

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

TAG_PLAYLIST

static final java.lang.String TAG_PLAYLIST
from the playlist.xsd schema

See Also:
Constant Field Values

TAG_PROPS

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

TAG_PROPS_TITLE

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

TAG_PROPS_AUTHOR

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

TAG_PROPS_COPYRIGHT

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

TAG_PROPS_SUMMARY

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

TAG_PROPS_ENTRY_COUNT

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

TAG_PROPS_DURATION_TOTAL

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

TAG_ENTRY

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

TAG_ENTRY_URL

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

TAG_ENTRY_TITLE

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

TAG_ENTRY_DURATION

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

m_base_dir

private java.io.File m_base_dir
the directory from which relative pathnames will be normalized


m_include_entries

private boolean m_include_entries

in_entry

private boolean in_entry

is_props_done

private boolean is_props_done

m_title

private java.lang.String m_title

m_author

private java.lang.String m_author

m_copyright

private java.lang.String m_copyright

m_summary

private java.lang.String m_summary

m_entry_count

private int m_entry_count

m_entry_url

private java.net.URL m_entry_url

m_entry_title

private java.lang.String m_entry_title

m_entry_duration

private int m_entry_duration

log

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

Constructor Detail

PlaylistFilter

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

isMatch

public abstract boolean isMatch(java.lang.String sniff_chars)
                         throws java.io.IOException
can this parser handle the text file?


getIncludeEntries

public boolean getIncludeEntries()

setIncludeEntries

public void setIncludeEntries(boolean include_entries)

setBaseDir

public void setBaseDir(java.io.File base_dir)
provide a directory by which relative paths will be resolved


getNamespaceURI

java.lang.String getNamespaceURI()
Specified by:
getNamespaceURI in class BaseFilter

getNamespacePrefix

java.lang.String getNamespacePrefix()
Specified by:
getNamespacePrefix in class BaseFilter

startPlaylist

void startPlaylist()
             throws org.xml.sax.SAXException
begin


endPlaylist

void endPlaylist()
           throws org.xml.sax.SAXException
end


writeProperties

void writeProperties()
               throws org.xml.sax.SAXException
output pl:properties


writeEntry

void writeEntry()
          throws org.xml.sax.SAXException
output pl:entry and reset entry values


getInEntry

boolean getInEntry()

setInEntry

void setInEntry(boolean state)

getIsPropsDone

boolean getIsPropsDone()

setTitle

void setTitle(java.lang.String title)

setAuthor

void setAuthor(java.lang.String author)

setCopyright

void setCopyright(java.lang.String copyright)

setSummary

void setSummary(java.lang.String summary)

setEntryCount

void setEntryCount(int entry_count)

setEntryPath

void setEntryPath(java.lang.String path)
attempt to build a URL from the path; if unsuccessful the entry isn't written It's okay to pass in a relative path, where the playlist's directory will be used.


setEntryPath

void setEntryPath(java.net.URL entry_path)

setEntryTitle

void setEntryTitle(java.lang.String entry_title)

setEntryDuration

void setEntryDuration(int entry_duration)

resetData

public void resetData()