org.varienaja.util.coverart
Class YahooCoverArtFinder

java.lang.Object
  extended by org.varienaja.util.coverart.AbstractCoverArtFinder
      extended by org.varienaja.util.coverart.YahooCoverArtFinder
All Implemented Interfaces:
ICoverArtFinder

public class YahooCoverArtFinder
extends AbstractCoverArtFinder

Author:
Varienaja

Constructor Summary
YahooCoverArtFinder()
           
 
Method Summary
 java.net.URI constructSearchURI(java.lang.String band, java.lang.String albumtitle)
          Gets the URI to call, in order to search for Covers from a certain Album of a Band.
protected  org.apache.log4j.Logger getLogger()
           
 java.util.List<CoverArtSearchResult> procesSearchResult(java.io.InputStreamReader in)
          Processes the InputStream of the URI from constructSearchURI(), and extracts a list of CoverArtSearchResult objects from it.
 
Methods inherited from class org.varienaja.util.coverart.AbstractCoverArtFinder
findCoverURLs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YahooCoverArtFinder

public YahooCoverArtFinder()
Method Detail

constructSearchURI

public java.net.URI constructSearchURI(java.lang.String band,
                                       java.lang.String albumtitle)
                                throws java.net.URISyntaxException
Description copied from class: AbstractCoverArtFinder
Gets the URI to call, in order to search for Covers from a certain Album of a Band.

Specified by:
constructSearchURI in class AbstractCoverArtFinder
Parameters:
band - The name of the Band.
albumtitle - The name of the Album.
Returns:
An URI.
Throws:
java.net.URISyntaxException - If both a scheme and a path are given but the path is relative, if the URI string constructed from the given components violates RFC 2396, or if the authority component of the string is present but cannot be parsed as a server-based authority.

procesSearchResult

public java.util.List<CoverArtSearchResult> procesSearchResult(java.io.InputStreamReader in)
                                                        throws java.io.IOException
Description copied from class: AbstractCoverArtFinder
Processes the InputStream of the URI from constructSearchURI(), and extracts a list of CoverArtSearchResult objects from it.

Specified by:
procesSearchResult in class AbstractCoverArtFinder
Parameters:
in - The InputStream
Returns:
A non-null List of CoverArtSearchResult objects.
Throws:
java.io.IOException - If an I/O error occurs.

getLogger

protected org.apache.log4j.Logger getLogger()
Specified by:
getLogger in class AbstractCoverArtFinder
Returns:
A Logger to write log-statements to.


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