net.sf.dc.freedb
Class Freedb

java.lang.Object
  extended by net.sf.dc.freedb.Freedb

public class Freedb
extends java.lang.Object


Constructor Summary
Freedb(java.lang.String server, ImportAudioCDDialog ui)
           
 
Method Summary
static void cancel()
           
 AudioCD convertToDcObject(FreedbQueryResult result)
          Converts a query result (not detailed) to a Data Crow Object
 AudioCD convertToDcObject(FreedbReadResult result)
          Converts a read result (detailed) to a Data Crow Object
 java.lang.String[] getAvailableServers()
           
 java.lang.String[] getCategories()
           
 AudioCD[] query(java.lang.String id)
          Queries the freedb server for the full id: Client command: -> cddb query discid ntrks off1 off2 ...
 AudioCD[] queryDiscId(java.lang.String discID)
           
 void queryKeywords(java.lang.String search)
          Query the site parse the resulting html, and create appropriate queryresults URL of the search page is like http://www.freedb.org/freedb_search.php? invariant words=bela+fleck the search terms spaces are escaped (accented letters are not permitted) &allfields=NO Search in all fields ? &fields=artist Search in artists &fields=title Search in albums &allcats=YES Search in All categories ? &grouping=none Group the results in a single list or in genres &x=0 ??(not needed) &y=0 ??(not needed)
 FreedbReadResult read(FreedbQueryResult query)
           
 FreedbReadResult read(java.lang.String genre, java.lang.String id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Freedb

public Freedb(java.lang.String server,
              ImportAudioCDDialog ui)
Method Detail

queryDiscId

public AudioCD[] queryDiscId(java.lang.String discID)
                      throws java.lang.Exception
Throws:
java.lang.Exception

cancel

public static void cancel()

queryKeywords

public void queryKeywords(java.lang.String search)
                   throws java.lang.Exception
Query the site parse the resulting html, and create appropriate queryresults URL of the search page is like http://www.freedb.org/freedb_search.php? invariant words=bela+fleck the search terms spaces are escaped (accented letters are not permitted) &allfields=NO Search in all fields ? &fields=artist Search in artists &fields=title Search in albums &allcats=YES Search in All categories ? &grouping=none Group the results in a single list or in genres &x=0 ??(not needed) &y=0 ??(not needed)

Parameters:
search -
Throws:
java.lang.Exception

getCategories

public java.lang.String[] getCategories()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

getAvailableServers

public java.lang.String[] getAvailableServers()
                                       throws java.lang.Exception
Throws:
java.lang.Exception

query

public AudioCD[] query(java.lang.String id)
                throws java.lang.Exception
Queries the freedb server for the full id: Client command: -> cddb query discid ntrks off1 off2 ... nsecs After querying, the cd is queried by its discid and genre

Parameters:
id - full disc id
Throws:
java.lang.Exception

read

public FreedbReadResult read(java.lang.String genre,
                             java.lang.String id)
                      throws java.lang.Exception
Throws:
java.lang.Exception

read

public FreedbReadResult read(FreedbQueryResult query)
                      throws java.lang.Exception
Throws:
java.lang.Exception

convertToDcObject

public AudioCD convertToDcObject(FreedbQueryResult result)
Converts a query result (not detailed) to a Data Crow Object

Parameters:
result - query result

convertToDcObject

public AudioCD convertToDcObject(FreedbReadResult result)
Converts a read result (detailed) to a Data Crow Object

Parameters:
result - read result