org.apache.cocoon.generation
Class MP3DirectoryGenerator
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLoggable
|
+--org.apache.cocoon.xml.AbstractXMLProducer
|
+--org.apache.cocoon.generation.AbstractGenerator
|
+--org.apache.cocoon.generation.ComposerGenerator
|
+--org.apache.cocoon.generation.DirectoryGenerator
|
+--org.apache.cocoon.generation.MP3DirectoryGenerator
- All Implemented Interfaces:
- org.apache.avalon.framework.component.Component, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.activity.Disposable, Generator, org.apache.avalon.framework.logger.Loggable, org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, SitemapModelComponent, XMLProducer
- public class MP3DirectoryGenerator
- extends DirectoryGenerator
An extension of DirectoryGenerators that adds extra attributes for MP3
files.
Following extra attributes added to valid MP3 files:
- frequency
- the frequency of the MP3 file in KHz (most common: 44.1)
- bitrate
- the bitrate of the MP3 file in Kbit, from 8 to 448.
- mode
- the mode of the MP3 file, one of the following: Stereo, Joint stereo,
Dual channel, Single channel.
- variable-rate (optional)
- value is "yes" if VBR header is detected
- title, artitst, album, year, comment, track, genre (all optional)
- values obtained from MP3 ID3 tag
- Version:
- CVS $Id: MP3DirectoryGenerator.java,v 1.4 2002/02/22 07:03:51 cziegeler Exp $
- Author:
- Vadim Gritsenko
Fields inherited from class org.apache.cocoon.generation.DirectoryGenerator |
attributes, DATE_ATTR_NAME, dateFormatter, depth, DIR_NODE_NAME, excludeRE, FILE_NODE_NAME, FILENAME_ATTR_NAME, includeRE, isRequestedDirectory, LASTMOD_ATTR_NAME, PREFIX, rootRE, URI |
Fields inherited from interface org.apache.cocoon.generation.Generator |
ROLE |
Method Summary |
protected void |
setNodeAttributes(java.io.File path)
Extends the setNodeAttributes method from the
DirectoryGenerator by adding MP3 tag attributes
if the path is a MP3 file with valid tag. |
Methods inherited from class org.apache.cocoon.generation.DirectoryGenerator |
addPath, addPathWithAncestors, endNode, generate, getAncestors, isExcluded, isIncluded, isRoot, recycle, setup, startNode |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable |
getLogger, setLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MP3_FREQUENCY_ATTR_NAME
protected static java.lang.String MP3_FREQUENCY_ATTR_NAME
MP3_BITRATE_ATTR_NAME
protected static java.lang.String MP3_BITRATE_ATTR_NAME
MP3_MODE_ATTR_NAME
protected static java.lang.String MP3_MODE_ATTR_NAME
MP3_VBR_ATTR_NAME
protected static java.lang.String MP3_VBR_ATTR_NAME
MP3_TITLE_ATTR_NAME
protected static java.lang.String MP3_TITLE_ATTR_NAME
MP3_ARTITST_ATTR_NAME
protected static java.lang.String MP3_ARTITST_ATTR_NAME
MP3_ALBUM_ATTR_NAME
protected static java.lang.String MP3_ALBUM_ATTR_NAME
MP3_YEAR_ATTR_NAME
protected static java.lang.String MP3_YEAR_ATTR_NAME
MP3_COMMENT_ATTR_NAME
protected static java.lang.String MP3_COMMENT_ATTR_NAME
MP3_TRACK_ATTR_NAME
protected static java.lang.String MP3_TRACK_ATTR_NAME
MP3_GENRE_ATTR_NAME
protected static java.lang.String MP3_GENRE_ATTR_NAME
MP3DirectoryGenerator
public MP3DirectoryGenerator()
setNodeAttributes
protected void setNodeAttributes(java.io.File path)
throws org.xml.sax.SAXException
- Extends the
setNodeAttributes
method from the
DirectoryGenerator
by adding MP3 tag attributes
if the path is a MP3 file with valid tag.
- Overrides:
setNodeAttributes
in class DirectoryGenerator
- Following copied from class:
org.apache.cocoon.generation.DirectoryGenerator
- Parameters:
path
- the file/directory to use when setting attributes- Throws:
org.xml.sax.SAXException
- if an error occurs while setting the attributes
Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.