net.sourceforge.atunes.kernel.modules.contextInformation.lyrics
Class LyricsEngine

java.lang.Object
  extended by net.sourceforge.atunes.kernel.modules.contextInformation.lyrics.LyricsEngine
Direct Known Subclasses:
LyrcEngine, LyricsDirectoryEngine, LyricsflyEngine, LyricsModeEngine, LyricWikiEngine

public abstract class LyricsEngine
extends java.lang.Object

The Class LyricsEngine.


Constructor Summary
LyricsEngine()
           
 
Method Summary
protected static java.lang.String encodeString(java.lang.String str)
          Encode string.
protected static java.net.URLConnection getConnection(java.lang.String url)
          Gets the connection.
abstract  Lyrics getLyricsFor(java.lang.String artist, java.lang.String title)
          Gets the lyrics for.
abstract  java.lang.String getLyricsProviderName()
          Returns the name of this lyrics provider
abstract  java.lang.String getUrlForAddingNewLyrics(java.lang.String artist, java.lang.String title)
          Returns the url for addind new lyrics
protected static java.lang.String readURL(java.net.URLConnection connection, java.lang.String charset)
          Read url.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LyricsEngine

public LyricsEngine()
Method Detail

encodeString

protected static final java.lang.String encodeString(java.lang.String str)
Encode string.

Parameters:
str - the str
Returns:
the string

getConnection

protected static final java.net.URLConnection getConnection(java.lang.String url)
                                                     throws java.net.UnknownHostException,
                                                            java.io.IOException
Gets the connection.

Parameters:
url - the url
Returns:
the connection
Throws:
java.net.UnknownHostException - the unknown host exception
java.io.IOException - Signals that an I/O exception has occurred.

readURL

protected static final java.lang.String readURL(java.net.URLConnection connection,
                                                java.lang.String charset)
                                         throws java.io.IOException
Read url.

Parameters:
connection - the connection
charset - the charset
Returns:
the string
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getLyricsFor

public abstract Lyrics getLyricsFor(java.lang.String artist,
                                    java.lang.String title)
Gets the lyrics for.

Parameters:
artist - the artist
title - the title
Returns:
the lyrics for

getLyricsProviderName

public abstract java.lang.String getLyricsProviderName()
Returns the name of this lyrics provider

Returns:
the name of this lyrics provider

getUrlForAddingNewLyrics

public abstract java.lang.String getUrlForAddingNewLyrics(java.lang.String artist,
                                                          java.lang.String title)
Returns the url for addind new lyrics

Parameters:
artist - the artist
title - the title
Returns:
the url for addind new lyrics


Copyright © 2006-2008 The aTunes Team. All Rights Reserved.