com.evolution.player.core.media.search
Class SearchMatch

java.lang.Object
  extended by com.evolution.player.core.media.search.SearchMatch
Direct Known Subclasses:
UISearchMatch

public abstract class SearchMatch
extends java.lang.Object

A match of a search. A search match knows which search provider it generated. The search match can also be converted into downloadable medias which can then be downloaded by the provided music loader. I.e. a search match representing an Album could be asked for all downloadable songs of that album.

Clients must implement.

Since:
0.5
See Also:
SearchProvider, MusicLoader

Constructor Summary
SearchMatch()
           
 
Method Summary
abstract  java.lang.String getLabel()
          A human readable label for the match.
abstract  DownloadableMedia[] getMedias(IProgressMonitor monitor)
          The downloadable medias for this search match.
abstract  MusicLoader getMusicLoader()
          The music loader which can download the downloadable medias returned by getMedias(IProgressMonitor).
abstract  SearchProvider getSearchProvider()
          The provider which generated this match.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchMatch

public SearchMatch()
Method Detail

getLabel

public abstract java.lang.String getLabel()
A human readable label for the match.

Returns:
the label for the match

getSearchProvider

public abstract SearchProvider getSearchProvider()
The provider which generated this match.

Returns:
the search provider which generated this match.

getMedias

public abstract DownloadableMedia[] getMedias(IProgressMonitor monitor)
The downloadable medias for this search match. Each media in the returned set must be downloadable by the music loader returned in getMusicLoader().

Parameters:
monitor - a monitor to report progress to and to check for cancelation
Returns:
set of downloadable medias.

getMusicLoader

public abstract MusicLoader getMusicLoader()
The music loader which can download the downloadable medias returned by getMedias(IProgressMonitor).

Returns:
the music loader