java.lang.Object
org.xml.sax.helpers.XMLFilterImpl
org.esau.ptarmigan.impl.filter.BaseFilter
org.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 $
| 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 |
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
PlaylistFilter
public PlaylistFilter()
throws org.xml.sax.SAXException
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()