org.musicontroller.importer
Class MP3InspectorJID3Lib

java.lang.Object
  extended by org.musicontroller.importer.MP3InspectorJID3Lib
All Implemented Interfaces:
MediafileInspector

public class MP3InspectorJID3Lib
extends java.lang.Object
implements MediafileInspector

This MP3 inpector uses the JID3Lib SourceForge project for retrieving information from MP3 files.

Version:
$Id: MP3InspectorJID3Lib.java,v 1.1 2010/03/16 18:55:43 varienaja Exp $
Author:
drexler

Constructor Summary
MP3InspectorJID3Lib(java.io.File mp3file)
          Constructor for a MP3Inspector.
 
Method Summary
 java.lang.String getBandname()
          Returns the band name of the MP3 file.
 java.lang.String getExtension()
          Returns the extension of the song (".mp3").
 java.io.File getFile()
          Returns the currently analyzed file.
 java.lang.String getKeyword()
          Returns the genre keyword.
 java.lang.String getPlaylistname()
          Returns the playlist name of the MP3 file.
 int getPlaylistrow()
          Returns the sequence no.
 int getPlaylistyear()
          Returns the year of release of the playlist.
 int getSonglength()
          Returns the song length in milliseconds.
 java.lang.String getSongname()
          Returns the song name of the MP3 file.
 void inspectFile(java.lang.String filename)
          Inspect the specified file as an MP3 file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MP3InspectorJID3Lib

public MP3InspectorJID3Lib(java.io.File mp3file)
                    throws java.io.IOException,
                           ImporterException
Constructor for a MP3Inspector.

Parameters:
mp3file - The MP3 file to be analysed.
Throws:
java.io.IOException - The file could not be openened.
ImporterException - The file contains invalid ID3 tags.
Method Detail

getBandname

public java.lang.String getBandname()
Description copied from interface: MediafileInspector
Returns the band name of the MP3 file.

Specified by:
getBandname in interface MediafileInspector
Returns:
The band name.

getExtension

public java.lang.String getExtension()
Description copied from interface: MediafileInspector
Returns the extension of the song (".mp3").

Specified by:
getExtension in interface MediafileInspector
Returns:
Returns the extension of the song.

getKeyword

public java.lang.String getKeyword()
Description copied from interface: MediafileInspector
Returns the genre keyword.

Specified by:
getKeyword in interface MediafileInspector
Returns:
The genre keyword.

getPlaylistname

public java.lang.String getPlaylistname()
Description copied from interface: MediafileInspector
Returns the playlist name of the MP3 file.

Specified by:
getPlaylistname in interface MediafileInspector
Returns:
The playlist name.

getPlaylistrow

public int getPlaylistrow()
Description copied from interface: MediafileInspector
Returns the sequence no. of the song in the playlist.

Specified by:
getPlaylistrow in interface MediafileInspector
Returns:
The sequence no. of the song in the playlist.

getPlaylistyear

public int getPlaylistyear()
Description copied from interface: MediafileInspector
Returns the year of release of the playlist.

Specified by:
getPlaylistyear in interface MediafileInspector
Returns:
The year of release of the playlist.

getSonglength

public int getSonglength()
Returns the song length in milliseconds.

Specified by:
getSonglength in interface MediafileInspector
Returns:
The song length in milliseconds.

getSongname

public java.lang.String getSongname()
Description copied from interface: MediafileInspector
Returns the song name of the MP3 file.

Specified by:
getSongname in interface MediafileInspector
Returns:
The song name.

inspectFile

public void inspectFile(java.lang.String filename)
                 throws ImporterException,
                        java.io.IOException
Description copied from interface: MediafileInspector
Inspect the specified file as an MP3 file. The same inspector can be re-used by calling inspectFile() repeatedly.

Specified by:
inspectFile in interface MediafileInspector
Parameters:
filename - The name of the file to analyze.
Throws:
ImporterException
java.io.IOException

getFile

public java.io.File getFile()
Description copied from interface: MediafileInspector
Returns the currently analyzed file.

Specified by:
getFile in interface MediafileInspector
Returns:
The file currently being analyzed


Copyright © 2010 A.J.V.. All Rights Reserved.