net.datacrow.fileimporters
Class MusicFile

java.lang.Object
  extended by net.datacrow.fileimporters.MusicFile
All Implemented Interfaces:
IOnlineSearchClient

public class MusicFile
extends java.lang.Object
implements IOnlineSearchClient

Representation of a physical music file.

Author:
Robert Jan van der Waals

Constructor Summary
MusicFile()
           
MusicFile(java.lang.String filename)
           
 
Method Summary
 void addError(java.lang.String message)
          Passes an error message to this client.
 void addError(java.lang.Throwable t)
          Passes an error to this client.
 void addMessage(java.lang.String message)
          Passes a message to this client.
 void addObject(DcObject dco)
          Passes a result / item to this client.
 void addWarning(java.lang.String warning)
          Passes a warning message to this client.
 java.lang.String getAlbum()
           
 java.lang.String getArtist()
           
 int getBitrate()
           
 DcObject getDcObject()
           
 java.lang.String getEncodingType()
           
 java.lang.String getGenre()
           
 DcImageIcon getImage()
           
 int getLength()
           
 DcModule getModule()
          Returns the current module.
 java.lang.String getTitle()
           
 int getTrack()
           
 java.lang.String getYear()
           
 void processed(int i)
          The current result number being processed (x of x).
 void processing()
          Indicates a task is currently running.
 void processingTotal(int i)
          Passes the count of results which are going to be processed.
 int resultCount()
          Returns the total count of added items (see IOnlineSearchClient.addObject(DcObject))
 void stopped()
          Indicates a task has been stopped and a new task can be started.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MusicFile

public MusicFile()

MusicFile

public MusicFile(java.lang.String filename)
Method Detail

getImage

public DcImageIcon getImage()

getAlbum

public java.lang.String getAlbum()

getArtist

public java.lang.String getArtist()

getGenre

public java.lang.String getGenre()

getTitle

public java.lang.String getTitle()

getTrack

public int getTrack()

getYear

public java.lang.String getYear()

getBitrate

public int getBitrate()

getEncodingType

public java.lang.String getEncodingType()

getLength

public int getLength()

addError

public void addError(java.lang.Throwable t)
Description copied from interface: IOnlineSearchClient
Passes an error to this client.

Specified by:
addError in interface IOnlineSearchClient

addError

public void addError(java.lang.String message)
Description copied from interface: IOnlineSearchClient
Passes an error message to this client.

Specified by:
addError in interface IOnlineSearchClient

addMessage

public void addMessage(java.lang.String message)
Description copied from interface: IOnlineSearchClient
Passes a message to this client.

Specified by:
addMessage in interface IOnlineSearchClient

addObject

public void addObject(DcObject dco)
Description copied from interface: IOnlineSearchClient
Passes a result / item to this client.

Specified by:
addObject in interface IOnlineSearchClient

addWarning

public void addWarning(java.lang.String warning)
Description copied from interface: IOnlineSearchClient
Passes a warning message to this client.

Specified by:
addWarning in interface IOnlineSearchClient

getModule

public DcModule getModule()
Description copied from interface: IOnlineSearchClient
Returns the current module.

Specified by:
getModule in interface IOnlineSearchClient
Returns:
The module

processed

public void processed(int i)
Description copied from interface: IOnlineSearchClient
The current result number being processed (x of x).

Specified by:
processed in interface IOnlineSearchClient

processing

public void processing()
Description copied from interface: IOnlineSearchClient
Indicates a task is currently running.

Specified by:
processing in interface IOnlineSearchClient

processingTotal

public void processingTotal(int i)
Description copied from interface: IOnlineSearchClient
Passes the count of results which are going to be processed. This way the client knows how many items to expect.

Specified by:
processingTotal in interface IOnlineSearchClient
Parameters:
i - The total count.

resultCount

public int resultCount()
Description copied from interface: IOnlineSearchClient
Returns the total count of added items (see IOnlineSearchClient.addObject(DcObject))

Specified by:
resultCount in interface IOnlineSearchClient

stopped

public void stopped()
Description copied from interface: IOnlineSearchClient
Indicates a task has been stopped and a new task can be started.

Specified by:
stopped in interface IOnlineSearchClient

getDcObject

public DcObject getDcObject()