Mp3dings 
20100427

net.sourceforge.mp3dings.export
Class SansaPLAExporter

java.lang.Object
  extended by net.sourceforge.mp3dings.export.AbstractExporter
      extended by net.sourceforge.mp3dings.export.SansaPLAExporter
All Implemented Interfaces:
Serializable, Exporter

public class SansaPLAExporter
extends AbstractExporter
implements Serializable

Exports data as an M3u playlist.

Version:
$Revision: 13 $ ($Date: 2007-07-27 11:52:39 +0200 (Fr, 27 Jul 2007) $)
Author:
Moritz Ringler
See Also:
Serialized Form

Constructor Summary
SansaPLAExporter()
          Creates a new SansaPLAExporter.
 
Method Summary
 String getBlock(int fileIndex, Map blockdata)
          Returns a line making up one playlist entry.
 String getExtension()
          Returns the file extension for this exporter's target file type.
 String getFooter(int numEntries)
          Returns an empty string.
 String getHeader()
          Returns the three CRLF-terminated header lines: PLP PLAYLIST VERSION 1.20
 String getName()
          Returns a string description of this exporter's target file type.
 void setKeys(Object[] headerKeys, Object[] blockKeys, Object[] footerKeys)
          Overriden to do nothing.
 
Methods inherited from class net.sourceforge.mp3dings.export.AbstractExporter
export, export, getBlockKeys, getFileFallback, getFileFilter, getFooterData, getFooterKeys, getHeaderData, getHeaderKeys, getImplementations, getKeys, getNumberOfEntries, setEncoding, setFileFallback, setFooterData, setHeaderData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SansaPLAExporter

public SansaPLAExporter()
Creates a new SansaPLAExporter.

Method Detail

getBlock

public String getBlock(int fileIndex,
                       Map blockdata)
Returns a line making up one playlist entry.
      HARP, path\to\file.mp3
 

Specified by:
getBlock in class AbstractExporter
Parameters:
fileIndex - ignored
blockdata - a map containing the record data
See Also:
AbstractExporter.export(Object[] keys, Object[][] data)

getHeader

public String getHeader()
Returns the three CRLF-terminated header lines:
      PLP PLAYLIST
      VERSION 1.20

 

Specified by:
getHeader in class AbstractExporter

getFooter

public String getFooter(int numEntries)
Returns an empty string.

Specified by:
getFooter in class AbstractExporter

getName

public String getName()
Returns a string description of this exporter's target file type.

Specified by:
getName in interface Exporter
Specified by:
getName in class AbstractExporter
Returns:
the name of the target file type. Currently this is "M3u playlist (*.m3u)", but this may change in future versions.

getExtension

public String getExtension()
Returns the file extension for this exporter's target file type.

Overrides:
getExtension in class AbstractExporter
Returns:
a file extension including the leading dot. Currently this is ".pla", but this may change in future versions.

setKeys

public void setKeys(Object[] headerKeys,
                    Object[] blockKeys,
                    Object[] footerKeys)
Overriden to do nothing. This exporter uses no fields for the header and footer and only FULLPATH as blockKey.

Overrides:
setKeys in class AbstractExporter
Parameters:
headerKeys - the fields for the header
blockKeys - the fields for the main section
footerKeys - the fields for the footer
See Also:
AbstractExporter.getKeys()

Mp3dings 
20100427